You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
sxiii c7e5cd437b Update README.md 3 years ago
archive Add new file 3 years ago
.gitignore Add first flask test 3 years ago
Pipfile ++stuff 3 years ago
Pipfile.lock ++stuff 3 years ago
README.md Update README.md 3 years ago
server.py Update server.py 3 years ago
test_game.sh Add new file 3 years ago

README.md

Welcome to the ungleich-game, a geek game engine!

ungleich-game is supposed to be an easy-to-use, easy-to-play and easy-to-extend game framework for geeks.

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)

  • Select a game server
  • Register
  • List challenges - have fun!

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
  • Note3: you can ran sample commands as-is in most cases, as they utilize your user name automatically
  1. Try to access the game server without any argument
http [::]:5002
  1. Register: send a POST request with your username
http POST [::]:5002/register user=$USER
  1. Get challenges
http [::]:5002/challenge
  1. Get a challenge description
http [::]:5002/challenge/RegisterNet
  1. Solve a challenge
http POST [::]:5002/challenge/RegisterNet 'user=$USER' 'network=2a0a:e5c0:101::/64'
  1. Get high score
http POST [::]:5002/points 'user=$USER'

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-.py and add challenges in there
  • Do some magic so all challenges are imported by server

How to run your own game server

Run

python server.py

Testing game

If you want to automatically test the game server, run the ./test_game.sh script included in this directory.

Overview - Security

None at the moment.

Tech stack

The base for building games is:

  • Python3 - The programmming language
  • Flask - web frontend
  • etcd - storing data, games, etcd.

Requirements

Tested packages @ Ubuntu 18.04.3

  • etcd3 (important, version 3)
  • python3-etcd
  • python3-flask
  • python3-flask-restful

Things to solve

  • 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)
  • Write nice code to easily retrieve points per user
  • Sort high score
  • Maybe store all user information in one JSON object?