This is an old revision of the document!
Implementing a Game with Sound, Having Fun With Your Laser-Tag System
To complete this final milestone, you will implement a complete game that supports play between two teams (of any number) Unlike your other programming assignments, you are free to implement the game as you like, as long as you meet the requirements for game functionality, including sound. The coding standard still applies.
The game functions as follows. The game is essentially a version of “last person standing”. The game ends when all of the members of either Team-A or Team-B have “died”. The winning team is the team that has at least one member remaining “alive” at the end of the game.
Note that the game details below have been refined over several playing sessions. The current configuration seems to provide a nice balance of fun game play and low complexity.
Sound is essential to game play. It informs the player when they have been hit, when they have lost a life, and when they have expended all lives and must drop out of the game. In detail:
These videos demonstrate when sounds should be played and also show more detailed behavior of the game.
Grades for Milestone 5 will be determined by the functionality of the game and the lack of observable bugs. Groups will get credit for each feature that is correctly implemented. Additional credit will be given for a completely bug-free game.
./check_and_zip.py 390m5
to create a zip file that you submit to learning suite.One of the best ways to find bugs in your system is to play it extensively. If the TA detects a bug during pass-off, the team can attempt to fix their system and pass off later. However, don't depend upon the TA to detect bugs in your system. You must test and fully debug your system prior to bringing it to the TAs for pass off. If pass-off attempts become excessive, we will institute a penalty of some sort.
For this milestone you will not use check-and-zip. Just create a zip file of your new files and submit that to learning suite. Do not include any older files that have already been graded. Otherwise, these older files will be double graded.
The instructor provides working sound code and sound data. All sound data are contained in the sounds subdirectory of the lasertag directory. While coding this milestone, the student needs to add the necessary calls to the sound code so that sounds are correctly activated during game play.
Please read the comments and the function sound_runTest() function in sound.c to see how to use the sound code (it is straightforward).
Note: Make sure to add sound_tick()
to isr_function() along with all of the _tick()
functions.
WARNING!!! WHEN SET TO ITS MAXIMUM VALUE, THE SOUND VOLUME MAY DAMAGE YOUR HEARING IF YOU PLUG EARPHONES INTO THE ZYBO BOARD. THE INSTRUCTOR STRONGLY RECOMMENDS USING THE ATTACHED SPEAKER WITH VOLUME SET TO ITS LOWEST SETTING WHEN IMPLEMENTING YOUR GAME. Volume can be controlled using the 'sound_setVolume()' that can found in the sound.c file. Please read sound.c for more detail on how to use this function.
These videos demonstrate when sounds should be played and also show more detailed behavior of the game.
In this appendix you can find additional information that can be used for creative projects.
The bluetooth modem is connected to the ZYNQ FPGA via a fixed-rate 9600 BAUD modem. Communication with the modem is simple enough: characters pushed out the Bluetooth UART are transmitted via the Bluetooth modem and vice versa for receive. You can get the base addresses for the Bluetooth UART in the xparameters.h file. I have included documentation for the UART below. Look in the Consolidated_330_SW_bsp/ps7_cortex9_0/libsrc/uartlite_v3_0 directory for the UART driver code.