GravityBomb is a strategy/puzzle game that pits you against opponents with the objective to destroy any hostile vessels that get in your way. To accomplish that goal, you have to aim your gravity bombs with just the right angle and power to snake your way through a gauntlet of interstellar objects. It is currently being developed by Protodragon Software for release on the PC via digital distribution. GravityBomb is being developed with the XNA Framework and may see future releases on the 360 or mobile platforms.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
RSS Articles

Intro

Hello again, Dragonsdoom here to give you some insight into the mind of the machine. Today I'm going to talk about the AI of GravityBomb and how it pretends to think. I'll be mentioning a couple programming concepts but don't get scared, I have pictures too.

Artificial Intelligence

I spent a week recently on the latest version of the artificial intelligence. In the early stages of my game the AI shot randomly. This was dumb and I replaced it with a more convincing set of code that told the AI to shoot at the edge of a planet's gravitational field. More specifically, it shot at the edge of the center-most planet's gravitational field. It worked perfectly! At least, it worked perfectly on level one:
Image Hosted by ImageShack.us

Pictured: Level 1 with the addition of asteroids.

Unfortunately, it didn't really work on later levels or levels with strange planet types. I can't really ship an AI that only works on the first level, so I talked to a few people and researched some solutions. I arrived at a solution in three parts:

  • I read about genetic algorithms (algorithm means something like ‘instruction list to solve a problem'), which is a type of very abstract problem solving solution based on how real-world genetics work. Genetic algorithms are a type of search huristic and are known for being very effective at quickly garnering a pool of possible solutions, although the solutions they come up with may not be the very best. I ended up implementing something similar, but I think mine is distinctly less sophisticated; it uses brute force techniques more than the breeding techniques genetic algorithms are known for.
  • While I was doing all that, I also rebuilt my game systems to support many simultaneous projectiles and started collecting data by firing a very large number of projectiles ‘behind the scenes‘.
  • I ran into some really serious slowdowns from all the physics calculations and how I was choosing the best shot. I looked into sorting algorithms, a popular field of study for programmers looking to manage data and found a useful one called merge sort to organize all my data in a way that helped me to remove poor quality shots from the list of available shots. I added several other optimizations along those same lines and eventually got the system as it stands today.

Here are a couple of screenshots from along the way:

Image Hosted by ImageShack.us

Pictured: An early test of the firing system. Rather pretty in its way.


Image Hosted by ImageShack.us

Pictured: Slightly later in development. The shots began responding to gravity.


Of course I had to hide everything behind the scenes for clarity, but the end result is very good.

Image Hosted by ImageShack.us

Pictured: Maybe too good.

Collision

So the AI is much better now, even at extremely challenging levels. It shouldn't one-shot snipe you out like you're playing Battlefield 3 on a pro clan-server, but it should serve a fine challenge. A few bonus stages seriously ramp up the difficulty though; I'll leave it for you to discover when the game comes out.

The team behind GravityBomb

The team behind GravityBomb

News

Meet the team! Dragonsdoom explains who works on GravityBomb and how they distribute the developer hats.

Intro Update (Also WormHoles!)

Intro Update (Also WormHoles!)

News

I never expected that my game was going to warrant a page on the Indie DB, much less a release! In this post I will introduce GravityBomb and run down...

Comments
DonBre
DonBre

Cant wait for an download :D

Reply Good karma Bad karma+1 vote
Exeon
Exeon

Awesome, looks similar to Death Star Battles except way cooler.

Reply Good karma Bad karma+2 votes
SpaceMammoth
SpaceMammoth

Hey, author of Death Star Battles here - I agree Gravity Bomb is cooler - Dragonsdoom has done an amazing job.

I am working on a sequel to my game, called "Mammoth Gravity Battles" Indiedb.com which will push this type of game even further - its got 3D gravity, moving destructible planets, multiple weapons and a story mode.

Reply Good karma Bad karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.