Instructions

Instructions for Running the Project

The project binaries are located in the Binaries folder on the main branch of our Gitlab repository. To extract the build artifacts of the project, unzip both GameBackend.zip and GameFrontend.zip.

On Windows, run GameBackend/WebApi.exe to open the project backend in Command Prompt. Some text should appear, so press enter in the Command Prompt to initialize the game (Fig. 1). After completing this, run GameFrontend/Graphics.exe to run the project frontend. You should see a window pop up (Fig. 2), where you can create a randomized level by pressing the add button (Fig. 3). After choosing a level type, you will return to the original screen (Fig. 4), where you can then select the level you created (Fig. 5).

On Mac OS and Linux, you can follow the instructions on Windows, but run the EXE files with Mono.

Running Project Backend
Figure 1: Running Project Backend
A plus symbol and an upload symbol on a blue background
Figure 2: Running the Project Frontend
List of levels on a blue background
Figure 3: Selecting a Ranomized Level Type
A plus symbol, an upload symbol, and a mini level symbol on a blue background
Figure 4: Main Screen for Selecting or Playing a Level
A digital game of a cave with red and blue avatars plus coins and keys
Figure 5: Running a Selected Game

Instructions for Controlling the Player via Keyboard

  • W/A/S/D: Move Up, Left, Down, and Right
  • I/J/K/L: Attack Up, Left, Down, and Right
  • Q or Enter: Idle State

Instructions for Controlling the Player via Player AI

  1. Choose which language you want to create your AI in
  2. Python
    1. Download the Python API bindings:
      1. `craftai-1.0.0-py3-none-any.whl`
    2. Create and activate a Python virtual environment
      1. To create the environment, run `python3 -m venv venv`
      2. To activate the environment, run `./venv/Scripts/activate` (Windows) or `source ./venv/bin/activate` (Linux)
    3. Install the API bindings package using `pip install <path_to_whl_file>
  3. Rust
    1. Download and extract the Rust API bindings:
      1. `craftai_bindings.zip`
    2. Add to your `cargo.toml` under `[dependencies]`: `craftai_bindings = { path = "/path/to/api/bindings" }
      1. The path should be to the folder that contains the `cargo.toml` file of the extracted bindings
  4. Other
    1. Read the REST API documentations here to learn how to interact with the REST API
  5. Once you can interact with the REST API, develop you AI according to the level/challenge you want to solve.
  6. Run your program as you would run any program in the language you chose (e.g., `python3 ai.py`, `cargo run`)