Epic Customizable Tank Battle (Work-In-Progress)
This is an idea I have been working on in conjuction with users @Trimsty and @githubphagocyte in the chat room. It is inspired by the flash game "Bubble Tanks" by Armor Games.
This will be a king-of-the-hill challenge.
Main Idea
The main idea is that a large number of competitors fight each other in a large arena. Each program is the AI of a different tank. These tanks are customizable from a list of available parts which can be purchased, so the competitors can choose how to upgrade their tank as the battle progresses and they earn points.
The Arena:
The arena may be an almost-infinite plane with a light source near the center. Tanks can travel far away, but lose energy away from the light. This is a continuous-space game, so the tanks have locations/directions determined by floating-point numbers.
The Bots:
The tanks are basically circles, with the center point of the tank being the location. There is no collision detection, except that projectiles inside of another tank's radius are considered hits. The tank's size (radius) will be determined by the different upgrades it has, with larger weapons giving more size.
Bots will also have a health level which reduces upon injury from opponent's weapons. The health will start at some number, and the bot dies upon the health reaching zero. As bots kill others and collect points, health can be restored over time.
If a tank goes too long without making progress (collecting points or killing), then it will begin to rust. Rust will slowly damage the tank and kill it. Rust can be eliminated by making progress.
Weapons also need time to recharge, and this time is dependent upon rust and other factors.
The tanks are solar-powered. The farther the tank goes from the light source, the slower it can move, the longer it takes for the weapons to recharge, and the shorter its range-of-visions is.
Bot vision:
A tank's vision range will be determined by the light level. If an object is located in a high-light area, then it can be seen from farther away. An object in a low-light area can only be seen by nearby observers. A tank will be able to see things which are closer than the light level in that object's location. The bot will be able to see other tanks, as well as other features (bullets in-flight, heat-seekers, maybe mines). The information available about other tanks will be that tank's weapons (maybe).
Winning criterion:
Each match will be one single battle-to-the-death involving all of the tanks. The tanks' scores will be the time until death.
It might be that several matches are held with the winner being the contestant with the highest average (or median?) score.
Upgrade system:
Each tank starts with a certain number of skill points (4000) and a certain kill value (10). The tank can spend skill points on upgrades to the various weapons. Once a bot spends points on an upgrade, the transaction cannot be reversed.
When a tank kills another, the victor's own kill value is increase. The killed bot drops skill points on the area which can be collected by nearby bots. The kill value of a bot determines (in part) how many skill points will be dropped upon that bot's death.
Types of weapons:
- Guns of various ranges, strengths, and reload rates
- Lasers
- Mines (proximity and timed)
- Area-effect (damages nearby bots)
- Heat-seekers (costly and very accurate, but short range and low damage)
- Shields (not a weapon, but a form of protection that comes in different strengths)
Additional Notes:
There may be different feature which can be added, such as:
- flashlights which enable bots to see farther in the dark zones.
- self-destruct, which scatters the dropped points across a broader area.
- leech-weapons which steal health
- speed boosts or reductions
Misc.
Some sample code provided by trimsty about skill points and kill values:
class BotsThingy: def __init__(self): self.bots = [] def fatalShot(self, firer, victim): d = (self.bots[firer].points - self.bots[victim].points) / 15 if d < 0: self.bots[firer].killValue -= d else: self.dropPointsAt(d + 50 + self.bots[victim].killValue * 5, self.bots[victim].location) # bot.killValue starts out at 10. # bot.points can be anything that's above 100-ish, I'd say 4000 is good.