Skip to content

Snake is a classic video game where a player controls a snake's head, eating apples that spawn in the game board and avoid colliding with the edges of the board, and the snake itself.

Notifications You must be signed in to change notification settings

anj0la/MultithreadedSnake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot of the logo

Multithreaded Snake Game

In Snake, the player controls a snake moving around the game board. Using the arrow keys, the objective is to navigate the snake to eat randomly spawning apples, which cause it to grow with each bite. As the snake grows longer, maneuvering becomes more challenging. The game ends if the snake's head collides with its own body or the board's edge.

The game will remain in the alpha stage indefinitely, created as part of my parallel programming class. It marks my first attempt at developing a game in just two weeks, with no plans for beta testing.

Game Screenshot

snake_gameplay_screenshot

Download the Game

Available via the following game page: https://anj0la.itch.io/multithreaded-snake-game

Language & Libraries

  • Made with C/C++
  • Includes the Allegro 4.4.2 library (a game library for C/C++ programming utilizing DirectX and OpenGL)
  • Includes the Pthreads library for Windows

Multithreaded Aspects

  • Spawning the apple in a random location
  • Handling keyboard input
  • Ending the game abruptly when the ESC key is pressed
  • The main thread (includes the game loop in the play_game() method)

Attribution

Known Bugs

  • If you change to another screen, the music starts to repeat itself.
  • Sometimes, the game will crash when trying to exit the game.

About

Snake is a classic video game where a player controls a snake's head, eating apples that spawn in the game board and avoid colliding with the edges of the board, and the snake itself.

Topics

Resources

Stars

Watchers

Forks

Languages

  • C 86.2%
  • C++ 12.9%
  • Objective-C 0.9%