SergiiPolokhalo / CodeCraftGame

The CodeCraft programming game.

Home Page:http://www.codecraftgame.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome! Join the chat at https://gitter.im/cswinter/CodeCraftGame Maven Central

This is the official repository for the CodeCraft Programming Game. If you want to know how to use CodeCraft, you should have a look at this tutorial.

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.

Repository structure

The project is split into several submodules, each of which resides in a separate folder:

Project Contents
collisions Simple grid based collision detection.
core Implementation of core game mechanics, AIs and public API.
demos Several small programs for testing and demonstration purposes.
docs Root page for autogenerated ScalaDocs.
graphics OpenGL based graphics engine, 2D primitives library and models for all game objects.
physics Collision detection and physics engine.
scalajs-test Basic webpage that runs a game using the Scala.js version of CodeCraft.
testai Main method to run a predefined game.
util Various maths and utility functions.

Within most of the projects, there are three source directories (js, jvm and shared). This is to allow for compilation to JavaScript using Scala.js. The bulk of the code is inside the shared directories, with only some platform specific code residing in js and jvm.

IDE Setup

IntelliJ 15

You need to have the Scala plugin installed.
FileNewProject from Existing Sources.. → select root directory → Import project from external modelSBTNext → select whatever options you want → Finish

IntelliJ 14 should be similar.

Eclipse

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.

About

The CodeCraft programming game.

http://www.codecraftgame.org


Languages

Language:Scala 98.5%Language:GLSL 1.1%Language:HTML 0.4%