1 / 7

This Snake is Down Right Fierce

This Snake is Down Right Fierce. Charles Hung 6.111 Final Project. Introduction. Object of the game is to eat “fruit” to grow longer and avoid hitting the walls or yourself 3 different levels Player can control the snake using a PS/2 controller. Design Considerations.

aleda
Download Presentation

This Snake is Down Right Fierce

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. This Snake is Down Right Fierce Charles Hung 6.111 Final Project

  2. Introduction • Object of the game is to eat “fruit” to grow longer and avoid hitting the walls or yourself • 3 different levels • Player can control the snake using a PS/2 controller

  3. Design Considerations • Major/Minor FSM abstraction to control game logic • Use block RAMS to display background and sprite to display the rest of the objects

  4. System Overview 3 clk 8 PS/2 Interface Control Block RGB Background Memory Controller data data new_pos num 31.5 MHz (all blocks) fruit_pos Snake Pos Registers 27 MHz 20 DCM snake_pos 20 pixel_count RGB Signals VGA Signals 10 Display VGA 24 line_count 10

  5. Growing the Snake • Snake represented as many segments drawn on top of each other • Can grow the snake by changing the relative position of the sprites

  6. Control Block • Control Block contains game logic and encoder for output from the PS/2 interface 3 RGB next_pos fruit_pos 8 8 ate_fruit num Encoder Minor FSM Major FSM Controller data movement new_pos lose seg seg_num

  7. Control Block • Minor FSM checks for collisions between the snake and the wall, the snake and itself, and the snake and fruit • Checks for collisions with walls by using the RGB value from memory • Checks for collisions with snake by comparing position of the head with the position of the rest of the segments • Outputs a lose signal if snake does something that causes the game to end • Writes new positions of the snake segment to the registers if game continues

More Related