Best programming based games

Matt Sheppard picture Matt Sheppard · Aug 25, 2008 · Viewed 102.4k times · Source

Back when I was at school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but I remember it quite fondly, even if I can't remember the name.

Are there any good modern day equivalents?

Answer

Pascal Paradis picture Pascal Paradis · Aug 25, 2008

I used to have a lot of fun coding my own robot with Robocode in college.

It is Java based, the API is detailled and it's pretty easy to get a challenging robot up and running.

Here is an example :

 public class MyFirstRobot extends Robot {
     public void run() {
         while (true) {
             ahead(100);
             turnGunRight(360);
             back(100);
             turnGunRight(360);
         }
     }

     public void onScannedRobot(ScannedRobotEvent e) {
         fire(1);
     }
 }