Dev update Apr / May – part 1

Sorry for the radio silence over the last couple of months.  Here’s an update on what’s been happening, there’s a lot to talk about, so I’m gonna break it into two parts!

Collision impacts, and damage

I’ve simplified and optimised the construction modification code and the way attachments are handled.  This means that adding or removing parts from large constructions is now noticeably faster, but there’s still more optimisation work to be done in this area.

Being able to quickly break attachments without causing frame rate drops is a requirement for the damage system, and I’ve been revisiting this too, fixing a few bugs that had crept in.  It still needs more work, but above you can see an example of the damage system in action as it is right now.

On a related note, the collision impact sounds have been a source of complaint for some, and I agree!  There are too many collision sounds when parts are merely sliding past one another.  I’m currently working on overhauling the collision impact system to make the sounds behave better, and the plan is that this will improve the damage system at the same time.

Servo and stepper motors

It’s been suggested that you should be able to set the servo motor target to angles greater than +/- 90 degrees, this was a perfectly reasonable request and sounds like it should have been an easy thing to do!  However, due to the way I was interpolating between the servo’s current and target angle, it would always rotate through the smallest possible angle.  Which meant that for a range of greater than 180 degrees it could easily end up rotating in the wrong direction towards the target angle.

I’ve now completely re-implemented the angle interpolation code to work a different way, so that it maintains the correct rotational direction.  Now a servo motor’s max angle can be set to +/- 180 degrees.


Likewise, the stepper motor’s step angle can also now be set up to 180 degrees.  Here are a couple of examples, one with a step angle of 45 degrees, one with a step of 180 degrees.


I’ve also fixed a bug that would sometimes cause a servo motor’s centre “resting” angle offset to be incorrect after loading a saved game.  And finally, I’ve lowered the minimum speed for servos and steppers to 1 RPM, as I think it’s sometimes useful to be able to go that low.