[New game]: Snake game using c/c++ #5130
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
🎮 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
The text was updated successfully, but these errors were encountered: