Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndabap/ping-pong
Retro game pong written in Go and Websocket as transport
https://github.com/ndabap/ping-pong
go golang javascript websocket
Last synced: 3 months ago
JSON representation
Retro game pong written in Go and Websocket as transport
- Host: GitHub
- URL: https://github.com/ndabap/ping-pong
- Owner: ndabAP
- License: mit
- Created: 2022-09-22T08:06:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:28:09.000Z (10 months ago)
- Last Synced: 2024-10-11T08:18:27.267Z (4 months ago)
- Topics: go, golang, javascript, websocket
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 23
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ping-pong
`ping-pong` tries to be a generic pong implementation, written in Go. It
includes a Canvas engine playable in a browser wit Canvas support.![ping-pong](https://github.com/ndabAP/ping-pong/assets/8510570/86c9569e-9892-4401-a96a-ce63adb6af82)
## How to start
To play in the browser with the Canvas engine, download or pull the repository
to start the backend server:```bash
$ go run *.go -debug
```Then open the frontend at [http://127.0.0.1:8080](http://127.0.0.1:8080) in your
browser. Alternatively, you can use `make`:```bash
$ make play_canvas
```## How to play
The left player is player one, the right player two. There are two supported
inputs available: ↑ moves player one up and ↓ moves him
down. Players get points for goals.## API
You can create your own frontend with the provided API, which consists of
constraints and helpers. After you `go get` the module, import the `engine`
package:```go
import github.com/ndabAP/ping-pong/engine
```To get the module:
```bash
go get github.com/ndabAP/ping-pong
```## Future goals
- Native sound generation
- More retro style (e. g. retro GUI)
- AI-controlled player two