70 Commits

Author SHA1 Message Date
Aaron Suen
32a5f30565 Merge in personal notes 2021-02-26 09:01:54 -05:00
Aaron Suen
dc912f776c Make sure all things have explicit descriptions
This avoids issues with the translation informer
including technical names in the translation source
2020-10-18 11:50:04 -04:00
Aaron Suen
6d39ebb77d Fix dynamic light DNT conversion 2020-09-09 10:15:48 -04:00
Aaron Suen
d95e7bb714 Disable timer-based light check for now 2020-09-09 10:00:13 -04:00
Aaron Suen
0a8583d4a5 Fix on_timer trap hook 2020-09-09 09:56:50 -04:00
Aaron Suen
d18eaf23fb Warn about missing mux for each node name 2020-09-07 23:23:20 -04:00
Aaron Suen
1e11f9d81e Remove compat hacks, bump min ver to 5.2+ 2020-07-14 08:20:46 -04:00
Aaron Suen
51def38621 Falling nodes honor stasis 2020-07-07 08:17:28 -04:00
Aaron Suen
478414385e Fix diagnostic for abm muxing 2020-07-02 00:10:16 -04:00
Aaron Suen
dafc220207 Allow DNTs to recheck
This should hopefully allow the "broken ziprune"
bug that happened on the Community server to
heal itself eventually if it happens again.
2020-07-01 22:17:49 -04:00
Aaron Suen
b5accf9d90 Allow force-resetting DNT timer 2020-06-28 17:15:32 -04:00
Aaron Suen
9b5db81149 Document DNTs 2020-06-28 17:05:53 -04:00
Aaron Suen
0eee06c8ea Officially retire the ABM laundering hack
Never saw any empirical evidence that this
helped one bit.
2020-06-27 21:01:23 -04:00
Aaron Suen
068937c482 Remove ABM laundering
See if this helps smooth out performance
issues in 5.3+.  It was never confirmed to
increase the number of ABMs we were able
to successfully process anyway.
2020-06-27 19:22:00 -04:00
Aaron Suen
085f700982 Fix ABM muxing, maybe?
Results so far are quite good: reduced ABM
total count from 82 to 36 (~60%) and got it
under the magic cache limit of 64.
2020-06-27 17:36:42 -04:00
Aaron Suen
88899be57b Experimental ABM Multiplexing
Detect ABMs that share the same "signature"
except for the central nodenames, and use a
single ABM to run them, looking up the core
bodies to run based on nodename on the Lua
side.  This could reduce the total number of
ABMs we're using by almost half, and
mitigate some of the performance issues
that MT continues to have with ABMs.
2020-06-27 16:37:47 -04:00
Aaron Suen
b2f78c0daa Indexing for craft checks
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
2020-06-27 12:20:35 -04:00
Aaron Suen
4b8d1b12e5 Fix a set_sky crash
We can't use push incremental changes to set_sky, we need to
push the whole sky definition each time.
2020-06-26 18:23:44 -04:00
Aaron Suen
0929d007ce Use nodecore.interval where appropriate
Fixes deprecated get_connected_players() at load time issue
2020-06-23 06:43:34 -04:00
Aaron Suen
79717b0d82 Remove failed profiler instrumenting 2020-06-22 23:19:14 -04:00
Aaron Suen
466805da48 Enroll skybox, fix some bugs 2020-06-22 23:17:01 -04:00
Aaron Suen
5648331c9f Replace all perplayer with playerstep 2020-06-22 22:47:33 -04:00
Aaron Suen
be452b4d52 Finish base playerstep API
Now all that's needed is converting existing
mods for proof of concept.
2020-06-22 21:14:40 -04:00
Aaron Suen
7ddca3e73a Start work on new player API...? 2020-06-21 15:32:18 -04:00
Aaron Suen
dd5e92266e Skip laundered ABMs on first tick
When unlaundered ABMs run, give the
laundered ABM pump a rest for 1 tick, to
ensure we don't run 2 batches worth of
ABMs on any 1 tick, to smooth things out.
2020-06-21 15:00:26 -04:00
Aaron Suen
ebcc7921e9 Smooth laundered ABMs across multiple ticks 2020-06-21 14:46:30 -04:00
Aaron Suen
3f262b5b35 Try reversing ABM stasis/launder nesting
Hopefully laundering the stasis check will
boost the number of mapblocks we can
process.
2020-06-21 11:15:01 -04:00
Aaron Suen
9c150a2054 Fix stasis
- Late-bind ABM registration alias so stasis
  wrapper is honored.
- Make DNTs wait in a loop until stasis is
  cleared.
