You can utilize whatever computational power you can lay your hands on. Whether it's your laptop or 20-server EC2 cloud to get to the victory.
The set of rules is approximate and will change:
- You can connect to the battlefield and observe at any moment
- You can join the battlefield as a player only before the game starts
- Every tank is placed randomly on the grid of the battlefield
- Every tank has 100 points of energy in the beginning
- When the energy is gone to zero, you can no longer fire
- If you get a bullet with zero energy, you are dead
- Every bullet fired costs 0.1 to 3 points of energy (you decide)
- The more energy a bullet has, the faster it moves and the more energy it will take
- Every bullet hit takes 4 times the energy plus 2 times the energy above 1
- Every collision with the wall takes energy. The exact amount depends on velocity
- Every collision with another tank takes 0.6 points of energy from both
- The game lasts until the last one standing
Installation and use
There's no lengthy installation. At a present stage, you need a Node.js server and a browser with WebSocket support. Webkit-based browsers (Safari or Chrome) should be fine.
To run the server:
$ node server.js
To run the server with auto-restarts on code change (for development):
$ node run_dev_server.js
Once the server is running, connect to http://localhost:8000/ and you should see a battle field with your tank. The game is not running yet. To run the game, either open http://localhost:8000/start in another window or call "app.go()".
From this moment, you can start issuing commands:
turnLeft(deg) turnRight(deg) turnGunLeft(deg) turnGunRight(deg) move(distance) fire(power)
You can have any combination of these depending on what you need.
Fork, branch, fix or implement, make a pull request. As simple as this.
Here's what I plan:
Server side (Rails):
- Game scoreboard
- Accounts and Twitter OAuth
- Uploading of the control scripts to accounts
- Leaderboard with community scores
- Tank control API
- Sample bots