Friday, May 1, 2009

Look Out!

A very early feature request in Fleet Combat Online was for ship collisions. Another request some time later was to be able to battle on different "maps" that have obstacles on them such as asteroids and planets, etc.

Both of these features have just been deployed. When you create a game now, you have the option of selecting a map to play on. As of now, there are only two maps, but I will be creating more. The maps will have asteroids and debris and other things that must be avoided during battle.

Implementing the map required me to do some decent complex polygon collision detection. It wasn't too hard to go from there to detecting collisions between ships as well. So ships can now collide with map obstacles, and each other.

For testing purposes, collisions do not yet cause any damage.

I want to make sure first that the collision detection works and the resulting "physics" of the collision are reasonable. I also want to see how often collisions happen -- are you constantly running into your own ships and the enemy. That might get frustrating if you lost the ships every time you ran into something.

The obstacles will also block projectiles, beams and ship decoys. Fighters however, can fly right through the obstacles -- they are manuverable enough to weave around them more easily. I might change this in the future too I just figured since you can't control fighters directly it might be annoying to have the AI choose a course around the obstacles that causes problems for them.

Also, the AI is only vaguely aware of the obstacles at this time. They will try not to hit them, but they will still fire their weapons when their target is behind an asteroid. So battling the AI around the new maps might not be so satisfying yet, but they will get an update soon.

No comments: