Monthly Archives: February 2012

Camera work

The intent was to work on tactical mode enhancements, selection enhancements, a new overhead camera issuing orders, grouping, etc. After I dabbled for a bit with improving selecting (eg: hold down shift to add/remove to/from selected ships), I headed towards putting in an overhead cam.

The idea was that it would work like a standard real time strategy camera, sort of an angel’s eye view of the battle, but I quickly realized that this was somewhat silly idea, why put this “only look down” limit? So I scrapped that idea and took out the few good ideas that came along with the overhead cam, which is a better movement mechanic, basically the player would always want to go forward, but what does forward mean? Forward where the camera is facing? Or forward in terms of the overhead cam, where moving forward is sort of like looking down, but still moving “ahead”. The forward where the camera is facing already has a very intuitive mechanism – zoom. So I put in the “ahead” mechanic and voila much improved map traversal in tactical mode. Also I got rid of the rigid follow system, where you’d have to press F to follow an object then press F to un-follow, instead if the player is following an object, but moves the camera away from the focused object the camera will stop following automatically. Zooming in/out and orbiting the focused object is still ok and would. This automatic un-follow means that there’s less things keeping the player from traversing the map.

The follow mechanic also got a huge improvement, instead of an instant transition, which can be somewhat disorienting, following an object will now have a transition period where the camera flies towards that object than attaches itself to it to follow it. This preserves the distance and rotation of the camera, so it is a fairly nice system. Another less major improvement is that the tactical camera now ignores all roll, meaning that the camera is always “upright” which should be less disorienting on the player.

With these added improvements to tactical I wanted to use the same code on ship mode, so I used it to create a “death camera” – so now when the ship that the player is in is dying, the camera zooms out and sees the ship fly out of control and eventually explode. This meant that there is a time period where the player may not be in a ship – which is a first in the history of this project – this may one day lead to the player controlling something other than a ship, maybe a avatar in a space suit? Who knows.

Almost forgot to mention, the death camera and transitional cameras are optional. So if the player doesn’t want to wait for their ship to explode before moving onto another one, the player can still switch ships, or if the player doesn’t want to wait for the camera to travel from one ship to another the player can just jump into the cockpit/chase/etc cameras.

New weapon type

Been meaning to add this new weapon type for a bit now and am very glad that its in and works fairly as I expected.

Recap – current weapons:
Projectile – flies forward (has a velocity), when hits something does damage. Has a varient called a scatter gun (which is basically a shot gun) which fires multiple projectiles at once in a cone pattern.
Missile – same as projectile, but can turn to track its target. Has a variant called torpedo – which is much less maneuverable, but does more damage.
Beam – instant hit damage over time weapon (continuous while hitting target and has energy) – aka lasers/phasers/etc.

This new weapon type I call “rail gun” – it is is a hybrid between the beam weapons and the projectile weapons. Basically it has ammo like a projectile weapon, but instantly hits like the beam weapon, however unlike the beam weapon it doesn’t do damage over time, it does the damage instantly. This weapon has a variant that can be “charged” – basically the longer you hold down the fire button the more damage this weapon does, and when you release the trigger the weapon fires. The rail gun type weapons can also push objects away, what’s really neat is that because of the physics engine I’m using the objects are pushed away in a “realistic” fashion, so if the rail gun hits an object off center then what happen is that instead of being pushed away, the object spins. Which I think is pretty neat! I bet you’ve seen this in Half Life 2 with the gravity gun and other games, a very cool weapon. The push effect will be especially good versus fighters because of their lower mass, so this could be adapted to a sort of a defensive weapon.

Some interesting things come about the rail gun, because the weapon instantly hits it is un-dodgeable once the weapon platform (ship/station/etc) lines up the shot, therefore I should avoid giving enemy ships this weapon especially early in the game, otherwise this would frustrate the player too much. However giving it to the player at early stages could ease the player into the game fairly well because the non-charged version is easier to use than standard projectile weapons. The instant hit nature is also very adept against missiles and torpedoes.

Very much looking forward to adding this new gun type into the game and having battles with and against it :)

More AI and happenings

I was hoping to be wrapping up the basics of AI and heading into adding another weapon type then working on tactical mode. But there’s still more work to do. Recently I changed over the the save/load system so that it would be compatible with the new AI and it I thought I’d be done with it by now. It is working well for the most part, but when I went to do the same with the trading ship AI I noticed it wasn’t very compatible, so now I’m fighting with it a bit to make it compatible with the AI manager system. Its good stuff all around because this means that the trading ship AI will more modular so that it can be used for other ships – for example ferrying ore from asteroids or cargo pods from destroyed ships. While doing this I was testing the transport ship AI and noticed a few bugs here and there to the gravity drive system, as usual I think I finally have it fixed heh heh…

Speaking of AI I had a really neat moment recently, a drone fighter turned to face its target (while turning off its thruster engines) and then when facing the target the drone hit its afterburner to charge at its opponent. I guess you’d have to be there to appreciate it, but it looked and felt fairly intelligent and dramatic :)

In other news I posted about my project on’s gaming reddit here’s a link I had a good response to it so that made me glad, even got an email with some additional kudos :)

The posting made me realize that its been far too long between iterations, so I have to clean up the current version enough so that its playable and then release it, getting tired of saying: but in the in development build… besides the change log is getting very crowded.