So, turrets… man now I know why most dev’s are so proud to show off “turrets” and how they track scene objects in the game.
I’ve always known how/what to do – it’s quite simple. I’ve written full bone-rig animation systems before.
So – I thought – turrets will be simples.
Oh boy.
To be fair, it’s been made 100,000 times harder (no exaggeration) by the DCG tool I’m forced to use – for legacy reasons. It shall remain nameless, but getting nodes exported with arbitrary orientations without having made any changes is “troublesome” at the best. I slated a man-day over a week for this – it’s taken nearly three man days spread over three weeks.
Anyway – whining aside – I finally have what I wanted. A powerful, flexible, customisable “mount” system which is pretty much 95% in the hands of the author (or modder)!
I’ve created a generic Mount system, which means you can place anything onto anything and give it some properties which the object can pickup and use to configure it’s own behaviour.
So, for a given ship (in this case), I’ve placed several mounts on the vessel – some are turrets for weapons, others are shields, power, engines, etc.
A mount can define a default object to be mounted (ie. turret), and also define what other types of objects it will accept – so you can tell it to only accept weapons, or any combination you like. You can also lock the mount to orient in specific ways, and also restrict it’s angle of movement in a given plane of movement.
In the video – all of the turret, weapon, shield and engine placements are setup and told how to behave by the content author. The game just bolts things on as the markup dictates.
Thus, a modder can do the same. Or, they can add more – or remove them. As can the player in the Hangar.
Because this is “open” and not restricted to certain object types – you can then “bolt-on” extra mounts to a given ship, and add ship upgrades, or bolt on as many bits as you like – effectively configuring your own ship out of spare parts. It should be feasible to allow the player to build a ship from nothing but “spare parts” by creating mounts on nothing but thin air. The trick will be how they can go about it in the hangar, and the UI involved in selecting parts, adding/removing them, etc. And, of course – getting all these spare parts authored!
Engine-pods will align to the ships thrust vector, turrets align to their assigned target, as can sensors.
As long as I can code the behaviour in-game, it can be exposed to the authors/modders/player for them to tweak and play around with.
Again, this is not restricted to ships. Stations will work in exactly the same way. (I don’t like having to code things twice 😉 ). Another future “UI” or game-feature extension would allow you to configure and design a station in a similar fashion.
Anyway, signing off – more UI work next!
Comments are closed.