Re-sizable parts
As I mentioned before, I wanted to try having re-sizable parts as a way to make selecting which part to spawn more manageable for the player while at the same time having a greater choice of part sizes and material variations available. Over the past month I have been working on prototyping and building this feature, and it’s now in the latest build and working pretty well I think. Beams, plates, axles and slider rails are all now re-sizable to a range of different sizes, eliminating the need for a separate entry for each different size in the spawner menu.
To achieve this, I implemented code to procedurally generate the render meshes for these parts rather than use pre-made meshes. Also, I had to modify the construction controls slightly to allow the player to easily re-size parts. Figuring out how to nicely integrate the controls for re-sizing with the existing control scheme actually took most of my time. I explored a few different ideas, but I’m fairly happy with what I ended up with.
Re-sizable parts can be identified in the part spawner menu as the ones with the +/- icon in the top left corner of their preview images. Parts can only be re-sized if they’re not currently attached to any other parts. If something is already part of a construction you have to detach it first, re-size it, then re-attach. Any existing saved games will be automatically converted on load to use equivalent re-sizable parts in place of the old fixed size ones. Let me know if you have any problems with an old saved game not loading properly, but hopefully I have covered all of the cases!
Construction controls changes
Note that the following only applies when a construction is currently selected by the player:-
- Hold shift + move mouse (used to be shift + WASD) – Translate the selected construction relative to the cursor.
- Hold shift + directional keys (WASD) – Re-size the selected part, as long as it’s not attached to any other parts.
- Hold Q + left click (used to be shift + left click) – Attach the selected construction (if it’s currently being aligned to some other frozen construction), after first cloning it.
Soon, I’ll make a video to go over the new controls and part re-sizing in more depth, so watch this space!
Next steps
An often requested feature is to have flexible key bindings for controlling part behaviours (e.g. motors, servos etc.), rather than only being able to use the directional keys. For a few different reasons that I won’t get into now, this is not as easy to do as you might think. To facilitate this, I need to overhaul the input system somewhat, so this will be coming up on my horizon soon.
I also want to introduce a painting tool to allow the player to easily change the colour of beams and plates. I think this will be big improvement to the creative flexibility afforded in the game, but I’m not quite sure how it’s going to work yet. Something I’ll hopefully be looking at soon.
Finally, to support some more complex parts I want to add down the road, I need to totally rework the current system I have that decides which types of parts can be attached with other parts, in order to make it a lot more flexible.
So…lots to do!