Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rm-hull/asteroids
Asteroids, written in Go deployed as WASM
https://github.com/rm-hull/asteroids
arcade-game github-pages golang wasm
Last synced: about 1 month ago
JSON representation
Asteroids, written in Go deployed as WASM
- Host: GitHub
- URL: https://github.com/rm-hull/asteroids
- Owner: rm-hull
- License: mit
- Created: 2023-11-25T15:59:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-24T00:02:11.000Z (9 months ago)
- Last Synced: 2024-10-03T12:18:01.195Z (about 2 months ago)
- Topics: arcade-game, github-pages, golang, wasm
- Language: Go
- Homepage: https://www.destructuring-bind.org/asteroids/
- Size: 3.9 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Asteroids
A modern implementation (in [Golang](https://go.dev/)) of the classic arcade game.
![screenshot](./screenshot.png)
The game can be compiled natively and run locally, or cross-compiled into [WASM](https://webassembly.org/) and
deployed to GitHub Pages. Every time a commit is made on the main branch, a GitHub action deploys a fresh version.## Running in a browser
You can play the game online at https://www.destructuring-bind.org/asteroids. A browser with WebGL support is required.
It will run on smartphones and iPads, however there is no support yet for non-keyboard input.## Running locally
Install the `go` binary (instructions [here](https://go.dev/doc/install)), and:
```
go run github.com/rm-hull/asteroids@latest
```## Keyboard Controls
LEFT-SHIFT or SPACE : Fire
← or → : Rotate left & right
↑ : Thrust
F : Toggle fullscreen
P : Toggle pause
Q : Quit
R : Restart
## Strategy
Pick off the asteroids taking care to mop up exploded fragments. After a while an alien saucer may appear, and will
start aiming at you. As you progress through the levels, the asteroid belt gets more dense, and the alien's
shooting accuracy improves. On starting each level, you will have a few seconds of immunity to get yourself out of
danger.There is a "god-mode" which gives you immortality and your weapon is hugely upgraded from the normal salvo of 3 shots.
You'll have to browse the source code to find out how to activate it.## TODO
- Hyperspace
- ~~Extra lives at every 10,000~~
- (Persistent) High score
- Score wraps round at 100,000 (like the original)
- Support different sprite sheets
- Code refactoring / reorganisation / tests
- Custom key mapppings
- Touchscreen support## KNOWN ISSUES
- Fix sound distortion
## References & Attribution
- https://www.classicgaming.cc/classics/asteroids/play-guide
- https://arcadeblogger.com/2018/10/24/atari-asteroids-creating-a-vector-arcade-classic/
- https://mixkit.co/free-sound-effects/arcade/
- https://threedots.tech/post/making-games-in-go/
- https://news.ycombinator.com/item?id=38403111
- https://github.com/sedyh/awesome-ebitengine
- https://fontstruct.com/fontstructions/download/1534627
- https://opengameart.org/content/asteroids-vector-style-sprites