How to build
CodeCraft uses sbt.
Most build tasks are straightforward.
sbt compile compiles the root project,
sbt test runs all the tests,
sbt publishLocal publishes the project to your local ivy repository.
To start a predefined game, run
sbt 'project testai' run.
The project is split into several submodules, each of which resides in a separate folder:
||Simple grid based collision detection.|
||Implementation of core game mechanics, AIs and public API.|
||Root page for autogenerated ScalaDocs.|
||OpenGL based graphics engine, 2D primitives library and models for all game objects.|
||Collision detection and physics engine.|
||Basic webpage that runs a game using the Scala.js version of CodeCraft.|
||Main method to run a predefined game.|
||Various maths and utility functions.|
Within most of the projects, there are three source directories (
The bulk of the code is inside the
shared directories, with only some platform specific code residing in
You need to have the Scala plugin installed.
Project from Existing Sources.. → select root directory →
Import project from external model →
Next → keep default options unless you have a reason to change them →
Tested on versions 15 and 2017.
I don't use Eclipse, but presumably this is relatively straightforward as well. If you figure it out, please make a pull request to update these instructions.