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: 4 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 (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:28:09.000Z (about 1 year ago)
- Last Synced: 2025-03-14T15:11:45.089Z (4 months ago)
- Topics: go, golang, javascript, websocket
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 23
- Watchers: 2
- Forks: 3
- 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.
## 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