-
Notifications
You must be signed in to change notification settings - Fork 1
Building and running the engine for MacOSX
We'll be using the Homebrew package manager to compile and build the files. You'll also be needing clang for compiling, which should already be on your machine if Xcode is installed.
Install the needed packages:
- glfw - For graphics, input, and window handling
- chicken - For lisp scheme scripting
% brew install glfw chicken
Install the needed dependencies for scripting:
% chicken-install -v bind
Clone the repository and enter the directory:
% git clone [email protected]:accidentalrebel/rebel-game-engine.git
% cd rebel-game-engine/
You'll need to create some directories to be used for builds:
% mkdir tmp libs output
Build the engine as a library:
% make build PLATFORM=macosx
Run the engine (Runs whatever code is in scripts/game.scm
):
% make PLATFORM=macosx
Congratulations, you are now ready to start working!
Note: To avoid having to specify
PLATFORM
every time you make a build, you can change the variablePLATFORM=
inside theMakefile
.
If you experience errors after running make PLATFORM=macosx
like the ones below:
Failed to create glfwWindow
Failed to initialize GLAD
../scripts/rebel.scm:23: ##sys#make-c-string
Check the file in src/core/window.cpp
and make sure that the line in line 15
is UNcommented.
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
And then build again and call make
% make build PLATFORM=macosx
% make PLATFORM=macosx