Learning With Games

Project RU is a game where players must create their own bots and then face them against each other in combat. The winner is no longer determined by who has the fastest reflexes but instead the player who writes the smartest bot!

It only takes a few lines of code to get started building a bot. After that the code can be as complex or as simple as the player wants!

//define the bot class
var superbot = function() {
 
  //pick a name for the bot
  this.name = "SuperBot";
 
  //the weapons you'd like to use
  this.weapons = ["lazer", "burst", "tracker"];
 
  //and a public method to update the bot
  this.update = function(game, bot) {
 
    //do something here to control your bot for
    //example, move or shoot or look where the
    //enemy bot is positioned
    bot.x += bot.maxSpeed;
 
  };
 
};
;