This Snake is Down Right Fierce PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
Transcript and Presenter's Notes

Title: This Snake is Down Right Fierce


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
Background Memory
RGB
Controller data
data
new_pos
num
31.5 MHz (all blocks)
fruit_pos
Snake Pos Registers
27 MHz
20
DCM
20
snake_pos
pixel_count
VGA Signals
RGB Signals
10
Display
VGA
line_count
24
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

RGB
3
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
Write a Comment
User Comments (0)
About PowerShow.com