Skip to content

MrFootwork/project-asteroids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

60 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Project's name

Click here to see deployed game

Description

The projects recreates the famous game Asteroids, which was released by Atari in 1981. The player controls a spaceship on a screen. Asteroids coming in from all sides can be shot into smaller pieces. The player loses, if he loses all his lives by bumping into asteroids too often.

Game Controls

Key Action
W, ๐Ÿ”ผ Thrust
A, โ—€ Rotate anti-clockwise โ†ช
D, โ–ถ Rotate clockwise โ†ฉ
S, ๐Ÿ”ฝ Breaks
Space Shoots projectiles
P, Pause Pauses and resumes the game

MVP

  • Start game
  • Player can shoot asteroids
  • Asteroids keep spawning into the screen
  • Asteroids take players lives until he dies
  • Player loses, if he has no lives left
  • Player wins, if he survives
  • After the game ends, the game can be restarted

Backlog

Gameplay

  • spawn progression
  • time to survive
  • substract lives
  • count score
  • โ€ผproperly reset game states for new games
  • ๐Ÿž Taste P funktioniert nach game restart nicht
  • ๐Ÿž set base url on paths
  • ๐Ÿž keep ship in bound
  • ๐Ÿž reset orientation and velocity
  • ๐Ÿž when sfx is switched off, I can still make shooting sounds, sometimes (like every 2nd time I shoot)
  • ๐Ÿž firerate is always high, regardless of value set Conditional check is with timestamps (ms) ๐Ÿง  Think of a solution, what unit is best
  • weapon cooldown
  • weapon overheat
  • shield bar instead of lives
  • asteroid hitpoints
  • break big asteroid into small pieces
  • powerups
  • weapons
  • define asteroid types
  • create level progression
  • organize background image data with all settings for css to change according to level
  • asteroids deflect each other
  • items, shop & currency
  • ๐Ÿžfine-tune collision shapes
  • ๐Ÿž๐Ÿž๐Ÿž canโ€™t thrust after pause โ†’ game over โ†’ restart also: doing that you can thrust on the Result Screenโ€ฆ in general: The game seems to keeps running after game over

UI/UX

  • โ€ผbuild main menu
  • lower sound volume of backgroundmusic (on 28)
  • menu buttons: sound on hover
  • sounds: explosion, thrust, asteroid contact
  • add text shadow to title
  • disable user-select on title
  • animate explosion, thrust
  • animate bumping into asteroid (reuse hit edge animation)
  • โ€ผShow an immediate dialog when game finishes
  • ๐Ÿž dialog shows victory, although I dieโ€ฆ
  • ๐Ÿž never display negative numbers!
  • โ€ผ Pause Dialog
  • add victorious short musik on level completion
  • ๐Ÿž on DEFEAT: try again shoud maintain levelID
  • ๐Ÿž on Pause: intercept ESC to also resume game
  • โ€ผbuild result display (win/lose)
  • โ€ผbuild game UI: with shield, speed, gun cool down, overheat, current Level
  • indicate when pausing the game
  • indicate, that player was hit
  • on bump: deflect from asteroid, asteroid should stay
  • show intro text with a level explanation (maybe with typewriter text)
  • collect statistics
    • shots hit/miss
    • count asteroids hit and group in categories
  • โ€ผat game start: transition to game with animation (fancy loading screen?)
  • [ ]
  • add transitions between video changes (align with beats)
  • basic settings (music/sfx)

Performance

  • transition between views
  • audio pooling (see TODO)
  • ๐Ÿž game view: start rendering only everything is loaded
  • ๐Ÿž remove asteroid element correctly at screen leave
  • ๐Ÿž click on intro videos shouldnโ€™t restart videos
  • fine tune velocity of spawning asteroids
  • ๐Ÿž Fix lagging asteroids spawn
    • hide in hidden container
    • hide outside screen and render later
    • reuse elements and use an element pool

Backlog

  • settings
    • sounds fine control
    • game controls
    • ...
  • multiplayer
  • use reactive values

Data structure

Classes

  • Game
  • Spaceship
  • Asteroid
  • Projectile
  • Statistics

Game Class

Game Class

Spaceship Class

Spaceship Class

Asteroid Class

Asteroid Class

Projectile Class

Projectile Class

Statistics Class

Statistics Class

States y States Transitions

Intro

Statistics Class

Home

Statistics Class

Game

Statistics Class

Result

Statistics Class

Task

  • ๐ŸŒŒ Setup views and cycle through them
  • ๐Ÿ”ƒ Setup game on game view and define a game loop
  • ๐Ÿš€ Show spaceship and add controls
  • ๐ŸŽฎ Show asteroids and add random movements
  • ๐Ÿ”ซ Allow spaceship to shoot
  • ๐Ÿ”‚ Setup level progression
  • ๐Ÿ›‘ Detect collisions and handle them
  • ๐Ÿšฅ Display game stats, e.g. lives, kills, time
  • ๐Ÿ† Define winning and losing conditions
  • ๐Ÿ“ˆ Add statistics and display them on the result view
  • ๐Ÿญ Add all the other good stuff

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published