Skip to content

threnjen/game-framework-runners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

game-framework-runners

Project Architecture Diagram with Runners highlighted

The game-runners package provides the transport layer between the game UI and the game logic core. It implements client and server runner interfaces defined in game-framework-contracts, handling HTTP communication, HMAC message signing, metadata management, and retry logic.

Two deployment targets are provided: local (polling against a FastAPI app-server at localhost:8000) and cloud (stub implementations, not yet complete).

Repository Structure

src/runners/
├── local/
│   ├── client_runner.py     # LocalRunnerClient — UI-side HTTP transport
│   ├── server_runner.py     # LocalRunnerServer — logic-side HTTP transport
│   └── metadata_runner.py   # GameMetadataHandler — local game/player metadata
├── cloud/
│   ├── client_runner.py     # CloudRunnerClient — stub (not yet implemented)
│   ├── server_runner.py     # CloudRunnerServer — stub (not yet implemented)
│   └── metadata_runner.py   # GameMetadataHandler — stub (not yet implemented)
└── utils/
    ├── hmacsigner.py        # HMAC-SHA256 message signing and verification
    └── retries.py           # Retry decorator and safe_get/safe_post helpers

Prerequisites

  • Python 3.12+
  • Pipenv
  • Built game-contracts package (see game-framework-contracts repo)

Local Setup

# Build the contracts package first (from game-framework-contracts repo)
make build

# Install dependencies
pipenv install

# Activate the virtual environment
pipenv shell

See docs/LOCAL_DEVELOPMENT.md for full setup and usage instructions.

Usage

Import the runner for your deployment target:

from runners.local.client_runner import LocalRunnerClient
from runners.local.server_runner import LocalRunnerServer

Both classes implement the RunnerClientABC / RunnerServerABC interfaces from game-framework-contracts.

Related Repos

Further Documentation

About

Cloud or Local runners. Client runner is used by Client UI to interface with the app server. Server runner is used by the app server to interface with the Client UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages