The problem was pointed out by Josh
(gitlab.com/krazy-j) in merge request !22.
Apparently MT is not very smart about marking
mapblocks dirty to send to clients based on
calling mt.set_node(), i.e. it will mark them
dirty presumptively even if you set the node to
the same value it had already been.
This behavior can be confirmed by registering
an ABM against a common node like grass and
setting action = minetest.set_node. This
causes every mapblock containing that node
to be invalidated every interval, causing a big
spike in the packets received each interval
that you can clearly see on the F5 graph.
Rather than just fixing it for the most easily
observed case (fire checks), add utlity functions
to check this for ALL node change situations,
and apply it more or less universally anywhere
that we are not certain that the node is being
changed and we don't need to worry about the
extra overhead cost of the check.
Note that we don't need a
nodecore.set_loud_check call, as set_loud was
only ever being used already in cases where
we were pretty sure we were actually changing
a node.
During processing of the flammable ignition ABM,
nodes could ignite, causing the new ember nodes
created by this ignition to trigger fire propagation
instantly during the same tick by nodes still yet
to be processed for ABM checks during the same
scan. This often caused large areas of flammable
nodes, like wooden plank skyblocks, to be ignited
instantly in a specific direction from any source
ignition. This led to some "cheap shots" where
players were ruined by fire far more rapidly than
they should be.
Instead of processing flammability checks in
sync, delay them until the next tick, so that we
find all flammables to check before any new
igniters are created. This should tame fire
spreading back down to normal levels.
- New near_unloaded API that supports custom
distance parameter, map bounds check, and
some optimizations.
- Add area automatic unload check support to ABM
API and add to applicable ABMs, replacing many
old manual checks.
Note that the explicit unload check is only strictly
necessary when something will happen due to
a node NOT being present in the area, e.g. something
igniting due to absent coolant, or soaking quantity
being reset due to missing sources. In simple cases
where the absence of a thing causes the ABM to do
nothing, then the standard check can work because
the default action is to do nothing anyway.
Standardize a "fair limiting" mechanism that
limits the items accepted into a queue, and
returns a uniform random sample when flushed.
Pass all cooking/curing smoke effects into fair
limit queue.
Apply fairl limit queue to fire sparks too.
Pliant concrete curing checks still seem to lag
the server somewhat, but at least now they
shouldn't hammer the client with particles and
kill framerate too.
Before we were generating one spark spawner for
each ABM run, which could run hundreds of nodes for
a large blaze, and bunched them together. Instead,
push into a limited fair queue, and also spread the
actual spark spawning out across time to spread the
network traffic from fire.
We were using the igniter's position instead of the
flammable's to check if the flammable had already
been tested, which caused fire not to spread fully
though large blocks of contiguous flammables, and
biased the direction of fire spread where it did.
Thanks to Elon_Satoshi a.k.a. Copenhagen_Bram for
discovering, reporting, and helping to confirm that
this bug had a long history.
- Add debug logging
- Raise the ignition check limit to 250%
- Atomic ignition queue management, to ensure that
there's no chance of things getting "stuck" in the
blacklist due to partial queue resets
The use of hash instead of string for pos was causing
a bug in doors some time ago where doors would
randomly fail to fire ... and then now we're seeing
reports of fire that refuses to ignite for some specific
planks...
This should improve game efficiency/smoothness when
a lot of flammable stuff is present but there are no
corresponding massive fires.
This seems to address runtime jitter issues noticed
after placing hundreds of coal nodes inside a forest.
Didn't look right with sparks going through glass, and still
didn't look right having sparks hit glass and go sliding off
to the side at constant velocity.
After much discussion about things like wind velocity, it was
concluded that many fires are indoors or underground, and the
check to see if they're out in the open is not worth the cost.
- Included new content.
- Partially converted to base on recipes instead of just items.
- Added support for group and toolcap checks.
Fixed a number of small bugs elsewhere in the process.
- Expanded fire api, added "check" varieties of things that also
perform relevant checks for eligibility. Standardized testing
for ventilation.
- Snuff embers to coals as fuel.
- Fuel is consumed randomly by flames. This means that fuel that
are surrounded by flame burn out quicker, while flames
surrounded by fuel consume fuel from each node slower. This
adds subtlety to furnace design for efficiency.
- Clean up registered_* usage patterns.
- Reduce tendancy of leaves to create stack nodes.
Now they tend to stack up properly in-world more often.
- Tweak damage system to create "headroom" where minor
damage doesn't cost inv slots immediately.
- Make player hand skin color match model skin.
- Cleanup/unify grass abm logic.
- Start installing new sounds by MagikEh
Sound source:
https://github.com/MagikEh/SoundsOfWarr
- Make node match operate on only one of node or stack, depending
on whether node defers to stack via is_stack_only. This should
hopefully prevent future pummel recipe issues.
- Add new core stack API. Needs to be deployed in a lot of places.
- Start work on system for allowing flammable containers; they
eject their potentially non-flammable contents.
- Defined nodes, slabs, and prills of lode.
- Heating lode ore releases hot lode prills.
- Lode things in stack can air-cool to anneal or water-quench to
harden/temper. Cooling of placed nodes/slabs is planned.
- Hot items cannot be carried; picking them up causes damage and
causes player to drop them.
- There are now 6 degrees of embers. Better fuel sources will
make better embers.
- Embers differ only in lifespan; each class lasts twice as long
as the previous. Top-grade fuels may last 15 minutes or
longer.
- Embers decay stochastically.
- Embers decay 16x as fast when smothered, but still go through
the same lifecycle.
Also:
- Plain ash now reposes.
There are no infinite fuel sources, nor are any specifically
planned at this time.