https://asteroid-canvas.mcdrmtt.co/
This is a relatively standard version of the classic Asteroids game implemented in vanilla JavaScript with no runtime dependencies.
- Checkout the repository.
- Run
npm install
to installesbuild
(used to bundle the game file and run the development server). - Run using
npm start
. - Open
http://localhost:8000
- You can now modify the game code while it is running. It uses a custom HMR (hot-module reloading) system that allows any game file (except
platform.mjs
) to be modified while the game is running, without losing the game state. - THe game state is exposed in the console as
window._gameState
, so you can modify it as you want while the game is running.
There are a number of improvements to make or missing features to add:
- Sound and music
- Gamepad
- Refactor the GUI code
- Bug fixes
- Game balance (difficulty, rewards, etc)
- Improve (eg move to worker to avoid browser locking up) or remove the GIF code