Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rayzr522/asteroids
A fun little recreation of the classic Asteroids game in 100% vanilla JavaScript
https://github.com/rayzr522/asteroids
asteroids asteroids-game game javascript recreation vanilla-js
Last synced: 26 days ago
JSON representation
A fun little recreation of the classic Asteroids game in 100% vanilla JavaScript
- Host: GitHub
- URL: https://github.com/rayzr522/asteroids
- Owner: rayzr522
- License: mit
- Created: 2018-12-19T11:45:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T00:07:05.000Z (11 months ago)
- Last Synced: 2023-12-22T03:13:41.828Z (11 months ago)
- Topics: asteroids, asteroids-game, game, javascript, recreation, vanilla-js
- Language: JavaScript
- Homepage: https://rayzr.dev/asteroids
- Size: 613 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Asteroids
> A fun little recreation of the classic Asteroids game in 100% vanilla JavaScript
### [Play it now!](https://rayzr.dev/asteroids)
I honestly just sat down and felt like making this. In total, between far more playtesting than I'd like to admit and the development itself, I spent just under 4 hours on this. All resources are 100% made by me, from audio to "graphics" (although no images are used).
While I am aware that my code is not exactly the cleanest, this was a personal exercise for myself in problem solving under time constraints. Too often I overcomplicate things to the point that they are unmanageable. In this situation, I simply decided I would keep writing more lines of code until it worked, rather than coming up with a plan and abstracting all the complicated bits away. And yes, the fact that the file is 420 lines long is very much intentional.
On a side note, I also made a fun little AI that plays the game pretty well (got a score of just above 20k once, if I remember correctly): https://gist.github.com/Rayzr522/142b8e60a87ab7c434f47370f5fb875c
Just paste it in your browser's developer console and it'll start playing :)
## Features
- Randomized asteroid shapes
- Score counter
- Effects such as explosions and screen shake
- Sound effects
- Breathtaking 4K graphics
- Ultra highly optimized performance using latest cutting edge technologies
- Did I mention the amazing graphics?
- True retro vibe with nothing but black and white on the entire web page
- Lots of tweakable settings for those of you who know how to use a dev console :)If you have any suggestions for additions or you have an issue to report, please [create an issue report](https://github.com/Rayzr522/Asteroids/issues/new). Thanks!