-
Notifications
You must be signed in to change notification settings - Fork 134
Native Layer Overview
Ballistica consists of two layers; a low level 'native' layer written mostly in C++ and a high level layer written in Python. While the high level layer is generally more interesting for modding purposes, most of the low level layer source code is publicly available too for those so inclined to mess around with it.
While the easiest way to run Ballistica is to use the prefab Makefile targets, which use completely pre-built native layer binaries, it is also possible to compile most of the native layer from the source files contained in this repo.
First, a few caveats:
- Some portions of the game/engine source remain closed; namely parts dealing with sensitive areas such as user accounts, network protocols, etc. The build pipelines here will automatically fetch precompiled libraries for these parts (you may notice names such as libballisticacore_internal.a) and the rest will be compiled locally. I will work to minimize the parts that need to be kept closed, and in the future I hope it will become possible to compile and run a 100% open-sourced version (perhaps with some functionality missing).
- Building from source is only supported on a few platforms currently (see below for specifics). Hopefully this can expand over time. However note that any contributions made here will make their way back to all supported platforms (provided they apply to cross-platform portions of code).
Builds for unix type systems have been set up using the CMake build system. These should work on x86-64 Mac, arm64 Mac, x86-64 Linux, and to a degree under x86-64 Windows (Linux builds via WSL). Other platforms/architectures may partially compile but will fail due to the lack of a precompiled 'ballisticacore_internal' library.
- First off, make sure you have completed the platform setup in Getting Started and are able to run prefab builds successfully.
- Now, from the project root, simply run
make cmakeormake cmake-serverto build and run the full game or the server. - Run
make helpand check out the 'CMake' section (or just look in the Makefile) to see what other related make targets are available. - The 'CMAKE_BUILD_TYPE' environment variable can be set to 'Debug' or 'Release' to influence the build type (Debug is default). So to compile and run a release-mode server, one could do:
CMAKE_BUILD_TYPE=Release make cmake-server
ballistica.net • discord • blog • support