HTTPS SSH

Blue / 'Distant Code'

Blue is the codename for a computer game about programmable spaceships on a 2D hexagonal board. The current working title of the game is 'Distant Code'. The final title is not yet decided, and in many places the application is referred to by its project codename, 'blue'. However within the game it is referred to by is working title 'Distant Code'.

IMPORTANT NOTE: The source code on display here, 'blue', 'Distant Code' and it's assets remain the copyright of Daire Stockdale. No unauthorised use of any copyrighted material or intellectual property available through this site is permitted without prior written consent of the owner, Daire Stockdale. Thank you.

More information on this project can be found at http://solosnake.com/distantcode.htm


Building Blue / 'Distant Code'

Clone this repo : https://bitbucket.org/solosnake/blue_public.git

  • Download, unzip and build boost 1.61.0:

    • Windows:
      • Manually download from SourceForge/boost site.
      • Unzip boost into the 'external' folder e.g. to boost_1_61_0
      • From the root folder of the repo run the Windows cmd script windows-build-boost.cmd to build boost.
    • Linux:
      • Run the scripe linux-build-boost: it will download and build boost.
      • The build system requires that you are using gcc49.
        • This is because the compiler name is baked into the boost lib names.
        • You can run the linux-use-gcc-4-9.sh to change your compiler to gcc49, or you can edit the gcc version in CMakeLists.txt.
  • Build the project:

    • Requirements:
      • Windows: Assumes you have Visual Studio 2015, Python 3 and CMake installed.
      • Linux: You can run the script linux-apt-get-deps.sh to try and install the build requirements.
    • Run the build.py script.
      • If the bin directory does not exist it will be created. The results of the build will be copied here.
      • Within the bin directory a build directory will be created. The CMake output will be here.
      • Note that this will do a clean build. If you are developing you might prefer to manually run cmake or make.
    • The bin directory will contain the results of a successful build.py. The filename depends on the current version of blue:
      • Windows: An installer executable file named e.g. Install-blue-0.3.8-win64.exe.
      • Linux: A self extracting Tar GZip compressed package e.g. Install-blue-0.3.8-Linux.sh

Installing Blue / 'Distant Code'

  • Windows:
    • Double-click the installer generated and follow the instructions.
  • Linux:
    • Run the self-extracting shell-script in the directory you wish to install Blue / 'Distant Code' to.

Running Blue / 'Distant Code'

  • Windows:
    • After installing, just find blue.0.3.8.x64 in your start menu and double click it to start it.
  • Linux command line:
    • Use -h to view all options.
    • From within the bin directory containing blue, the following command line should successfully start the game:
      • ./blue.0.3.8.x64 -c -u blue-settings.xml -s . -d . -l 3 (your version number may differ from 0.3.8).

'Distant Code' menus

  • Single Player:

    • The menu system is work-in-progress, howevever to play a game follow the following menus:
      • Click : Play
      • Click Any Save (they are not functional yet)
      • Click Continue Campaign
      • A game will begin.
  • Multi-player:

    • The default configuration is a 2 player game. However the game supports more than 2. To enable more than 2 you will need to edit bin/gui/multiplayer.xml in your install directory and change the 2 in set_num_players( 2 ) to the required number.
    • By default the game is setup for multiple clients all running on same machine: this is because this is a development build and its convenient for me. To connect multiple clients from different IP addresses, you will neeed to know the IP address of the host machine, and edit bin/gui/multiplayer.xml and change the IP address in this line to be whatever the host IP is: set_host_ip( "127.0.0.1" )
    • The host will be connected on port 2013.
    • Start the host and the required number of clients.
    • On the host: Play -> Save0 -> Multi-player -> Host Game.
    • On each client: Play -> Save0 -> Multi-player -> Connect to Host.

'Playing' the game

There isn't much you can do right now except zoom around the board. The bottom menu is placeholder. The default game board is typically populated by a lot of bots: this is intended as a stress test during development. TAB will cycle through other views of the board, and it is possible to click on a bot and inspect the code that it is running.

Moving the camera:

  • Mouse wheel to zoom in and out.
  • Left-click and drag to move the board.
  • Right-click and drag to rotate the board.

Try this:

  • Press TAB until the purple menu bar is displayed. Now press TAB again.
  • Double-Click on any ship that is on the left hand side of the screen (this can be quirky on Linux, the double click code is not completed).
  • You should see a live view of the code that it is currently running.

Known issues

Well, its in development, so there are lots. But one gotcha on Windows is that the game reads from 'hidden' user settings, and sometimes it can be useful to clear these: they are located by default at C:\Users\<YOUR WINDOWS USER NAME>\AppData\Roaming\solosnake\blue-0.3.8. It is safe to delete this file, it is recreated each time you run the application. This file contains lots of settings for the application and thier explanation. You can edit this file to change how the game behaves.


Contact