2019-05-26 19:19:58 +00:00
|
|
|
## Welcome to the ungleich-game, a geek game engine!
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
ungleich-game is supposed to be an easy-to-use, easy-to-play and
|
2019-05-26 20:33:28 +00:00
|
|
|
easy-to-extend game framework for geeks.
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 20:33:28 +00:00
|
|
|
It features registration, challenges with dependencies and an easy
|
|
|
|
point system.
|
|
|
|
|
|
|
|
The project name is ungleich-game, as it has its roots at ungleich -
|
|
|
|
the project name might change later.
|
|
|
|
|
|
|
|
## How to play (in general)
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
* Select a game server
|
|
|
|
* Register
|
|
|
|
* List challenges - have fun!
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-12-01 04:56:47 +00:00
|
|
|
### How to play (for instance on sxiii's laptop)
|
|
|
|
* Note: here HTTPie is used; can be replaced by curl or any other http tool
|
|
|
|
* Note2: example with localhost [::] is ipv6 localhost representation
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-12-01 04:56:47 +00:00
|
|
|
0. Try to access the game server without any argument
|
|
|
|
```
|
|
|
|
http [::]:5002
|
|
|
|
```
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-12-01 04:56:47 +00:00
|
|
|
1. Register: send a POST request with your username
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-12-01 04:56:47 +00:00
|
|
|
http POST [::]:5002/register user=sxiii
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
2. Get challenges
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-12-01 04:56:47 +00:00
|
|
|
http [::]:5002/challenge
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-04-14 18:06:45 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
3. Get a challenge description
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-12-01 04:56:47 +00:00
|
|
|
http [::]:5002/challenge/RegisterNet
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
4. Solve a challenge
|
2019-04-14 16:50:42 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-12-01 04:56:47 +00:00
|
|
|
http POST [::]:5002/challenge/RegisterNet 'user=sxiii' 'network=2a0a:e5c0:101::/64'
|
2019-05-26 19:19:58 +00:00
|
|
|
```
|
2019-04-14 18:08:07 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
5. Get high score
|
2019-04-14 18:08:07 +00:00
|
|
|
|
|
|
|
```
|
2019-12-01 04:56:47 +00:00
|
|
|
http POST [::]:5002/points 'user=sxiii'
|
2019-04-14 18:08:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
## Overview - Game flow
|
|
|
|
|
|
|
|
* Users register at a game server
|
|
|
|
* Users play by getting challenges from the game server
|
|
|
|
* Users can see their or all high scores on the main page
|
|
|
|
|
|
|
|
## Overview - Development Flow
|
|
|
|
|
|
|
|
[not yet fully implemented]
|
|
|
|
|
|
|
|
The idea is that there are challenges and each challenge offers:
|
|
|
|
|
|
|
|
* A description
|
|
|
|
* Some dependencies (on something another challenge can provide)
|
|
|
|
* A score ("how difficult it is")
|
|
|
|
|
|
|
|
### How to add challenges
|
|
|
|
|
|
|
|
* Create challenges-<YOURNAME>.py and add challenges in there
|
|
|
|
* Do some magic so all challenges are imported by server
|
|
|
|
|
2019-05-26 20:15:13 +00:00
|
|
|
### How to run your own game server
|
|
|
|
|
|
|
|
Run
|
|
|
|
```
|
|
|
|
python server.py
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
## Overview - Security
|
2019-04-14 16:50:42 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
None at the moment.
|
2019-04-14 17:13:22 +00:00
|
|
|
|
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
## Tech stack
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
The base for building games is:
|
2019-05-11 22:18:03 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
* Python3 - The programmming language
|
|
|
|
* Flask - web frontend
|
|
|
|
* etcd - storing data, games, etcd.
|
2019-04-14 17:13:22 +00:00
|
|
|
|
2019-11-10 13:39:17 +00:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
Tested packages @ Ubuntu 18.04.3
|
|
|
|
|
2019-12-01 04:56:47 +00:00
|
|
|
* etcd3 (important, version 3)
|
2019-11-10 13:39:17 +00:00
|
|
|
* python3-etcd
|
|
|
|
* python3-flask
|
|
|
|
* python3-flask-restful
|
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
## Things to solve
|
2019-04-14 17:13:22 +00:00
|
|
|
|
2019-05-26 19:19:58 +00:00
|
|
|
* Enhance the Challenge class - maybe make it easier for challenges to abort
|
|
|
|
* Enhance the Challenge class - abstract away writing information?
|
|
|
|
* Implement dependencies / providers for challenges
|
|
|
|
* Add an easy to use CLI (Steven might like click)
|
2019-05-26 20:04:59 +00:00
|
|
|
* Write nice code to easily retrieve points per user
|
|
|
|
* Sort high score
|
|
|
|
* Maybe store all user information in one JSON object?
|