Repository navigation
Python Overview
Eric Froemling edited this page Mar 29, 2020
·
65 revisions
Ballistica consists of two layers; a low level layer written in C++ and a high level layer written in Python. Things such as rendering and physics calculations happen in the low level layer, and things such as game and ui logic happen in the Python layer. For modding purposes, the Python layer is the only really relevant one (at least for now).
This is a high level list of some of the tech changes in Ballistica vs the original BombSquad scripting layer. For detailed changes you can look at the ChangeLog, though admittedly not all Ballistica changes made it in there. In future incremental updates that list should hopefully be more exhaustive.
- Ballistica is now using a modern version of Python (3.7 at the time of this writing), whereas the old code was 2.7. There are some fundamental differences between Python 2 and Python 3 to be aware of such as the print() statement and new string types. There is plenty of information available about porting code. One thing to keep in mind is that Ballistica should always be using a single version of Python on all platforms it supports (currently 3.7) and so you are completely free to use all of the features supported by that version; you do not need to worry much about backwards compatibility.
- Ballistica's APIs have been reshuffled a bit and split into several Python packages containing a hierarchy of smaller, more maintainable modules. See the Python Package Overview section below for details.
Testing
ballistica.net • discord • blog • support