EamonnMR / OpenLockstep

Python RTS/ECS framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenLockstep: Networked RTS engine in python

The basic ideas for this project are the twin concepts of an entity/component game architecture and a lockstep network model (as described in the classic paper 1500 Archers on a 28.8. It's data driven and attempts to mess with the data as little as possible so that it's obvious how you get from YAML to game entities. The goal, beyond playing with those concepts (and maybe ending up with a playable PVP RTS) is to leave a foundation that anyone can pick up and use to experiment with RTS concepts - it's a type of game I very much enjoy, and one that I'd like to see continued innovation in.

Installation:

Like most Python projects, you can install the dependancies like this: pip3 install -r requirements.txt

You should probably do this in a python 3 venv.

Running OLS

The client and server should have the same maps, data, and version of the code. The protocol between the client and server isn't meant to be a public API and will not affect the semver. In order to run a singleplayer game, run the server and a single client.

Server

python3 main.py --server

For multiple players, run the server with the --clients n argument to set the number of clients to wait for, then connect that number of clients.

Client

python3 main.py --client

Remote clients can connect with the --port and--host arguments.

Acknowledgements

Graphics

The graphics are DanC's classic Tyrian and HardVaccum collections, under CC BY 3. Much of it is re-used from tweaks I made for Scandium, including the double-sized pixels and the tiled map tileset. I'm a huge fan of these graphics. They're not placeholders-they're final art.

Tech

OLS is written in Python 3. Graphics are displayed with pygame. Yaml is parsed with pyyaml. I didn't want to focus on tile-based game stuff so I'm using some libraries-maps are created in Tiled loaded with PyTMX and drawn with pyscroll. I followed Red Blob Games' pathfinding tutorial for the pathfinding.

About

Python RTS/ECS framework

License:MIT License


Languages

Language:Python 100.0%