Blog Post

PART 6 – REFACTORING

Well that all looked like a bit of a success then, nice new UI, clicking/bumping noises tamed, handling pad sounds nicely, some pleasing new sound design features, ready to release!

Well not quite. There’s always beta testing to do, and even before I got there I knew there were a couple of things I still wanted to do (really – there ALWAYS is “another couple of things” – when will I learn?).

Here at Channel Robot (making it sound like there’s more than just me here full time…) we (really just me…) use a code generation facility, called “KSP Workbench”. I wrote this about 6-12 months ago. It takes files from Skinman (a UI design tool), reads them and builds KSP source code that (in theory) compiles out of the box. It’s a MASSIVE help, often halving, or better, my effort to get something done. Sadly Slice had started life long before KSP Workbench so it wasn’t set up to work this way. But I’d bitten the bullet early in Slice V4 and remodelled it in Skinman and KSP Workbench. But, again unfortunately, somehow at the end of Slice v4 it had started to play up badly(the only piece of code that ever has thankfully – and in retrospect all my own fault), so given the pressure of time and delivery dates I had reverted to hand-coding only. I knew if this new version was going to be supportable at all I needed to get it back inside the proper workflow. So it was time to push the code I had built back into a shape that KSP Workbench would understand, and to update the Skinman files for the new things I’d put in.

This sort of thing is always a hard decision, because in the end it’s an unknown amount of work for “no-new-functionality”, but I did it anyway. It turned out to be not nearly as bad as I thought, and inside a few days I had the code base working with the design-code generate-customise workflow that worked for me. A win then – but one only I would really ever see. With luck the downstream effects would show up as faster time to develop new stuff, and fix mistakes – – hopefully.

Here’s what KSP Workbench looks like when its finished a build….see how interesting it is being a developer:

kspworkbench_example

Related Posts