Thanks everybody!
texmex wrote:Oil_boi wrote:The solution was:
- Index all dust and power sources into a table
- Make a globalstep that waits on the table to be filled
- Create a temporary table that indexes through each node of dust at level 0
- Index through each power source and pathfind outwards to lower level dust
- Decode the indexed and calculated tables into vectors and then set all the nodes
- Clear index table and wait again for new table
If you want to look at the code:
https://github.com/oilboi/Crafter/blob/ ... e/init.lua
That is awesome. You're essentially decoupling that calculation from the engine stuff, so using this technique one can imagine offloading the calculation to an external service via the built-in HTTP Requests API.
Maybe that's even a possible solution to calculating stuff happening outside of the active mapblocks. That would certainly be a massive improvement of immersion as Minetest currently plays like The Truman Show in regards to the world feeling ”alive”. Like they say, "if a tree falls in a forest…", that could actually be made to happen.
Thanks for the peppy videos btw, they're inspiring!
Yes that's exactly what is happening since the api was too slow for me to utilize :D
ALSO, I added in a lot more stuff, here is a video:
https://youtu.be/B9PobENTEXA
it's a bit clunky for now, but, I added in buttons, levers, repeaters, comparators, pistons, new dust logic, lights, torch input inversion.
