Skip to content

Akashk002/Snake2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

About the Game

A snake game featuring classic mechanics with added power-ups, dynamic food interactions, and a competitive co-op mode for two players.

Features Implemented

1.Movement

The snake can move in all four directions (up, down, left, and right) using standard controls.

2.Screen Wrapping

When the snake crosses the boundaries of the screen, it reappears on the opposite side seamlessly.

3.Self-Collision

If the snake bites its own body, it dies and the game ends.

4.Growth Mechanic

Eating mass-gainer food increases the snake's length, making it harder to navigate.

5.Power-Ups

Shield: Temporarily prevents the snake from dying even if it collides with its own body.

Score Boost: Doubles the points gained from eating mass-gainer food for a limited time.

Speed Up: Increases the snake's movement speed, making the game more challenging.

Each power-up has a cooldown period of 3 seconds, which can be adjusted for flexibility.

Power-ups spawn randomly at unpredictable intervals on the game screen.

6.Food Mechanics

Mass Gainer Food: Increases the snake's length and adds points to the score.

Mass Burner Food: Reduces the snake's length but does not spawn if the snake is already too short.

Food items automatically disappear after a set time if not consumed.

Both types of food spawn at random intervals to keep the gameplay dynamic.

7.Co-Op Mode

A two-player mode where Player 1 controls their snake using the WASD keys, and Player 2 uses the arrow keys.

If one snake collides with the other, the bitten snake dies, adding a competitive element to the game.

8.Scoring System

Consuming mass-gainer food increases the player's score, while mass-burner food reduces it.

8.User Interface (UI)

Basic UI includes screens for death, win, and the main lobby.

Functional buttons for pausing, resuming, restarting, and quitting the game are available.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published