What is BerryBots?

BerryBots is a programming game. You write a Lua program to control a ship that competes in challenges or battles against other ships. The stage is also a Lua program and it controls many aspects of the gameplay.

How do I write a bot?

User programs are coded in Lua, a lightweight and flexible programming language designed for this type of application, where one program is embedded into another. A few resources to get started:

What can a ship do?

A ship program can...

What can a stage do?

A stage program can...

This looks an awful lot like Robocode / Robot Battle / RoboWar / Logo... ?

I'm a huge fan of Robocode. I've probably spent more time writing Robocode bots than anyone ever. Robocode was inspired by Robot Battle, which drew inspiration from earlier tank battle games... So BerryBots was certainly influenced by Robocode and its predecessors. I think BerryBots brings some cool new stuff to the table. I hope you'll agree. (And by all means, check out Robocode and those other games, too!)

What makes BerryBots special?

First, it's designed from the ground up to run on the Raspberry Pi. You don't need anything besides what comes in Raspbian to get started writing and running your bots with a terminal and a text editor. You should have no problem running matches with a few moderately complex bots at a smooth 60 frames per second.

Perhaps the most unique aspect of BerryBots is the programmable stage. The stage is a user written program loaded at run time, just as ships are. The stage program dictates much of the BerryBots gameplay. You can see a wide range of gameplay styles in the sample stages, and these only scratch the surface of what could be done with the stage API.

Is it safe to run other people's bots?

You should always be careful running any kind of untrusted code on your system. But yes, I've done my best to create a secure sandbox for running BerryBots ships and stages. Specifically:

Can't you make a nonviolent programming game?

I gave some serious thought to avoiding the idea of having bots shoot at each other in any way. I decided that the gameplay dynamics of it are just too interesting to avoid it entirely. That said, I have a couple points to offer:

What version of Lua is BerryBots using?

BerryBots uses a modified LuaJIT 2.0.x, which itself is a highly optimized version of Lua 5.1 with some features of 5.2. The changes made for BerryBots are centered on security and packaging of ships and stages.

Fork me on GitHub