6r1d / minetest_new_glass

New glass mod for the Minetest game
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Scintillation #8

Open 6r1d opened 4 years ago

6r1d commented 4 years ago

Idea:

Previously, @zbx-pandorabox wanted to have a good radiation-blocking node in #5 . Gold still solves this issue and I had an idea about the radiation that can spice up the game.

How? Well, in real world we have dosimeters and (mostly) more advanced tools which use light to calculate radiation and its properties.

The crystal inside one looks like this:

It makes me think about a block that incercepts radiation, maybe even as much as gold does, but glows or pulses when it's there.

Crafting:

Iodine can be extracted from seaweed, we have kelp. (We'll need heaps of kelp in this case.)

Current salt recipe is based on the fact we are evaporating the sea water. It's possible to separate caesium from this kind of salt, after all, that's how it was initially obtained. I'd say the best is to start with tiny crystals (like mese / obsidian shards), allowing users to craft larger ones.

Implementation:

We currently have this radiation code.

As far as I understand it does some caching, so instead, our scintillator block should look around for a certain group. I am thinking about minetest.find_nodes_in_area_under_air(pos1, pos2, {"group:radioactive"})

SwissalpS commented 4 years ago

would need a way to group calls to find_nodes.... If Players wrap the entire reactor with these, it should not cause each one to search the area, the search would have to be done for the whole group.

6r1d commented 4 years ago

If Players wrap the entire reactor with these, it should not cause each one to search the area, the search would have to be done for the whole group.

I have looked at jumpdrive backbones for reference (jumpdrive.fleet.find_engines), but the search is computation-heavy. The question there is how often do we update the state of surrounding radioactive blocks. @S-S-X pointed the choice between timers and ABMs. I feel like node timers are better for this task, because we can control the next firing time from the code, but I can be wrong. In addition to other factors, the {"group:radioactive"} block radiation needs to be determined.

Some progress:

UPD: scintillator code will be in this branch for now.

SwissalpS commented 4 years ago

looks nice. After yesterdays chat on IRC, I too feel node timers to be the way to go.