Tilting Maze GameMatt FishburnHongyi HuTA: Jae LeeGame Overview●Tilting the Board Moves the Ball●Objects on Board:–Walls–Ball–Traps–DestinationSample ScreenshotSource Control / DocumentationBlock Diagram OverviewExternal Sensor Interfaces●Two Gyros &Three Accelerometers–0 to 5 V output–10-200 Hz sampling●Two 3-Channel ADCs●SPI Synchronizer ModuleFSMGame State●Stores and updates the state of the game●Inputs:–Acceleration in x and y axis (signed fractionals)–New ball position and velocity, game state data●Outputs:–Current ball position and updated velocityCollision DetectionCollision Detection●Moves the ball and checks for collisions●Inputs:–Current position and velocity of ball–Collision data from CD mask●Outputs:–New position and velocity of ball–Collision query to CD maskCollision Detection Process●Check four sides and center of ball●Set ball's velocity along an axis to 0 if the ball will collide with a wall●Reset level if ball's center is over a trap hole●Move on to next level if ball's center is over a target hole●Otherwise move the ball to its new position and repeatCollision Detection MaskCollision Detection Mask●Stores location information for every obstacle in current level●Inputs–Collision query from Collision Detection module–Level data from Memory Interface●Outputs–Collision data–Level query to Memory Interface●Level Mask similarMemory Interface●Needs to communicate with both collision mask and level mask●What is stored?–Type of each 16 x 16 pixel block stored in three bits–Location in memory signifies position on map–Each level takes up 4Kb of memoryDraw and XVGA Units●Receives ball information from the FSM●For every pixel:–Sees if the ball should be drawn–Checks with level mask if a wall/hole should be drawn●Sends appropriate color for every pixel to the
View Full Document