#gamedev #game-state #ffi #api-bindings

epicinium_lib

Rust bindings for libepicinium, the game logic library of the strategy game Epicinium

8 stable releases

1.1.0 Jul 12, 2021
1.0.12 May 17, 2021
1.0.11 Mar 12, 2021
1.0.10 Jan 4, 2021
0.35.1 Sep 16, 2020

#755 in Game dev


Used in epicinium_server

AGPL-3.0-or-later

1MB
34K SLoC

C++ 33K SLoC // 0.1% comments Rust 1K SLoC // 0.2% comments

Rust library bindings for Epicinium

Rust bindings for libepicinium, a library containing the core functionality of the strategy game Epicinium. This library implements Epicinium's game logic to load maps and calculate subsequent game states.

The rest of Epicinium will be open-sourced in the near future. It will also be coming soon to Steam.

Epicinium is being developed by A Bunch of Hacks, a worker cooperative for video game and software development from the Netherlands. Contact us at info@epicinium.nl.

Contents

  • src/ defines idiomatic Rust bindings for the C foreign function interface of libepicinium
  • epicinium/src/build/libepicinium.cpp is the C++ implementation of libepicinium
  • epicinium/src/logic contains C++ source files for Epicinium's game logic
  • epicinium/src/ai contains C++ source files for Epicinium's artificial intelligence
  • epicinium/src/common contains C++ source files for various utilities used in Epicinium
  • epicinium/libs/jsoncpp contains C++ source files for JsonCpp, a dependency of Epicinium
  • epicinium/libs/plog contains C++ source files for Plog, a dependency of Epicinium
  • epicinium/Makefile is a copy of the full Makefile used to compile Epicinium
  • epicinium/.config.make defines additional flags passed to the Makefile
  • the build.rs build script calls the Makefile to compile a static library of libepicinium from its C++ source, which is then linked by Cargo with the Rust bindings

External dependencies

License

This library was created by A Bunch of Hacks. It is made available to you under the AGPL-3.0 License, as specified in LICENSE.txt.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License (AGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

  • Epicinium, the full source code for Epicinium
  • Epicinium documentation, which includes a wiki and a tutorial for Epicinium
  • Epicinium-NeuralNewt, a libtorch framework for training (partially) convolutional neural networks to play Epicinium via NeuralNewt, a parameterized decision tree AI, with evolutionary training techniques
  • Epicinium-NeuralNewt-automatonlib, a precompiled C++ library with Epicinium logic for Epicinium-NeuralNewt

Dependencies

~0.7–1.7MB
~37K SLoC