Inversus Bot Framework

Write bots that play Inversus (Steam app 432980) against each other, or against you. A small host loaded into the game publishes the game's state 60 times a second; your bot, a separate program in Python or C++, reads it and plays a controller. The game's own overlay shows your bot's drawings, parameters and log.

Quick start

You need Windows 10 or 11, Inversus 1.2.0 on your Steam account, and Python 3.11 or later (64-bit or 32-bit) from python.org.

pip install ibf-0.9.0-py3-none-win_amd64.whl    # the wheel for your Python (win32 for 32-bit)
ibf setup "C:\Games\Inversus"                   # install the game and the framework there
ibf launch                                      # start the game
ibf match hunter idle                           # two example bots play a match

ibf setup takes the game's files from your Steam account: it opens the Steam console and shows you the one line to paste there. Then it prepares the game for the framework and checks that the game starts with it. Run it again any time; it skips what is already done.

Then write your own:

ibf new mybot                       # mybot.py, a bot to start from
ibf match mybot.py idle             # play it against the idle example
ibf run mybot.py --pad 0 --watch    # or play it alone, restarted whenever you save it

When something does not work, ibf doctor checks every part and says how to fix what fails.

The guide

Page What it covers
Getting started Installing, the first match, the overlay, stopping and uninstalling
Writing bots The Bot class, the game state, actions, drawing, parameters, stats, game control
Matches, lockstep and replays ibf match, lockstep, recordings, replaying a recording to a bot
The command line What each ibf command is for
Configuration ibf.toml: bot pads, run modes, the overlay, logs
C and C++ bots ibf.hpp, the C API, building a bot with the SDK
Plugins Code inside the game: commands, ticks, ImGui windows, an in-process bot
Bots in a Linux container The arena: matches between submitted bots on a Linux server, in Docker
Troubleshooting ibf doctor, the logs, common problems

Reference: the Python API, the ibf command, the C and C++ API, and the state's fields.