Contraptions

Contraptions

•  •  10 updates •  15h 28m

An attempt at a little physics sandbox where you can build little machines. Made using C#, Raylib, and Box2D and inspired by TOTK, Bad Piggies, and Minecraft's Create Mod.

By logabe

Timeline

logabe
logabe 41m spent working 70d ago

unfortunately i had to roll back to a previous build to avoid the game crashing... hopefully tomorrow I'll have time to figure out whatever's going on... anyway, it's shipping time!

logabe logabe 2 months ago

I didn’t know there would be an extension aaaaaaa
Anyway, I ended up sorting out the issues with WASM, so the build works fine now. I’ve also added a concrete, which is very heavy and can be used to make static structures.

logabe
logabe 20m spent working 70d ago

Regressing to an earlier dotnet version let me build for WASM, and now I've got the game running in a element. The only problem is that trying to place a fan seems to crash the program...

Update attachment
logabe
logabe 30m spent working 70d ago

Attempting to get the project compiled to WASM, Raylib seems to be loading fine but then immediately crashes :(

logabe
logabe 1h spent working 71d ago

I added a preview to show the direction of the fans. Given that there's only one/two days left in Journey, I'm wondering how much stuff I can add before I need to start getting ready to ship...

Update attachment
logabe
logabe 31m spent working 73d ago

Added a hopefully extensible system for placing different kinds of blocks using C#'s Type class. It feels a bit weird but hopefully it will work out fine. Next thing up is a way to change the direction of blocks with rotation (like fans).

Update attachment
logabe
logabe 2h spent working 73d ago

Added a fan that will push the structure in one direction. Now I need to figure out a system to handle different block types...

logabe
logabe 4h spent working 79d ago

You can now remove structures by middle clicking. I want to make it so that you can remove individual blocks, that requires some complicated logic to detect whether the structure is now two or more separate structures. If I have time I'll hopefully be able to add it.

Note: If the time stats seem unreasonably high, it's because I hadn't synced Hackatime in a while - that's the time spent in total over the last few updates.

logabe
logabe 15m spent working 81d ago

I've added a preview so you can properly see where your block will be placed, as well as fixed some issues in the block placing code to make it consistent with the preview.

Update attachment
logabe
logabe 1h spent working 83d ago

I finally cleared up the issue I've been trying to deal with for the past few days. A mistake in how I was initialising the box2d fixtures meant that some blocks were being drawn but didn't actually have collision setup. But now the structures can fall around and collide properly which is nice.

Update attachment
Neya Neya 3 months ago
wow i really like this
logabe
logabe 3h spent working 89d ago

Okay, here's what I have so far.
You can place blocks on a grid and they'll be organised into connected structures. Each structure is assigned it's own Box2D body ( just static at the moment). For testing purposes there's also a floor and a ball that will bounce around and collide off of the structures.

Neya Neya 3 months ago
ooh can I see a photo :)