Created by: Ming Yi Koh
Tempo Shot is a music based first-person-shooter game that tests your reflexes and judgement. Managing your inventory of ammo and grenades is key to winning.
Please turn on your volume while playing.
Survive for two minutes. Lose all health and you lose.
Use your mouse to aim and left click to shoot them. Shooting enemies will damage them, some enemies require more shots to kill. Failure to kill them before they disappear will reduce your health. Right click to use grenades which damage all visible enemies. Shooting allies cause you to lose a health. Shoot ammo boxes or med packs to refill your supplies and health.
Mouse Left Click: Shoot (One damage to targeted enemy)
Mouse Right Click: Grenade (Two damage to all enemies)
- Game Logic Flow-Chart
- Coding Theory
- Future Possible Updates
- Coding Sequence
- User experience
- Acknowledgements
This game has only one victory and one failure condition. The spawns(enemies/utilities) are the main element of the game. Using an object constructor function allows storing of numerous keys and elements for each enemy. It also allows for future addition of enemy types and effects. Spawns are pushed into an empty array for storage. Example of object constructor:
function Spawn(life, damageOnPlayerWhenExpire, timeTillExpire, effectOnPlayerHealthWhenShot, effectOnPlayerAmmoWhenShot, effectOnGrenadeWhenShot, idLink){
this.life = life;
this.damageOnPlayerAtExpire = damageOnPlayerAtExpire;
this.timeTillExpire = timeTillExpire;
this.effectOnPlayerHealthWhenShot = effectOnPlayerHealthWhenShot;
this.effectOnPlayerAmmoWhenShot = effectOnPlayerAmmoWhenShot;
this.effectOnPlayerGrenadeWhenShot = effectOnPlayerGrenadeWhenShot;
this.idLink = idLink;
}
On each spawn, a div will be created and appended. A counter is used to link the enemy div with the specific enemy array element. Each spawn is given a unique ID using the counter, and an idLink of the same value for the array element, afterwhich the counter increases for the next spawn. Enemies/allies/tools spawn via a setInterval function. Different enemies have different spawn rates.
On shooting spawns, function will iterate object key and value to determine effect on player stats. Enemies deal damage to player on expiry.
To add variety in the game, events are created that spawn i.e. 300 enemies at the same time, which forces players to use the grenade. Individual levels are created by matching spawn rate and events with the tempo of the background music of the specific level.
- Scoring function
- Combo function
- Pause button
- Text popups at game screen, 'Miss!' etc.
- Enemies zoom to player (transition effect) when they expire, like a bullet path
- Text notification on miss etc.
- No max health
- Using grenade on 5 allies and 1 healthpack will result in gameover.
Though 5 health - 5 + 1 = 1 health
- Create basic html, game screen layout
- Create win and lose condition
- Create object constructor
- Create spawn function for div creation and individual enemy types
- Link spawn div and array object
- Create timer and countdown function so win condition can be met
- Create function so enemies deal damage to player on expiry
- Create checkLoss function to check player health so loss condition can be met
- Target this.div on click to derive key/value
- Left and right click functions
- Adjust CSS
- Adjust setInterval to adjust game difficulty
- Adjust spawn locations
- Game overlay to cover game screen before play
- Start button, Retry button
- Add BGM, gunshot and grenade audio on click
- Add easy and hard levels, new BG BGM Events
Easy stage introduces a gradual learning curve. Enemies spawn according to the beats of the song which gradually becomes faster. This helps players improve their reflexes and get used to the general mechanics of shooting and grenades.
After reflexes comes judgement. Normal stage introduces this element to the game, namely the spawning of allies in game. Players have to avoid shooting allies and using grenades when they are on screen. This forces players to survey the stage and judge the best course of action within a limited time frame.
Hard stage adds yet another element to the game, inventory management. Players have limited ammo and grenade in this stage and need to juggle between all three elements. Reflexes. Judgement. Inventory management.
-
Alex Min (TA)
For the precious help and guidance rendered through individual consultations -
Hazel Toh (WDI 12)
For the much needed assistance in editing images used in the game -
Songs
Escape the Fate - "One For The Money"
Tokyo Ghoul - "Unravel"
Imagine Dragons - "Believer"

