项目作者: wreien

项目描述 :
A battle system for a turn-based game.
高级语言: C++
项目地址: git://github.com/wreien/turn-based.git
创建时间: 2019-01-07T09:20:54Z
项目社区:https://github.com/wreien/turn-based

开源协议:

下载


Turn Based Demo

This is an experimental turn-based game simulator thingy. Basically trying to
write a turn based battle system in C++, eventually as part of a larger game.

It’s very much a work in progress, so be gentle. Or not. Either way.

Building

Dependencies

This project requires a C++17 compatible compiler. Versions that should work:

  • GCC 8.2
  • Clang 7
  • MSVC 2017

You also need SFML version 2.5; it may be available on your package manager,
otherwise you can download it from their website here.

Finally, you need CMake to generate the project files. I’ve put it at a
minimum version of 3.12; to be honest, earlier versions could possibly work
fine, but I’ve never tried. Shrugs

Actually Building

It’s CMake, business as usual. Ideally, if it finds your installation of SFML
correctly, it should just be

  1. $ mkdir build-dir
  2. $ cd build-dir
  3. $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release /path/to/project/
  4. $ cmake --build .

Replacing the generator as preferred. If it doesn’t find the path to SFML, you
could use ccmake or cmake-gui instead and provide it there, or add
-DSFML_DIR=/path/to/SFML to the generator line.

Renderers

At the moment we default to a console renderer, which doesn’t actually use
SFML, so anything regarding SFML above can be ignored. If you really want to
use the SFML renderer, add -DRENDERER=sfml to the cmake generator step, or
otherwise set the RENDERER value appropriately.

Currently the following renderers are available:

  • console: a 1970’s style text interface. Very bare-bones. (Default)
    • the colour_console branch has a possibly-outdated version with (some)
      colours.
  • sfml: a 2D graphical interface. (Really just a black screen at the moment)

Documentation

The documentation can be found under the doc/ directory, in the form of
LaTeX files. They require a relatively recent distribution of TeXLive to build
correctly. Notably, pandoc currently falls over trying to interpret it.

At some stage a pre-built PDF of the documentation will be available online.
Not yet, though — I don’t have anywhere to put it ;)