-
Notifications
You must be signed in to change notification settings - Fork 3
Dev Environment setup (Linux, Mac Desktop only)
This document's purpose is to provide a high-level understanding of how Modite Adventure work. Programmers wishing to get involved should review our contributions guidelines as well as have a decent understanding of C++ and build tools.
We highly recommend using the CLion IDE to develop the project and run the builds.
Modite Adventure is a cross-platform a orthogonal adventure/puzzle created by Modus Create for the 2019/2020 holiday season. Modite Adventure runs on the LDK Game, macOS and Linux (x86, ARM and MIPS).
Modite Adventure, this game.
Creative Engine is the game engine developed by Modus Create. It implements LibXMP and SDL libraries.
LibXMP is a fantastic cross-platform library for playing music using the Xtended Module (XM) format and also has additional functionality to play sound effects.
Rcomp is a CLI tool that takes any binary resources and packages (graphic, audio, etc.) them into a binary blob to be included in the game executable and is part of Creative Engine.
SDL is a cross-platform low-level media layer framework. Creative Engine generates audio data with LibXMP and feeds it into the SDL2 audio run loop and does similar to present visuals in the application window as well as poll for keyboard input to allow for game play.
Let's get setup for desktop and device development. To do so, we'll need to ensure that we have the right libraries and tools installed.
We're going to get setup in a few phases:
- Clone appropriate repos
- Modite Adventure (Game code -- Abbreviated as
MA
) - Creative Engine (our game engine -- Abbreviated as
CE
) - Modite Adventure Resources (Images, sound -- Abbreviated as
MAR
)
- Modite Adventure (Game code -- Abbreviated as
- Install prerequisite libraries & compiler tool chains
- a) Mac
- b) Linux (Desktop)
The first thing we need to is create a folder that will contain Modite Adventure, Creative engine and our resource repos. When we're done, the folder structure will look similar to the following. projects/ |-modite-adventure/ # Source for Modite-Adventure |-creative-engine/ # Source Creative Engine |-modite-adventure-resources # Source files for binary resources (Images)
Let's clone the repos:
# Would be within ~/projects or similar
git clone git@github.com:ModusCreateOrg/modite-adventure.git
cd modite-adventure
# Inored by .gitignore for modite-advenutre
git clone git@github.com:ModusCreateOrg/creative-engine.git
git clone git@github.com:ModusCreateOrg/modite-adventure-resources.git
# Create symbolic link for resources
cd src
ln -s ../modite-adventure-resources/resources resources
- Install XCode desktop
# This is for the CLI tools only
xcode-select --install
- Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install final dependencies via Homebrew
# Run this command from modite-adventure/
brew install
scripts/build.sh # Build Modite Adventure
open build/Modite.app # Run Modite Adventure
In the event you need to build the project manually
# Run from within modite-adventure/
rm -rf build && mkdir build
cd build
cmake ..
# replace 4 with however many threads you have available to you on your processor
make -j 4
open Modite.app
The Debian based build, usable on Debian Stretch and Ubuntu 16.04+, will install development tool dependencies and complete the build in one step.
Running the build.sh
script will download all development dependencies, including libsdl2-dev
, libsdl2-image-dev
, development tools including g++
, and will install cmake
from either a precompiled binary or from source if a binary is not available for your architecture.
- Build and run Modite Adventure
# Run this command from modite-adventure/
scripts/build.sh # Build Modite Adventure
build/Modite # Run Modite Adventure
In the event you need to build the project manually
# Run from within modite-adventure/
rm -rf build && mkdir build
cd build
cmake ..
# replace 4 with however many threads you have available to you on your processor
make -j 4
open Modite
Read about GitHub workflow at the creative-engine repo.
The gist is that we fork the main repos and work in our private forks. We push to our forks. We create Pull Requests against the main repos.
The only way code makes it into master in the main repo is if we merge a PR.