Skip to content

Installation Instructions

David Churchill edited this page Dec 31, 2020 · 22 revisions

Prismata AI Compilation Instructions

Here you will find step-by-step instructions to install and use the Prismata AI project on Windows, Linux, or Mac. The Prismata AI is written entirely in C++17. A Visual Studio 2019 project file is provided for Windows users, while a Makefile is provided for Linux/Mac users.

I recommend that all first-time users of this project use the Prismata AI GUI to get familiar with how it operates - it is also a useful debugging tool for experienced developers as it lets you interact with the game engine and AI system in real-time. If you plan to use the GUI, then you need one additional step of installing the SFML graphics library. If you don't plan on using the GUI, then you can skip all SFML related steps below.

A precompiled Windows 10 version of the GUI is available for download here: PrismataAI.zip

Linux Instructions:

  1. Install g++, sfml, and make on your system
    • ubuntu: sudo apt-get install g++ libsfml-dev build-essential
  2. Clone this repo or download the zip file and extract it
    • git clone https://github.com/davechurchill/PrismataAI.git
  3. Navigate to the root directory of the PrismataAI project
  4. Type make to use the included Makefile to compile PrismataAIGUI by default
    • Note: running make -j 8 will compile with up to 8 cores, will be much faster
  5. This will place the executable PrismataAI_GUI inside the bin folder
  6. Change directory to the bin folder cd bin
  7. Run the PrismataAI GUI program by typing ./PrismataAI_GUI

Note: You MUST run the executable files from the bin directory, because it reads the configuration files with a relative path, assuming that the bin is the cwd

Mac Instructions

I was told this worked but haven't tested it myself

  1. brew install sfml
  2. cd PrismataAI
  3. make
  4. cd bin
  5. ./PrismataAI_GUI

Note: You can use any text editor to edit and save the source code files on a Mac, you do not need xcode. I do not have instructions for setting this up to work with xcode, but if you send them to me I will add them here.

Windows Instructions:

  1. Download and install Microsoft Visual Studio 2019
  2. Download the 32-bit version of SFML
  3. Extract SFML to a folder on your computer
    • I recommend a short folder name such as c:\libraries\sfml
  4. Clone the PrismataAI repo or download the zip file and extract it to a folder
    • I recommend a short folder name such as c:\libraries\PrismataAI
  5. Navigate to the visualstudio folder inside the PrismataAI folder
  6. Open the PrismataAI.sln VS solution file in VS 2019
  7. Edit the VC++ Directories so it knows where SFML resides
    • Right Click the PrismataAI project in the VS Solution Explorer
    • Choose Properties
    • Select 'VC++ Directories' on the left
    • Under Include Directories on the right, select the dropdown menu and click 'edit'
    • Replace $(SFML_DIR)\include with YOURSFMLDIR\include and click OK
    • Under Library Directories on the right, select the dropdown menu and click 'edit'
    • Replace $(SFML_DIR)\lib with YOURSFMLDIR\lib and click OK
  8. Add the SFML .dll file directory to your Path environment variable
    • Click Start Menu
    • Type env and click Edit the environment variables for your account
    • Click the Path Variable and click Edit
    • Click New on the right-hand side
    • Type YOURSFMLDIR\bin
    • Click Ok to exit
  9. In Visual Studio, select Debug or Release, then right click PrismataAI_GUI project and click Build. Debug mode is useful for debugging, but is much slower than Release mode
  10. If everything was successful, no errors should pop up
  11. To compile and run in one click, click Local Windows Debugger at the top of VS

Common Windows Errors:

  • If it says SFML\Graphics.hpp not found, you didn't do step 7 correctly
  • If it says DLL not found, you didn't do step 8 correctly
Clone this wiki locally