Skip to content
 
 

Repository files navigation

ToME is a rogue-like game.

Screenshot

For help playing the game, see the Player Guide.

For a history of changes, see the Change Log.

Getting Started

Prerequisites

See below for specific distribution-specific hints, if needed.

You will need the following tools installed:

  • CMake 3.15 or later
  • A C++17-capable compiler (GCC 8+, Clang 7+, or Apple Clang from Xcode 10+)

The following libraries are fetched automatically by CMake at configure time via CPM if not already present on your system:

No other third-party libraries are required.

Option 1: Running In-Place

This is currently the recommended option, but it means that you don't 'install' ToME as such, you just run it from the build directory.

To configure for your system, run

$ cmake -B build
$ cmake --build build

You should now be able to run one of the executables in ./build to run ToME. For example, you'd run

$ ./build/tome-x11

to start ToME with the X11 frontend.

Important: The current working directory must be at the root of the source tree for the above command to run -- if it isn't, then you'll get mysterious errors about ToME not being able to find files (at best).

Option 2: Installing System-Wide

To configure for your system, run

$ cmake -DSYSTEM_INSTALL:BOOL=true .
$ make
$ sudo make install

You can now run ToME from anywhere and it will always use the files installed in the system-specific location.

Compiling on Ubuntu

To compile on an Ubuntu install, you'll need at least the

  • cmake
  • build-essential

packages. The following will be downloaded automatically if not already installed:

  • libpcg-cpp-dev
  • libjsoncons-dev
  • libfmt-dev

Note for package maintainers: -DCPM_LOCAL_PACKAGES_ONLY=yes -DUSE_SYSTEM_PCG_RANDOM=yes will avoid downloading deps automatically. See CPM.cmake for more details.

Each frontend requires the additional packages listed below:

  • X11: libx11-dev
  • ncurses: libncurses5-dev

Compiling on macOS

Install the required dependencies via Homebrew:

$ brew install cmake boost

macOS does not ship X11, so the tome-x11 frontend requires XQuartz. Install it with:

$ brew install --cask xquartz

After installing XQuartz, log out and back in so that the DISPLAY environment variable is set correctly.

The tome-gcu (ncurses) frontend uses the system ncurses, which is present on macOS by default. No extra install is needed for it.

Once dependencies are in place, build normally:

$ cmake -B build
$ cmake --build build

CMake will automatically detect which frontends are available and build only those. To check which executables were produced, list ./build/. Typically you will see tome-gcu (ncurses terminal) and, if XQuartz is installed, tome-x11.

Note: The project requires a C++17-capable compiler. Apple Clang (included with Xcode Command Line Tools) satisfies this. Install the tools if needed:

$ xcode-select --install

Compiling on OpenBSD

As of February 2010, the OpenBSD package cmake-2.4.8p2 is too old for building ToME. You may need to compile a newer version of CMake.

If you have X11, then a bug in CMake may cause a linker error when linking the executable. As a workaround, set the environment variable LDFLAGS when running CMake. Example:

$ env LDFLAGS=-L/usr/X11R6/lib cmake -B build
$ cmake --build build

Compiling on Windows using MinGW

The source MUST be unpacked in a directory without spaces in the name.

To configure and compile on Windows using MinGW, use the commands

$ cmake -G "MinGW Makefiles"
$ mingw32-make

About

ToME 2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages