Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudlena/clong
A fun multiplayer game
https://github.com/cloudlena/clong
game go golang mysql websocket
Last synced: 10 days ago
JSON representation
A fun multiplayer game
- Host: GitHub
- URL: https://github.com/cloudlena/clong
- Owner: cloudlena
- License: other
- Created: 2017-04-11T22:49:53.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T18:25:02.000Z (3 months ago)
- Last Synced: 2024-12-17T08:57:18.254Z (17 days ago)
- Topics: game, go, golang, mysql, websocket
- Language: Go
- Homepage:
- Size: 263 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clong
[![Go Report Card](https://goreportcard.com/badge/github.com/cloudlena/clong)](https://goreportcard.com/report/github.com/cloudlena/clong)
[![Build Status](https://github.com/cloudlena/clong/actions/workflows/main.yml/badge.svg)](https://github.com/cloudlena/clong/actions)A multiplayer game where players have to throw balls at targets from their smartphones.
1. Open `/screen` on any big screen. This is where the game runs. The game should begin to spawn targets.
1. Open `/` on any touch device and swipe forward to launch balls at the targets. Many players can play at the same time.
1. Open `/scoreboard` to get a list of high scores (which updates live).## Resetting Scores
1. Run the following command to reset the scoreboard (replacing `PASSWORD` with your actual admin password):
```shell
curl -X DELETE localhost:8080/api/scores -u 'admin:PASSWORD'
```## Build and Run Locally
1. Run `make`
1. Execute the created binary and visit## Run Tests
1. Run `make test`
## Build Container Image
The image is also available on [Docker Hub](https://hub.docker.com/r/cloudlena/clong/).
1. Run `make build-docker`
## Run on Kubernetes
1. Create a namespace and target it.
2. Define a USERNAME and a PASSWORD for logging in.
3. Define a DB_USERNAME and a DB_PASSWORD for clong to access the DB with.
4. Create a secret called `clong-credentials` as follows:```shell
kubectl create secret generic clong-credentials --from-literal=adminPassword="${PASSWORD}" --from-literal=dbUsername="${DB_USERNAME}" --from-literal=dbPassword="${DB_PASSWORD}"
```5. Insert your host instead of `xxx` in `deployments/k8s/ing-clong.yml`
6. Apply the deployment as follows:```shell
kubectl apply -f deployments/k8s
```## Run on Fly
1. Run `fly launch --config deployments/fly/fly.toml`
## Run on Cloud Foundry
1. Create an SQL database service
1. Modify `deployments/cf/*` to your liking
1. Run `make deploy-cf`