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 :)