We found a great resource for learning to code with a game that uses robots! It’s called RoboCode.
About Robocode
Robocode is a programming and learning game where the goal is to code a robot battle tank to compete against other robots in a battle arena. The name Robocode mash up of the words “Robot code”. The player is the programmer of the robot, who has no direct influence on the game. Instead, the player must write the instruction for the robot, telling it how to behave and react on events occurring in the battle arena. These instructions can also be also known as AI. All battles run in real-time on the screen, so you can see your robot fighting.
Besides being a programming game, Robocode is used for learning how to program, primarily in the Java language, but other languages like C# and Scala are becoming popular as well.
Some schools and universities are using Robocode not only to help teach student how to program, but also for studying artificial intelligence (AI). The concept of Robocode is easy to understand, and a fun way to learn how to program code!
Robocode offers complete development environment, and comes with its own installer, built-in robot editor and Java compiler. This app only pre-requires that a JVM (Java Virtual Machine) to exist already on the system where it is going to be installed. Hence, everything a robot developer needs to get started is provided with the main Robocode distribution file (robocode-xxx-setup.jar). Robocode also supports developing robots using external IDEs (some of which are free) like e.g. Eclipse, IntelliJ IDEA, NetBeans, Visual Studio etc., which supports the developer much better than the robot editor in Robocode.
The fact that Robocode runs on the Java platform should make it possible to run it on any operating system with Java pre-installed, meaning that it will be able to run on Windows, Linux, Mac OS, but also UNIX and variants of UNIX. Note that Java 6 or newer should be installed on the system before Robocode is able to run.
In the browser
We’re trying to find some way to port the app to Web Assembly, so it can run in the browser (without plugins), but we’ll report back more here when we do.