For now I'm just going to destroy any falling block that lands on a lift (gadget generally?). Feels like a cop out. I might move on from this and come back to it later if I convince myself it is important to the gameplay.
Don't feel like I'm achieving much. Falling block and lifts = bad news. I can handle one block on a lift OK, but when a stack of block falls onto a lift it gets ugly fast. I could make the falling blocks rigid bodies, but that introduces too many other physics engine issues.
Hit a snag. Currently dynamic objects (lifts, falling blocks, doors) ignore each other collision-wise. This needs to be fixed. I want to be able to push a block onto a lift and have the lift carry it up or down. Try to figure out the best way to go about it.
Added a simple death screen. Needed this to account for being squashed by a lift platform. Lifts now destroy any voxel blocking their travel path. Experimented with voxel fragmentation on destroy and didn't like what I saw. Maybe another day. #godot#voxelgame#indiedev
I want to add elevator platforms. Converted doors into a generic MeshGadgets class for reuse as platforms. Then promptly ran out of steam. #godot#indiedev
And of course it also means I can delete my memory leak hack, which I knew was horrible at time of writing but stubbornly persisted anyway. Had the *it* *must* *work* *NOW* mentality at the time. #godot#indiedev
The upside is that switching lights on/off is very fast and efficient. Which means fast firing circuits can now fire even faster. Once per frame in theory, assuming gadgets in the circuits aren't attempting to write to the chunk each fire. #godot#indiedev
The main drawback of this approach is that the chunk no longer accurately stores light state (on/off). This isn't as horrible as it sounds, as lights switch on automatically based on proximity to player anyway (a big part of the game mechanic). #godot#indiedev
Reworked the lights. Previously they had been voxels. Turn a light on and you need to rebuild the entire chunk (4096 voxels). Instead, I added 2 MeshInstances to the light scene, one of which is emissive. To turn a light on, just set_visible() the correct mesh. #godot#indiedev
The delay gadget is working, but I suspect it needs tweaking. Feels off when the delay is very small. Looks like I need to fix the lights as well. I see some z-fighting going on there. #godot#voxelgame#indiedev
Had to deal with circular activation links. If you complete the circle you trigger a stack overflow, with activate_link continuously called. To fix, gadgets now refuse to activate within 0.2 seconds of a previous activation.
Added a delay "gadget", which simply waits n seconds before firing once. Code was simple, since a delay is actually just a one-shot repeater. I like. If only. #godot#indiedev#voxelgame
Not a lot of progress this morning. Added a couple of .obj models. Improved .obj loader. Realised you can't turn a light off by hacking it (your proximity will switch is back on again). Feels incorrect.
Just refactoring today. Converting switches and repeaters into "gadgets". Removed a fair amount of repeated code in the process. Considering doing the same to doors. Only doors have their own moveable mesh instance to worry about and so are a different type of "gadget". #indiedev
Started working on repeaters. Repeaters fire off an activation signal every n seconds, where n ranges from 0.25s to 1min. Created a parent class called Gadgets which switches, repeaters etc extend. Now have flashing lights. Feels OK so far. #godot#indiedev#voxelgame