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.|
||Several small programs for testing and demonstration purposes.|
||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 → select whatever options you want →
IntelliJ 14 should be similar.
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.