I’m happy to present the first public release of Robo-Reindeer Rumble, a fun little programming game for the holidays.
This game is based on MiniScript, a new scripting language I’m working on designed to work especially well with Unity. MiniScript features a clean syntax with minimal punctuation; a small yet complete set of types including strings, lists, and maps; and a decent library of intrinsic functions.
It is also very easy to extend and embed in a Unity app, which is what led to Robo-Reindeer Rumble!
This is the very first functional release of the game, so options for the deer are pretty limited. They can damage other deer in two ways: ramming into them at least 50% of full speed, or by throwing snowballs with the “throw” function.
For example, here’s a script for a reindeer that turns until it sees an enemy, then charges, full speed ahead!
// Name: Charger
while 1
wait(0.01)
see = look
if see != null then
// see an enemy; don't turn, but run straight ahead
print("CHARGE!!!")
speed = 100
else
// don't see anything, so let's slow down and turn a bit!
print
heading = actual.heading + 5
speed = 20
end if
end while
And here’s one that just turns in place until it sees an enemy, and then throws snowballs:
// Name: Spinner
print("I spin!")
while 1
wait(0.01)
see = look
if see != null then
print("Throw at E" + see.energy + " at " + see.distance + "!")
throw
heading = heading + rnd * 10 - 5
wait(0.5)
else
// don't see anything, so let's turn a bit!
heading = actual.heading + 5
end if
end while
You can copy this code, switch to the game, click the Edit button by any reindeer, and paste the code right in. Use it as a starting point for your own designs, or start from scratch!
Let’s use this thread as a place to share our reindeer scripts — and when it’s not just me any more, I’ll start an almost-daily “king of the hill” style tournament. Can you build a smarter robot reindeer?