Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New game]: Snake game using c/c++ #5130

Open
1 task done
rugved0102 opened this issue Aug 8, 2024 · 3 comments
Open
1 task done

[New game]: Snake game using c/c++ #5130

rugved0102 opened this issue Aug 8, 2024 · 3 comments
Assignees
Labels
gssoc GSSoC24 program label level3 Adding new features New Game 🎮 This is the label that will be used on issues that are raising new game issue

Comments

@rugved0102
Copy link
Contributor

🎮 Game Request

Game Overview
Objective: Control the snake to eat fruits and grow longer without colliding with walls or itself.

Components
Grid: The game is played on a grid defined by width and height.
Snake: Starts with a single head and grows as it eats fruits.
Fruit: Randomly appears on the grid; when eaten, the snake grows, and the score increases.
Score: Increases by 10 points for each fruit eaten.

Main Functions
Setup: Initializes game variables, including the snake's position, fruit position, and score.
Draw: Renders the game board, snake, and fruit on the console.
Input: Detects user input (WASD or arrow keys) to change the snake's direction.
Logic: Updates the snake's movement, checks for collisions, and handles fruit collection.

Game Loop
Continuously updates the game state, draws the board, processes input, and checks for game-over conditions until the player collides with a wall or itself.
Enhancements

Add walls, levels, or graphical libraries (like SDL or SFML) for improved visuals and gameplay features.

Point down the features

Console-Based Gameplay: The game runs in the terminal or console, using basic text rendering.
Grid-Based Movement: The snake moves within a defined grid, responding to player inputs.
Dynamic Snake Growth: The snake grows longer each time it eats a fruit.
Random Fruit Placement: Fruits appear randomly on the grid, encouraging the player to navigate.
Score Tracking: The game keeps track of the score, increasing by 10 points for each fruit eaten.
Collision Detection: The game ends if the snake collides with itself or, depending on the implementation, the walls.

Select program in which you are contributing

GSSoC24

Code of Conduct

@kunjgit kunjgit added level3 Adding new features New Game 🎮 This is the label that will be used on issues that are raising new game issue labels Aug 8, 2024
@kunjgit
Copy link
Owner

kunjgit commented Aug 8, 2024

Hey @rugved0102 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹️

@kunjgit kunjgit added the gssoc GSSoC24 program label label Aug 8, 2024
@rugved0102
Copy link
Contributor Author

/assign

@Priyanshu-2005
Copy link

Hey @kunjgit i would like to work on this issue kindly assign it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GSSoC24 program label level3 Adding new features New Game 🎮 This is the label that will be used on issues that are raising new game issue
Projects
None yet
Development

No branches or pull requests

3 participants