The Unity3D initial tutorial done in Arcadia.
Unity3D is a game engine with a freely downloadable editor and IDE. The first tutorial is here https://unity3d.com/learn/tutorials/projects/roll-ball-tutorial and is a game where you roll a ball around an environment and pickup squares.
Arcadia is an extension to Unity3D that allows you to write your game in Clojure on the CLR.
This repo is the Roll a Ball tutorial in Unity written in Arcadia, with as much a one to one mapping so you can follow it along.
- Download and install Unity -> https://store.unity.com/
- Clone this repo ->
git clone https://github.com/mlakewood/roll-a-ball roll-a-ball
- Install Arcadia ->
$ cd roll-a-ball; ./install_arcadia.sh
- Start Unity3D and open the roll-a-ball project.
- Navigate to the project view and open the
Roll a Ball
scene. You should see a number of game objects including a StartObject - Once Arcadia has started connect the Arcadia Repl.
- Import the
rollball.core
namespace and evaluate. - Run the following code:
rollball.core=> (require '[arcadia.core :refer [hook+]])
nil
rollball.core=> (def start-object (first (objects-named "StartObject")))
#'rollball.core/start-object
rollball.core=> (hook+ start-object :start #'start)
#unity/Object 9812
rollball.core=>
- Press the Play button in Unity and you should get the playfield up and be able to move the ball around with the arrows.