Skip to content

A battle engine for OGame and its clones with an API for PHP and Python

License

Notifications You must be signed in to change notification settings

patrykstefanski/og-battle-engine

Repository files navigation

OG Battle Engine

A battle engine for OGame and its clones with an API for PHP and Python.

CI

Requirements

  • C99 compiler
  • CMake >= 3.1
  • PHP >= 7.3
  • Python >= 3.6

Usage

Get battle engine executable

There are 2 ways how to obtain a battle engine executable:

1. Use prebuilt executables

You can download prebuilt executables for your operating system in releases page.

2. Build battle engine

Or, you can build an executable yourself:

$ cmake -B build -DCMAKE_BUILD_TYPE=Release
$ cmake --build build --config Release

Run examples

Make sure you specify the correct path to the obtained battle engine binary in the examples. For instance, in example-battle.php you need to replace the path in:

$battleEngine = new BattleEngine('./build/BattleEngine', OG::$unitsAttributes);

After that, you can run the examples:

$ php example-battle.php
$ python example-battle.py