You are browsing as a guest. Sign up (or log in) to start making projects!

9h 48m 20s logged

Project: Core — Devlog -4

soo things since devlog 3:

POWER SYSTEM (ELECTRIC MAYHEM):

we finally got electricity :party: theres now a whole eletric system folder with ports, wires, a diesel engine and a battery.
the diesel gen vibrates when its running (hu hum it is 48k triangles tho), ports light up when you look at them and you place actual cables by clicking port to port like a real electrician (no cap)
also you hold right click on a port to remove a cable (still scared to add a nuclear reactor with these physics but SOMEDAY).
Wires: the wire tool had like 30 compile errors because i was using the XOR operator (^) on gameobjects which apparently is not a thing in C# heheheh. then once it compiled the wires just didnt carry power at all. turns out the generator emits its value ONCE on startup before the wire even exists, and then never emits again because “nothing changed”. fixed it by pushing the value when the connection is made instead of waiting for a change. power flows now (i think).
Smelter: the smelter works! put stuff in, timer, different stuff comes out. integrates with conveyors so production chains exist now (theoreticaly)
drag and drop between inventory and smelter is still a gamble though. Performance patch: game was lagging near the diesel gen and battery. turns out vibrating a mesh with 19.2k vertices every single frame is expensive.
cached materials instead of making new ones every frame and stopped writing transform values that never change.
also found a real memory leak: wires were subscribing to ports and never unsubscribing, so every destroyed cable was eating the game forever.Bug fixes (the usual): wire tool now auto-creates its temp wire so you dont have to wire up the wire tool to use the wire tool, null checks on everything because apparently i hate myself.
current issues:inventory drag is still 50/50 (better odds than a lot of stuff) still two inventory systems coexisting (im scared that if i delete the old one everything will break so ill just make them get married) building snap is still mid. wires look janky and cables dont have a real material yet. whats next:conveyors actually moving items visually, nuclear reactors (the power system is real now so the threat of chernobyl is real), proper build UI instead of scroll wheel
making the drag and drop stop being a crying baby
every time i fix one thing two more break, but now the electricity works AND the smelter works so my factory is basically a machine of machines. still eating me alive but its loopable.

0
8

Comments 0

No comments yet. Be the first!