Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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