https://github.com/remarkablegames/asteroids
👾 Asteroids game
https://github.com/remarkablegames/asteroids
asteroids game javascript p5js p5play website
Last synced: about 2 months ago
JSON representation
👾 Asteroids game
- Host: GitHub
- URL: https://github.com/remarkablegames/asteroids
- Owner: remarkablegames
- Created: 2021-01-31T20:45:02.000Z (over 5 years ago)
- Default Branch: gh-pages
- Last Pushed: 2021-02-06T00:52:37.000Z (over 5 years ago)
- Last Synced: 2025-01-13T05:42:06.577Z (over 1 year ago)
- Topics: asteroids, game, javascript, p5js, p5play, website
- Language: JavaScript
- Homepage: https://remarkablegames.org/asteroids/
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# asteroids
[](https://repl.it/github/remarkablegames/asteroids)

[Asteroids game](https://remarkablegames.org/asteroids/) from [p5.play examples](https://molleindustria.github.io/p5.play/examples/index.html?fileName=asteroids.js). See [Repl.it](https://repl.it/talk/share/Asteroids/118514) and [blog post](https://remarkablegames.org/posts/asteroids/).
Built with:
- HTML/CSS/JS
- [p5.js](https://p5js.org/)
- [p5.play](https://molleindustria.github.io/p5.play/)
## Run
Clone repository:
```sh
git clone https://github.com/remarkablegames/asteroids.git
cd asteroids
```
Start a static server:
```sh
python -m SimpleHTTPServer
```
Open http://localhost:8000/:
```sh
open http://localhost:8000/
```
To stop the server, press `Ctrl + C`.
## Changelog
### Bug Fixes
- Decrease `ship` and `particle` friction so they can move
- Improve text readability by giving it a stroke and putting it in front of the layers
### Features
- Render the game full screen
- Generate asteroids based on screen size
- Destroy the ship on asteroid collision
- Improve bounding box collision detection
- Improve ship speed
- Randomize the speed of sprites (asteroids and particles)
- Control ship using arrow keys or WAD; fire bullet with space
### Chore
- Refactor to local scope so globals aren't polluted