Overview

Incursion

Incursion is a roguelike developed by Julian Mensch. He has kindly released the source he has for some of the later versions. This file is intended for people viewing the project repository where the source code can be obtained.

At this time building is only supported on Windows, using Visual Studio 2013. You should be able to substitute other versions of Visual Studio, or write a makefile if you plan to compile on another platform.

The Incursion website can be found here.

Recent Changes

Click on the bitbucket Source button, and then click on 'Changelog.txt'. This gives a more readable and relevant form of the Bitbucket project's recent activity listing.

Support the development

Want to support development? Want to encourage work on certain aspects?

You can donate money via: Paypal

You can donate bitcoin via: 16F6d1F82qrhXaR67NHczQbu4eUie7QJui

Windows build instructions

Recommended compiler:

Dependencies:

The simplest option is to download the following dependencies archive. It contains all the pre-built files required to get Incursion to build. It just needs to be downloaded and extracted in the right location within the source code -- the compilation instructions below detail this further.

The automated option, which someone who knows about debugging and stepping into linked library code would be interested in, is to use the build.bat batch script which is located with the source code.

To reiterate, the simplest option is the downloadable archive of pre-built dependencies mentioned above, and the automated option is a script that will download them and compile them for you. If you choose to ignore both of these and go your own way, it is going to be difficult for you to compile them yourself, unless you know what you are doing, and you are willing to sort out problems yourself. This will also be the case if you are trying to compile Incursion for a platform other than Windows.

The go your own way option where you compile everything yourself requires you to obtain the following dependencies, and to skip both the simple and automated option (neither of which require you to obtain these yourselves). Some of them like flex and curses are easily obtained on Unix derived platforms.

Compilation instructions:

These instructions are intended to allow you to get Incursion to the point where you can debug it within Visual Studio.

  1. Download and install Visual Studio 2013 Community Edition.
  2. Download and extract the Incursion source code.
    • You can download a snapshot, click on the Branches tab, and download a snapshot of the master branch. This will mean you will need to get the source again to get any changes after the point in time you downloaded your snapshot.
    • You can install Git in some fashion and clone the repository, and pull any changes made after the point in time your clone was made.
  3. Enter the build subdirectory within the Incursion source code.
  4. Ensure that you have the EditorConfig extension installed by doing the following:
    1. It is important you do this if you plan to contribute back changes to me, as it ensures the files are have correct indentation.
    2. Run Visual Studio, perhaps by opening Incursion.sln.
    3. Select the menu option: Tools -> Extensions and Updates.
    4. Select the Online entry from the left-hand side list.
    5. Search for and install EditorConfig.
    6. Exit Visual Studio.
  5. If you are going to take the simplest approach to obtaining the dependencies:
    1. Ensure you have downloaded the build dependencies archive mentioned above, from the bitbucket project downloads page.
    2. Open the archive and look inside it. There is only one entry there, a directory named dependencies, and within that there is a selection of files and directories inside it like include, Win32 and within that libtcod.dll and so forth.
    3. Enter the build subdirectory within the source code.
    4. Extract the contents of the archive here.
    5. You should now be able to locate the build\dependencies\include directory. You should now be able to locate build\dependencies\Win32 and build\dependencies\include. If this is not the case, then you did not extract the contents of the archive into the build subdirectory. Please try again.
  6. Otherwise if you are going to do take the automated approach to obtaining the dependencies:
    1. Download and install the Mercurial command line tools. This is used to obtain the SDL2 and libtcod source code.
    2. If you want to build releases, then do the following:
      1. Download and install 7zip.
    3. If you want Google Breakpad support, then do the following:
      1. Download and install the Git command line tools. This is only necessary if you do not have the git command already installed, and available in your PATH environment variable.
      2. Download and install Python 2.7.
    4. Open a DOS console window, and ensure you are in the top-level directory of the Incursion source code.
    5. Type build.bat -d and hit enter.
    6. Lots of text will scroll past and eventually you will have had the dependencies downloaded and compiled for you, or this script will error and you will have to ask for help.
    7. If you have reached here, you have obtained the dependencies and they are compiled. This will give you not only the same set of files from the simplest approach, but also the accompanying source code.
  7. Open Incursion.sln.
  8. Ensure the Debug configuration is selected.
  9. Look at the Solution Explorer window. You will see four entries: exe_curses, exe_libtcod, lib_incursion and modaccent. One will be darker than the others. This is the one which runs when you start debugging. If the darker entry is not exe_libtcod, then right click on exe_libtcod and choose the Set as Startup Project option to make it darker.
  10. Build the solution. Everything must compile successfully.
  11. Now type build -cs. This will compile the Incursion script library, which defines most of the wonderful gameplay that brought you here.

At this point, you are ready to do some development, or just play the latest version of the source code by debugging it within Visual Studio. Congratulations!

Running the game:

Note that all the files which Incursion.exe requires to run are scattered in a variety of directories, and you cannot just copy the executable somewhere and expect it to work. If you wish to collect the correct set of files, then run build.bat -r. It should create various distribution packages (and archives if you have 7zip installed) under build\packages.

x64 support:

You can compile an x64 build of Incursion. It won't be easy, but it will run without crashing. Will it allow someone to play without crashing any more than the Win32 version does? No idea!

Note that the build will fail unless you can work out a way to get it to use the Win32 build of modaccent, which crashes when run as an x64 binary. Incursion gives a lot of compilation warnings when compiled for the x64 platform, as it is an older project. But modaccent is even older source code which uses some arcane parts of the original C programming standard! Anyone wanting to use x64 builds should not expect any bugs filed about it to be resolved.

Also, the unsupported exe_curses prototype has been disabled for x64. pdcurses only provides a makefile for the Win32 platfom.