Installing the KXG Engine

The library is distributed under the MIT license, so it can be used for both open and closed source games, but modifications to the engine itself must be made open source. You can install the library using pip:

pip install kxg

You can also install the library by downloading the source code from GitHub and manually running the script:

git clone
python3 kxg/ install

We recommend making a new virtual environment for each game you write. The process of making a virtual environment and installing the game engine would look something like this:

mkdir my_game
cd my_game
virtualenv -p python3 env
./env/bin/pip install kxg


The kxg game engine depends on a handful of libraries and works seamlessly with libraries that facilitate different aspects of writing games. The engine’s biggest dependency is python3. It also requires the following libraries:

  • pyglet — A powerful OpenGL API. The game engine makes use of pyglet’s main loop, which is quite full-featured.

  • linersock — Convenient wrappers around bare sockets that the game engine uses to communicate over the network.

  • nonstdlib — A collection of short and generally useful utilities.

  • pytest — An easy-to-use and easy-to-debug-with unit testing framework. Only needed if you want to run the unit tests.

All of these libraries will be installed automatically by either pip or the script.