MASHOOQ,RAHUL,SANAT AND YIBIN, SAVING MANKIND SINCE SPRING 2011 Game Overview • All Invaders Are Belong To Us! is a 2D one player shooting game. • The objective of the game is to kill all the aliens that are coming to attack the home-ship. • As the game progresses, the difficulty levels increase. (the number of missiles and the speed at which the wave comes to attack the home-ship increases) • The game has 3 phases namely, GameStart , Game-Play and Game-Over. • The game can end by either losing all lives, or by allowing the aliens to “INVADE” by letting them reach the barricades. • By killing each alien, the score gets updated by 10 points and on clearing a level, we go to a harder level. • The game is really exciting and believe it or not, It is FUN to save the Planet. o em nD Ge e m Ti TimeGen Demo Tim eG en De mo mo De en eG Tim TimeGen Demo Tim e G en De mo Clock 1 o em nD Ge e Tim TimeGen Demo Tim start_v_ccordeGen De mo mo De en eG Tim TimeGen Demo Tim e Ge nD em o disp_bit when v_count = Drawing Sprites 2 3 4 emo D n Ge Time 5 6 7 8 9 10 emo D n Ge Time 1 0 1 1 1 1 0 1 disp_bit when v_count = start_v_coord +2 0 1 0 1 disp_bit when vcount = start_v_coord + 3 1 1 1 0 disp_bit when v_count = start_v_coord+1 TimeGen Barricade Blocks Alien Wave Barricade 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 Alien alive/killed bitmap Software Update Actual display bit 1 2 o em nD e G 3 4 5 e Tim TimeGen Demo Tim eG en De mo emo D n Ge Time starting coordinate of sprite 4 4 6 7 8 9 10 emo D n Ge Time mo De en eG Tim TimeGen Demo Tim e G en De mo Desired display bit mo De en eG Tim TimeGen Demo Tim e Ge nD em o Clock o em nD Ge e Tim TimeGen Demo Tim eG en De mo • Only update state vectors when we know we are not drawing sprites. Or else … 4 4 3 3 TimeGen Software Architecture while ( true ) { read keyboard, update state counter = 0 if ( counter == delay ) respond to keyboard: move home ship/ spawn home missile collision detection for home missile and aliens collision detection for home missile and barricades collision detection for alien missiles and barricade send update to hardware if ( num_active_missiles < num_missiles_for_current level spawn new alien missile if all aliens killed setup parameters to start new level counter = 0 else counter++ } Experience and Issue in Implementation • Timing and clock cycle. – In animation, e.g the one time explosion • Hardware or software – Decision on whether to implement certain functions in hardware or software. E.g • Animation in hardware • PS/2 State Machine in Software due to the need to update coordinates which is used ion both software and hardware. Experience and Issue in Implementation • State Machine and loop holes – Restrict the use of delays when polling in software Lessons Learnt • • • • • • • Work Thoroughly on your design, Spending time on it early saves time later Get all the hardware to work EARLIEST POSSIBLE Divide work and plan well Test hardware using ‘hard coding’ Timing is critical in hardware, know whats happening when Draw state machine diagrams, they give a good vision Comment out parts when debugging VHDL, you will save a lot of time Summary • Choosing a game project was a good idea • The end result is fun! • Teamwork is awesome..