Voidious
Posts: 15
Joined: Mon Aug 20, 2012 8:05 pm

BerryBots - a programming game

Sun Jan 20, 2013 10:19 pm

Hey guys - I wrote a programming game for the Raspberry Pi called BerryBots (berrybots.com). It's along the lines of Robocode or Logo/Turtle, with the bots programmed in Lua. It's also available for Mac/Linux and soon Windows.

I'm a big Robocode guy (I help run RoboWiki.net) and I know it's used a lot in education. But Robocode, and Java in general, runs really poorly on the Raspberry Pi. So I started out with the goal of writing a lightweight Robocode-ish game that would run well on the Rpi, but it really grew into something unique and I'm pretty happy with it. If you know Robocode, I wrote up a rules comparison vs Robocode that might be helpful.

A few cool things about BerryBots for educational use:
  • Fast and lightweight - Runs pretty fast on the Raspberry Pi. Can maintain 60 fps with a few moderately complex bots. Likewise, performance should be good on old/slow Linux machines too.
  • Programmable stages - A big issue with Robocode is students plagiarizing strong bots (like mine :)) off the internet. A teacher could easily write a custom stage for BerryBots, making it impossible to copy a bot off the web, as well as catering to whatever programming aspects they want to teach (eg path finding, classification algorithms). To give an idea, check out the Sample Stages, which show off a bunch of different styles of gameplay. This also means you can scale the difficulty of the stage to the programming level of the students, or have them write stages instead of bots.
  • Simple APIs - The APIs and game rules are pretty simple. I think they're a lot simpler and more intuitive than Robocode.
Hope you like it! I think the Rpi version will stick with launching single battles from the command line, since it seems appropriately minimal and lightweight for the Raspberry Pi, but I'm also working on a full GUI version for Mac/Linux/Windows.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BerryBots - a programming game

Sun Jan 27, 2013 10:35 pm

JAVA?

When I learned ROBOCode in 1989 it was an intepreted language with the interpreter written in assembly.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BerryBots - a programming game

Sun Jan 27, 2013 10:39 pm

Ok I just looked trough some examples, and it does apear to be the same thing as the ROBOCode that I learned, though reemplimented using Java Script (YUCK) and less capable
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Voidious
Posts: 15
Joined: Mon Aug 20, 2012 8:05 pm

Re: BerryBots - a programming game

Sun Jan 27, 2013 10:43 pm

With such a generic name, I'm not surprised there are other "Robocode"s. =) But I'm referring to http://robocode.sourceforge.net, which was released by IBM in 2001 and still going strong. Definitely one of the most popular programming games. See http://robowiki.net, the main online community, and http://darkcanuck.net/rumble for the current competition rankings.

There are some other "BerryBots" references out there too... The funniest I've seen was as a derogatory term for Obama supporters. =)

Not sure what you're looking at. There's no Javascript in BerryBots or the Robocode I'm referring to.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BerryBots - a programming game

Sun Jan 27, 2013 10:56 pm

As stated above:
I just took a bit to look at the ROBOCode that you are reffering to and see that it is esentialy the same thing just made less capable, and reworked in JAVA (Yuck).
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Voidious
Posts: 15
Joined: Mon Aug 20, 2012 8:05 pm

Re: BerryBots - a programming game

Sun Jan 27, 2013 11:04 pm

Ok. Actually, above you stated "Java Script", so I thought you were looking at the wrong game.

Anyway, apologies for mentioning a programming language you don't like. My post was primarily intended to be about BerryBots, which is coded in C/C++ with bots and stages in Lua.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BerryBots - a programming game

Sun Jan 27, 2013 11:45 pm

Ok and my apologies about the miss type above. I have been having trouble with sites requiring JS so I got accustomed to typing that. I did mean JAVA.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: BerryBots - a programming game

Tue Jan 29, 2013 12:06 pm

That's really nice. A "mildly reduced feature set" robocode is pretty good, looks like it cuts out a lot of the minutae of robocode. Lua's a much nicer language to use, as well.

Voidious
Posts: 15
Joined: Mon Aug 20, 2012 8:05 pm

Re: BerryBots - a programming game

Tue Jan 29, 2013 3:36 pm

Thanks! Lua's actually quite new to me, but I'm really digging it. The language itself is nice, it's perfectly suited for this type of usage (host app safely running/interacting with user written apps), and with LuaJIT it really flies too.

Return to “Staffroom, classroom and projects”