I've started working on the system to build machines, which will be a central aspect of the game.

Nothing fancy so far, but I'm making progress. Still need to make wheels that actually roll, add the possibility to lock the direction, and this should already allow building a vehicle.

All in all, I feel this is easier to do with Godot than my first prototype with Unreal Engine.

#Godot #GameDev

A bit of stress testing the system, and already found #EmergentGameplay out of a single non-resizable dumb rectangular part 😉

Here is how you can build a bridge, even though you don't have the right parts, and also that you can't (yet) lift or otherwise move your contraption, and deleting parts is not implemented either.

Which means you have to find creative ways to tilt the orientation of the thing during construction and be careful about the weight balance.

#Godot #GameDev #FluidSimulation

On the technical side, the system is quite simple. The beam part is a small #Godot scene consisting of a rigid body with a box collider and box mesh (placeholder graphics). You can then instantiate this small scene at will.

To attach two parts together, I don't use joints (would be bad for performances and physics engine stability). Instead, I merge the rigid bodies, and add all the colliders as child nodes (and also update the total mass). So, the final bridge is a single rigid body.

But it's not meant to work that way, such a structure should not be a dynamic rigid body. In the final game you'll be able to choose if you want your design to be dynamic (like a vehicle) or static (for a building, a bridge, etc.) Either way you'll be able to add the same parts, be it to make an articulated vehicle or a hangar door, water lock, or anything you can imagine (hopefully).

It's now possible to move and rotate parts after they're placed! I can't say I didn't sweat a little over matrices inversions and multiplications, but now it works!

I don't intend to leave in the final game the possibility to move parts in such a way that they collide and push on other things, but as of now it's quite fun to move the construction by changing its shape.

@youen Getting some Garrys Mod vibes from this. This looks amazing and fun to play with!