Build the best; destroy the rest

By John K. Waters

12/17/2001

IBM has come up with a novel way to help budding Java jocks develop their coding chops. It's called Robocode, and with a reported 80,000-plus downloads, it is a certifiable craze—at least in IT circles.

Available on IBM's alphaWorks Web portal site since July (2001), Robocode is a game that teaches the Java programming language by helping users to create Java "Robots," real Java objects that battle it out onscreen against other robots. As users play the game, they learn to write Java code, handle events, create inner classes, and other coding skills.

According to the folks at alphaWorks, Robocode uses a custom security manager to allow custom Java classes written by anyone to run safely on most systems. These classes extend a robocode.Robot class, exposing methods such as ahead(100), turnLeft(90), and fire(1) to allow the object to interact with the game.

The bots take the form of battling tanks, the multicolored graphics are good, and it has the feel of a combination of Logo and CoreWars. Bots with names like Shorrockin, Rapture, SquigBot, and Wolverine, reside in Robocode repositories.

Veteran programmer Mathew Nelson developed the project. Nelson joined IBM in 1991, and he calls Robocode a "pet project" that combines two of his passions: computer gaming and programming. Based in Cambridge, MA, Nelson is currently a Staff Software Engineer in IBM's Internet Group.