Vertex(the game, not to be confused with Virtex)Don GoldinMark SullivanOverviewA game where you are in a ship and must survive as long as you canUse 2D wireframegraphicsScreenshot from Geometry Wars: Retro Evolved (PC)High Level ModulesThree top level modulesInput ModuleGame ModuleGraphics ModuleInput ModuleFirst iteration will simply be labkitbuttonsOnce other modules are complete, interface with two joysticksJoysticks use SPIhttp://www.digilentinc.com/Input ModuleSPI Communication ModuleInterfaces with Joystick and passes on relevant informationCORDIC ArctanModuleReturns quadrant-correct angle1/MISO1/MOSI2/!SS1/CLK10/x110/y11/start10/x2 10/y28/angleGame Module Entities0001_0000000001_0000000001_00000001 “Public” and “Private” information Information stored in two 256x32 BRAMs Public Table, Private Table FSM: Spawning, Moving, Colliding, Done[31:28] ID [27:18] X [17:8] Y [7:0] ANGLEGame ModuleEntity Movement Module-When ready signal is asserted, processes input-Decides based on ID what behavior should be-Outputs new coordinates and orientation, and asserts movement_done signalGame Module-Manages unit information-Handles unit creation and deletion-Hub for communication of game modules-Communicates with graphics modulesRandom Number Generator-Uses linear congruentialgenerator-Produces 32 bit signal every clock cycleCollision Module-When ready signal is asserted, processes input-Checks the ship and bullets against each enemy with circular collision detection-Outputs colliding enemy index or zero, and asserts collision_donesignal32/private_entry32/public_entry32/player_data1/movement_ready32/random32/public_entry32/private_entry 1/movement_done32/entry8/enemy_index32/enemy_entry1/collision_done8/collided_enemy_indexTo Graphics10/y8/angle1/startFrom Input32/entry8/index10/x1/collision_readyGraphics Module Double buffers using ZBT memories Lookup tables for entity shapes: 16:16:32 Translates and rotates line segments Bresenham's line drawing algorithm Pipelines line segmentsGraphics ModuleShape Module- Every other vsync pulse, looks up the line segments of each entity and applies translation and rotation. Sends endpoints to the Bresenham module along with the color.Buffers-Each 1/60 second, draws screen buffer to svga out.-Every other 1/60 second, swaps buffers, then erases and takes writes to offscreen.svga_videoBrensenham Module- When the shape and buffer modules are ready, draws the current line segment to the offscreen buffer using Bresenham’s line algorithm.Sin Module32/entry8/index20/v020/v132/rgba1/sm_ready1/bm_ready10/x10/y32/rgba1/write1/ready1/vsync (game_clock)11/hcount11/vcount24/colorTo GameCos Module8/angle8/sin8/angle8/cosTimelineMark Don11/14 Movement Double Buffers11/21 Spawning Bresenham11/28 Collisions Shape Module12/5 Input Integrate12/10 Debug
View Full Document