Skip to content

justinliew/space-invaders

Repository files navigation

Space Invaders @ Edge

This is an implementation of Space Invaders, running as a WASM app in browser.

The idea is that we can also run parts of the WASM app on Compute@Edge to do verification for high scores.

We could also run parts of it on C@E for a potential multiplayer version.

TODO

See Github Issues for tracking.

For Release

  • if you kill the UFO you can keep shooting the area and get points.
  • ranks for leaderboard.
  • name the 2 leaderboards.
  • entering high score name.
  • after dying once the wave gets set to 0, not 1. I fixed this but it doesn't seem to work.
  • don't show me in the global leaderboard if I'm not in rank.
  • dedup local player.
  • get global and around me if relevant.
  • aroundme leaderboard issue when we move up the - [X] show local score differently.
  • proper POST of score.
  • hook up proper leaderboard.
  • fix crash.
  • implement redis for leaderboard.

Architecture

  • encapsulate the sim for verification on C@E.

Architecture

  • we need a way to save and load state.
  • we need a way to verify/checksum the state.
  • we need to keep a frame number/count.
  • we need to figure out how to encapsulate input.
  • encapsulate relevant game state for picture-in-picture for multiplayer.
  • do we need to render to framebuffer so we can easily do that on C@E?
  • network story.
  • proper ECS type structures for more generic collisions, movement, etc.
  • ECS (entity-component-system) story for better design/reuse/extensibility.

Code Cleanup

  • proper functions instead of data.game.world.world_size.x for example.
  • bottom right calculation for swarm is incorrect
  • inputs should have pressed/release plus "changed". This will help our UI transitions.

Polish

  • audio.
  • better title screen with proper title.
  • scaling when a window is smaller than the game area is problematic.
  • lives gained when hitting score thresholds.
  • enemy speed progression.
  • do we need to do a better shield damaged texture?
  • ensure shields resize properly if the screen size changes
  • player sizing, radius for collision, etc. Should the player be bigger?

Done

  • f64 vs usize for point, vector, size.
  • some sort of event system for emitting events from game.
  • explosions.
  • leaderboards updating after score update.
  • after the separation refactor, explosions seem slower. Is this worth addressing?
  • stub in leaderboard GET functions.
  • win state and transition to new
  • UX overhaul. draw leaderboard.
  • draw title menu.
  • mystery UFO.
  • player lives. We need a soft reset that resets the player.
  • scoring.
  • enemy sprites.
  • ensure bullet collisions are exact.
  • explosions.
  • add all sprites.
  • shield collision.
  • death needs more of a delay too.
  • end game needs some sort of delay before restart.
  • shields need to reset on game over.
  • swarm needs to move the entire way across based on which ones are still alive.
  • enemy bullets need to spawn from the proper spot, and don't spawn if there's nothing in that row.
  • enemy explosions should be at the center of the enemy.
  • enemy bullet spawn times should change as there are fewer enemies.
  • crash, appears to be when some columns are empty. Bullets maybe?
  • do a size pass on everything.
  • when I bring up the title bar, the enemies are rendered with a white box.
  • basic player movement.
  • sizing: world space, screen space.
  • player firing and bullets.
  • proper enemy movement, less smooth.
  • enemy firing.
  • longer bullet delay for player
  • f64 vs usize for point, vector, size.
  • some sort of event system for emitting events from game.
  • explosions.
  • leaderboards updating after score update.

About

Space Invaders in WASM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published