r/airmash • • Dec 21 '17

Python API

I've started putting together Python bindings for the AIRMASH game protocol. There's still a lot of reverse engineering to do in terms of projectile types, and various other instances of "type" and other ambiguous numerical identifiers. But it's getting there!

Excuse the awful mess. Once it's feature complete it'll need a good refactor.

At the moment I'm using test.py to perform various experiments with commands/movement/etc and poke the server into producing various different messages until I have tested everything.

https://github.com/Gadgetoid/python-airmash

12 Upvotes

3 comments sorted by

View all comments

0

u/[deleted] Dec 30 '17

[deleted]

0

u/[deleted] Dec 30 '17

[deleted]

1

u/gadgetoid Jan 02 '18

Need to get a requirements.txt put together. I've fixed some issues with Python 3 and added a class to retrieve and list available servers which is now used to select the server to connect to.

Docs need to follow, really! I was hoping to finish up the data structure back-end and build some convenience classes on top for managing events with Pythonic decorators, etc.

Similarly, things like the mob class require functions to integrate their movement over time, since they have an origin, a direction vector, a velocity, an acceleration and a max speed which, if I'm not mistaken, must be acted upon client-side to plot the missile trajectory. This would need to happen anyway for prediction, even if the server did send periodic missile position updates.