1
0
mirror of https://github.com/mt-mods/biome_lib.git synced 2024-12-26 02:40:17 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
Vanessa Dannenberg
531577afcf rather than copy the re-check log back into the block log when it comes
time to run through it, just use it in-place, copying its entries back
to the main block log if they have to be skipped again (essentially
using the re-check list and the end of the block log as a double buffer)
2021-04-07 01:44:31 -04:00
Vanessa Dannenberg
e346fd599f rather than rearranging the block log to deal with blocks that can't be
populated yet, move those blocks to a separate list, and replay that
list whenever new mapblocks come in.  That way the main block list can
run dry and allow the block populate routines to go idle.

Thanks to Warr1024 for the idea!
2021-04-06 16:09:50 -04:00
Vanessa Dannenberg
bef0a0d87e oops, forgot to allow for no-air-check blocks 2021-04-06 04:19:57 -04:00
Vanessa Dannenberg
a325c2ccd8 rewrote block queue handlers to reduce code duplication
and improve lag management

minetest.conf settings added:

biome_lib_dtime_limit:

Maximum lag allowed, in seconds.  Default 0.5s.  Larger values allow for
more lag, but make map updates run a bit faster.

biome_lib_queue_run_ratio:

If positive, this is the approximate number of globalstep ticks to skip
between map updates. If negative, it becomes the positive number of map
updates to run per globalstep tick before lag is checked.  No minimum
value, maximum +100.  Default: -100 (that is, 100 updates per globalstep
tick, with none intentionally skipped).  Use positive numbers for slow
machines or biome_lib-using mods that tend to cause lag, and negative
values for fast machines and mods.
2021-04-06 03:20:12 -04:00
Vanessa Dannenberg
27cd07cb36 Fix overlap in the split-to-blocks feature 2021-04-01 04:33:53 -04:00
Vanessa Dannenberg
228296411e split generated map chunks into mapblock-sized pieces as they're logged
to reduce lag/latency at a tiny cost of overall throughput.
2021-03-29 05:19:52 -04:00
SmallJoker
fa304f9d18 Fixes 2019-01-02 22:06:07 +01:00
SmallJoker
b7d69a8487 Split code and tidy up
Split to growth.lua and search_functions.lua
New function populate_single_surface for a single position check
Use 'return' to reduce indent levels
2019-01-02 20:35:39 +01:00