- Make optics honor stasis.
2020-06-21 10:46:35 -04:00
Aaron Suen
41e744b0e9 Apply ABM laundering at base level 2020-06-21 10:25:07 -04:00
Aaron Suen
b70ea7d2c8 Disallow vanilla on_timer, Player API notes 2020-06-21 09:58:01 -04:00
Aaron Suen
3cc7ea83af Simplify AISM pre-check 2020-06-21 04:48:14 -04:00
Aaron Suen
ae08b74ee7 Microoptimize ABM laundering
Apparently table packing/unpacking is just a
little (like 10% maybe) more efficient than
closure-wrapping.
2020-06-21 01:24:10 -04:00
Aaron Suen
a4bf23e421 ABM Laundering: speed up to 4x
Instead of using 20% of CPU time to run
ABMs, defer 75% of them, so we are using
20% time to run 20% ABMs plus defer
a further 60%, giving us a total of roughly
80% CPU time for ABMs (not factoring in
overhead).

This should let us work around the engine's
hardcoded 20% ABM limit.
2020-06-21 00:48:30 -04:00
Aaron Suen
b8bf2322fa More work on DNTs
- DNTs can have default time value
- Automatic loop option
- Optional node name filter
- Use DNT for scaling particles
- A few tail call optimizations
2020-06-19 09:38:03 -04:00
Aaron Suen
db2d748104 DNT API and reliable door ablation
- New Delayed Node Trigger API that allows
  the use of multiple externally-defined node
  timer events, as long as on_timer of a node
  is not explicitly overridden.
- Use the new DNT system to make door
  ablation reliable.
2020-06-18 22:35:47 -04:00
Aaron Suen
984e87e155 Consistent ABM labeling
- Make sure every ABM has a label
- Use consistent case
- More concise names / consistent voice
2020-06-17 07:09:20 -04:00
Aaron Suen
f509f9fba8 Change eye height when swimming
Suggested by oilboi to make the swimming eye
height match the model anim.   There is a bit of
jank switching between swimming and standing
height, but it doesn't seem to be too bad, and it
makes players have to actually break the
surface to breathe, and makes swimming a little
less bizarre in 3rd person view.
2020-06-16 21:14:11 -04:00
Aaron Suen
eb248aaf22 Removed register_limited_abm
- There was never any real proof that the
  limiting mechanism was necessary, and if it is,
  it may be better to use it sparingly.
- We suspect this may be complicit in some
  serious issues, such as door ablation failures.
- Despite 2 different revisions of the code,
  limited abms have never worked reliably.
- Instead of fixed count limits, either dynamic
  or time-based limits would be better.
2020-06-16 20:39:41 -04:00
Aaron Suen
e0156b4742 Add profiler instrumentation metadata everywhere
N.B. the MT built-in profiler doesn't yet actually support reading
labels from bare-function registrations, so a builtin hack is
needed.
2020-06-15 07:21:39 -04:00
Aaron Suen
6c640a11b1 Validate log message levels 2020-06-09 19:02:07 -04:00
Aaron Suen
a998009656 Merge branch 'master' of gitlab.com:yamanq/nodecore into dev 2020-06-09 18:57:34 -04:00
Aaron Suen
429c914e99 Try to simplify abm code a bit 2020-06-01 22:07:20 -04:00
Aaron Suen
0067c5d18d Remove delay/jitter from limited abm
Before, ABM firing was delayed by up to a full
interval, but the fulfillment timer could wander
around relative to the trigger, which could lead
to unreliable door ablation.

Instead, just always run the ABM fulfilment
triggers on the next tick, so limted_abm is
ONLY doing the limiting for events that arrive
within the same tick, as most ABMs do.
2020-06-01 21:44:22 -04:00
Aaron Suen
f78c3d90a8 Make dynamic light air_equivalent too 2020-05-31 15:59:53 -04:00
Aaron Suen
a5752fd9b6 Yet another emergency lighting redo
- Players no longer constantly glow in darkness.
- Players can now place light spots by scaling, faster
  than actual climbing spots.
- Climbing spots appear if player continues placement
  after light appears.
- Floor traversal mechanism is now obsolete.

This allows players to traverse dark caves reasonably
well, still, but only voluntarily, so darkness stealth
mechanics are possible again.
2020-05-30 19:00:22 -04:00
Yaman Qalieh
a8147e9875 Add levels to log messages 2020-05-27 14:04:00 -04:00
Aaron Suen
05abaf3199 Fix invisible players casting light 2020-05-26 19:32:15 -04:00
Aaron Suen
b1584290a8 Fix light overlap, torch fading in lode crate 2020-05-26 19:26:08 -04:00
Aaron Suen
55efdfa027 Fire ambiance consolidation
- Fire flame and torch flame use the same ambiance def via
  a new flame_ambiance group.
- Items can now emit ambiance via AISM.
2020-05-26 18:48:03 -04:00
Aaron Suen
63d9c3fdec Allow dynamic light displacement
If the node we want to place dynamic light in is occupied (e.g.
player is inside a ladder node space) then allow placement on one
of the 6 face-touching spaces.  This makes dynamic lights work
correctly on most ladders, and may fix other similar situations.
2020-05-26 18:46:06 -04:00