Early this week – I focused on some bug fixes and improvements to the “gate exit” system. Strangely a bug cropped up on the new content map, where a ship (often though not always) wouldn’t exit the gate properly – and it would slowly drift towards the exit and thus hold up other ships in line or worse yet, be smacked into by new ships traveling through the gate at high velocity – sending them far off into space due to the collision.
Though fixed – I’m still not sure what the issue is/was. Seems like a timing glitch because I couldn’t track it down and in debug mode things worked fine (making finding the problem – much more difficult). Still in trying to fix the bug I did some nice improvements to the gate exit system. There is still a ways to go – most importantly getting ships out of gates faster, right now it is a one at a time affair. Improving just slightly would yield good results – since two at a time would be twice as fast
Post that I did some more work towards the new story content, the main result is that I need more art assets, the map is a bit too boring. Speaking of art assets – I got a few very important pieces in, and with them a new type of in game object – the “other” object. The other type of object – doesn’t do anything, but often it is important to have objects that don’t do anything, that you can link to objectives. In this case it is the destroy objective.
I was actually planning on releasing the story content sooner than working on formations, but while waiting for the new assets I decided to start work on the formation system. I wanted to do something major – and I’ve been battling burn out so this felt like a great fit.
It is in a barely functional state. Overall the hard part is done – the formations themselves. There is the line, the wedge, the V (reverse of a wedge), the X, the claw (X with ships being positioned forward in space relative to other ships) and the wall. The wall is actually an X formation combined with a “cross” formation. So post fiddling with the X code adding the wall formation code was very easy There will be some other formations in as well in the future.
There is another formation called the “custom” – which is basically – whatever the positions the ships are in at the time of creating the formation.So if you setup a ship formation manually they’ll maintain that shape if you move the leader. This will eventually turn into – editing the formation in 3D, which I haven’t seen as a feature before in a RTS/space sim so I hope that system is another “oh cool! I always wanted that!” type of a feature in Void Destroyer.
In the beginning of formations – ships bumped into each other – all the damned time. One solution was to intelligently have ships go to formation positions (via a simple – who is nearest loop). Another solution was improved collision detection/avoidance in the “thrust to position” AI. When I added the “thrust to position” AI – I knew eventually I’d use it for formations, and here we are. They “sort of ok” go to their positions now, still needs improvement which will help the AI overall.
To create the formations layouts/positioning I had to do some math figuring out odds/evens and multiples. It wasn’t too bad (I thought it would be harder), but I’m sure someone actually good at math would have done this so much faster than it took me.
Lots of work to do – and lots of little things which means lots of motivation and easy pickings ahead of me during the week days. I plan on putting in lots of neat standard and unique formation related features.