Skip to content
/ RTanque Public
forked from awilliams/RTanque

RTanque is a game for (Ruby) programmers. Players program the brain of a tank and then send their tank+brain into battle against other tanks.

License

Notifications You must be signed in to change notification settings

andrew/RTanque

 
 

Repository files navigation

RTanque Build Status CodeClimate

What is this? RTanque is a game for ( Ruby ) programmers. Players program the brain of a tank and then send their tank+brain into battle with other tanks. All tanks are otherwise equal.

Getting started guide

Rules of the game are simple: Last bot standing wins. Gameplay is also pretty simple. Each tank has a base, turret and radar, each of which rotate independently. The base moves the tank, the turret has a gun mounted to it which can fire at other tanks, and the radar detects other tanks in its field of vision.

Have fun competing against friends' tanks or the sample ones included. Maybe you'll start a small league at your local Ruby meetup. CLI provides easy way to download bots from gists.

Sound difficult or time consuming? It's not! Check out the included sample tank Seek&Destroy (which is actually fairly difficult to beat with the keyboard controlled bot). Note that it clocks in at under 50 LOC.

This is not an original idea, see influences. There's a lot of resources out there around tank design and tactics that could be applied to RTanque.

How does it look? Here's a video of a battle:

RTanque Demo

Influences

RTanque is based on the Java project Robocode and inspired by other Ruby ports. Thanks and credit go to them both.

Requirements

  • The Gosu library used for rendering has some dependencies. Use the Gosu getting started to resolve any for your system.
  • Ruby 2.0.0 or 1.9.3 (tested on 1.8.7 and 1.9.2)

Quick Start

Make a project directory, init bundler, add the RTanque gem, and create a bot:

$ mkdir RTanque; cd RTanque
$ bundle init
$ echo "gem 'rtanque'" >> Gemfile
$ bundle
$ bundle exec rtanque new_bot my_deadly_bot
$ bundle exec rtanque start bots/my_deadly_bot sample_bots/keyboard sample_bots/camper:x2

Drive the Keyboard bot with asdf. Aim/fire with the arrow keys