This project is a classic Snake and Apple game developed in Assembly Language. The game features a snake navigating through a field with boundaries, a central barrier, and teleportation holes on the left and right sides of the field.
The Snake and Apple game is a simple yet engaging game where you control a snake to eat apples, avoid boundaries, and navigate through a field with obstacles. The game is developed using Assembly Language, making it a fascinating project for those interested in low-level programming.
- Boundaries and Barriers: The field has boundaries around it and a small barrier in the middle. The snake will die if it collides with the boundaries or the barrier.
- Teleportation Holes: There are holes in the left and right boundaries. If the snake enters the left hole, it will reappear through the right hole and vice versa.
- Apple Eating: When the snake eats an apple, its size and speed increase, and the game score increases by 5. A beep sound is played on eating an apple.
- Game End: The game ends if the snake collides with the boundary or barrier, and a beep sound is played.
To run this game, open the DosBox in the LogicWorks5 folder. Follow these steps to set up and run the game:
- Clone the repository:
git clone https://github.com/burhanahmed1/snake-and-apple-game.git
- Navigate to the project directory:
mount C D:\COAL
- Assemble the game code:
nasm SnakeAppleGame.asm -o SnakeAppleGame.com nasm SnakeAppleGame.asm -l SnakeAppleGame.lst
- Run the game using an emulator:
nasm SnakeAppleGame.com
- W: Move Upward
- S: Move Downward
- A: Move Leftward
- D: Move Rightward
- Q: Exit Game
- Boundaries and Barrier: Navigate through the field avoiding collisions.
- Teleportation Holes: Enter left hole to reappear on the right and vice versa.
- Apple Eating: Increase size and speed, with score increment and beep sound.
- Game End: Beep sound on game over.
Contributions are welcome! If you would like to contribute to this project, you can fork the repository and create a pull request with your improvements. Here's how you can do it:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Create a pull request from your branch to the main repository.
This project is licensed under the MIT License.