Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcosentino11/whack-a-mole
An online multiplayer game of whack-a-mole
https://github.com/jcosentino11/whack-a-mole
canvas erlang javascript multiplayer-online-game websockets
Last synced: 26 days ago
JSON representation
An online multiplayer game of whack-a-mole
- Host: GitHub
- URL: https://github.com/jcosentino11/whack-a-mole
- Owner: jcosentino11
- License: apache-2.0
- Created: 2024-06-10T04:41:43.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T02:47:02.000Z (2 months ago)
- Last Synced: 2024-09-30T03:41:41.399Z (about 1 month ago)
- Topics: canvas, erlang, javascript, multiplayer-online-game, websockets
- Language: Erlang
- Homepage: https://josephcosentino.me/blog/whack-a-mole/
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Whack-a-Mole
An online multiplayer game of whack-a-mole.
## Play it!
```
docker run -p 8080:8080 jcosentino11/whack-a-mole:latest
```
then go to `http://localhost:8080/`.## Configuration
Configuration is done via environment variables:
* `PORT`: The application port, defaults to `8080`.
* `APP_ENV`: The environment the application is deployed in, defaults to `dev`.
* `GAME_DURATION_MILLIS`: How long a game of whack-a-mole lasts, defaults to `10000`.
* `PLAYERS_PER_GAME`: How many players are part of a whack-a-mole game, defaults to `2`.
* `BOARD_SIZE`: How many moles to have in a board, defaults to `25`.
* `BOARD_UPDATE_INTERVAL_MILLIS`: How often the moles should move around, defaults to `1000`.
* `MAX_PLAYERS_ALLOWED`: How many players can be connected at once, defaults to `1000`.
* `WS_IDLE_TIMEOUT_MILLIS`: How long the websocket connection can remain idle before the server terminates it, defaults to `5000`.
* `WS_MAX_FRAME_SIZE`: How large a websocket frame is allowed to be, defaults to [this formula](https://github.com/jcosentino11/whack-a-mole/blob/28bf662dfb84906f27b9d080009d52ceee0e2179/src/whackamole_config.erl#L32).## Future Work
* Better matchmaking (e.g. create your own lobby, set game options)
* Make the UI look good, esp. for mobile