Game server in python intended for a container

Fred Damstra (Macbook 2015) e4e43d93f4 Simple client added 2 năm trước cách đây
api e4e43d93f4 Simple client added 2 năm trước cách đây
client e4e43d93f4 Simple client added 2 năm trước cách đây
.gitignore 2c32757c97 Started on my own API 2 năm trước cách đây
README.md 6725e10216 Initial commit - Basically tutorial examples 2 năm trước cách đây
requirements.txt e4e43d93f4 Simple client added 2 năm trước cách đây

README.md

Game Server - Containerized Method

A game server to provide simple games, intended for testing of strategies, AI, and general playing around. As such, do not expect strong anti-cheat mechanisms, or really much of anything other than an impartial game server that can run separately from the client code.

Present State

Dreaming it up.

Architecture

All of this is brand new to me, so expect mistakes and amateur moves.

Giving FastAPI a shot. FastAPI inherits starlette, so look into that functionality some day, too. Expects a redis container/cluster somewhere to store data.

API Notes

At this point, almost all operations use POST

Notes for myself

FastAPI recommendation is "if your [function] doesn't have to communicate with anything else and wait for it to respond, use async def instead of def".

Auto Generated API docs are here Schema is here

For curl, you may want to follow redirects:

curl --location http://127.0.0.1:8000/example

Request bodies use pydantic