The coding and implementation of the classic Snake game using the Jack programming language, later the code is translated into VM instructions in nand2tetris software. The Snake game is an engaging and interactive game where the player Gambit a growing snake to consume food items while avoiding collisions with the snake's own body, the game boundaries, and various obstacles. The project involves designing the game interface, implementing the game logic, and incorporating features to enhance the user experience. The Rand class is employed to generate pseudo-random numbers for positioning food items and introducing variability in game elements. The project ensures the uniform distribution of random events to maintain game balance and unpredictability. This project demonstrates the application of Jack programming concepts, such as event handling, collision detection, and graphical rendering, to develop a complete and enjoyable gaming application.
File Overview
-
Block.jack - Represents a single block (segment) of the snake.
-
Main.jack - Contains the main game logic, including movement, collision detection, and rendering.
-
Rand.jack - Provides random number generation for food placement.
-
Snake.jack - Defines the Snake class, handling its movement and growth.
-
View.jack - Handles rendering the game on the screen.
-
Bomb.jack - provides obstacles like bombs.
-
BombArray.jack - creates array of bomb and append it.
screen grab of our work:
Contributors:
- S Sajeev
- A Prithvi
- D Preetham
- Vijay Srinivas P
- S Dhanush