Skip to content

BitterOcean/Atary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atary

Awesome Builed License platform

atari

In this project, we built the classic snake game using Atmega32 and a 16x8 LED dot matrix display.

🎥 To see how it works , take a look at This Link


Table of contents

DETAILS

The game starts with a 2-dot snake and the player can control the snake by 4 push buttons. The snake grows by one dot after eating the food and the player's score is incremented by one. The game continues until the snake eats itself after which the game is over and the player's score and the game highscore is shown. Also the game highscore is retrieved from EEPROM and updated if the the highscore is beaten.

Protocols or Services used in the project

  • SPI for LED Matrix interfacing.

  • EEPROM for Game HighScore

Game Algorithm

  • Initialise Snake with two dots. The snake is represented by a 50x2 matrix with each dot represented by the position on the matrix(x,y)

  • The direction is taken and the snake is moved one dot accordingly.

  • If the snake head touches the food pixel, then the snake is grown and a food pixel is drawn randomly on the screen and the loop continues.

  • If the snake head touches itself, then the loop breaks and the player's score and highscore is displayed on the screen. The game variables are reset and the loop continues.

COMPONENTS

  • 1 × AVR ATmega32 Microcontroller
  • 2 × 8x8 LED Dot Matrix Module
  • 4 × Push Button

SCHEMATIC

PROJECT LOGS

Tasks Done

  • Completed the game logic(main.c file)

  • Wrote library to interface atmega32 with two serially connected 8x8 led matrices controlled by MAX2719 drivers (led_control.c file)

Tasks to do

  • Load highscore from eeprom

  • Interface accelerometer

Tasks Completed

  • Assembled the AVR with push buttons and the LED Dot Matrix.

  • Found libraries to interface the LED Matrix (which is controlled by a MAX2719 driver) with the atmega32.

  • Worked on the basic game loop - wrote function definitions for snake and the board.

Ongoing tasks

  • Working on displaying the player's score on 2 seven segment displays

  • Working on the game logic - detecting collision and updating scores of player.

SUPPOERT

Reach out to us at one of the following places!

LICENSE

License