Welcome to BOTwaR, a game where you must decide your strategy before the battle. Unlike most games where you control the action on the screen directly, in BOTwaR, you write a battle program and then stand back and watch as your program competes against other programs. The last robot standing is the winner.

In BOTwaR, you control a robot by programming it in JavaScript. Here’s a complete example of a battle program (called BOTTOM) that you can challenge:

function main(robot) {
if (robot.isFirstIteration()) robot.moveTo(0,100);
if (robot.atDestination()) {
if (robot.getX() == 0) robot.moveTo(100,100);
if (robot.getX() == 100) robot.moveTo(0,100);
var d =;
if (d > 0.0);

Battle several BOTs in one arena. Comes pre-loaded with several battle programs to compete against and examine (code is included). Code can be edited and debugged inside the game.

Note: This game does not teach you the JavaScript programming language, but it does include examples to get your started. There are lots of JavaScript tutorials on the web.