New gears now in the game

This week I’ve been working on a Python script for Blender to procedurally generate the meshes for all the various gears I need.  I’ve also added support in the game for crown gears, which engage with neighbouring spur gears at 90 deg.

Next I’m gonna extend the Blender script so it can generate a rack gear mesh, and then have a go at implementing support for rack gears in the game.

Playable build – new gear physics

Playable build – new gear physics

Gear physics – a bit of a setback

I just realised it’s been ages since my last post!  This is because there hasn’t been anything new in the game to speak of over the last few weeks.  Unfortunately, progress on the project was completely halted when I discovered a serious flaw in my gear constraint implementation.

The problem is, it is only transferring rotational motion between gears, not linear motion.  This works for static constructions with rotating gears, but as soon as the gears themselves move about, it is totally (noticeably) incorrect.  If I can’t fix this, then it pretty much screws up the rest of the game as I have it planned.  So I need to try and get it sorted before proceeding with anything else.

Over the last few weeks I have been digging through Box2D and Bullet code for inspiration, and have tried a few different solutions with varying degrees of success.  I have one idea I’m pursuing at the moment that seems promising, but we’ll see, it may come to nothing.

The good news is, if I can fix this gear physics issue, it’ll fairly easily allow me to add rack and pinion gears (where linear motion is obviously crucial).

Honestly, I’ve been very demotivated by this setback.  The game wasn’t progressing as quickly as I’d like anyway, and this really hasn’t helped.  It’s been a real struggle to keep going.  Hopefully I’ll figure out a solution soon, wish me luck!

Playable build – updated

Playable build – updated

Construction controls update

Over the last couple of weeks, I’ve made a couple of changes to the controls:-

  • After parts have been attached together, you can now cycle their attachments between available types (e.g. rigid or hinge), by hovering over attachments and pressing E.
  • Cloning and deleting entire constructions is now done via a separate menu (accessed by holding Shift + Q).

More rendering improvements and other fixes

Also now in the build:-

  • A load more rendering improvements following on from the previous overhaul.  The main difference being that the sky and distant water are now rendered before everything else, using another separate camera with a much larger far clip distance.  This prevents the horizon line from being clipped out.
  • Time-of-Day upgrade.
  • Reference grid in inventory part preview images.
  • Force zones now slow down objects at world boundaries.
  • A bunch of bug fixes.

Playable build – updated

Playable build – updated

Playable build – updated

Playable build – updated

Alignment indicators

When aligning a selected part to another (frozen) part, prior to attachment, the game now shows where the available attachment points are.  These indicators reflect the type of attachment, either “surface” (e.g. as in block to block) or “interior” (e.g. as in block to axle).  The idea is that this should make it easier to accurately position parts where you want them.

Other stuff

In order to implement the alignment indicators I had to refactor a bunch of code, one side effect of which was that I was able to slightly reduce the per-rigidbody network data by calculating more stuff on the client side.  I also fixed a bug in explore mode, that was causing parts to not spawn.

Playable build – updated

Playable build – updated