176 Commits

Author SHA1 Message Date
Aaron Suen
2537bb7c27 Finish basic hint reform 2021-12-16 22:49:07 -05:00
Aaron Suen
7f5155f91d Glowing lens slow-start
Lenses enter a "glowing" state to propagate signal
immediately as before, but now they don't actually
produce light until powered steadily for 2 seconds.

This should mitigate the risk of "strobe" circuits that
cause excess lighting recalculations and irritate some
sensitive players.
2021-12-03 23:04:58 -05:00
Aaron Suen
1a1a4255db Rename Glass Tank to Glass Case
This caused copious confusion for new players, who assume the
glass "tank" is like an aquarium tank and can be used to carry
water.  Originally it was intended to seal in "moisture" for
sponge transport, but that has become a far less important use
case (and in fact sponge transport is probably best done just by
building submerged pathways, like the way amalgam transport is
done) and glass "tanks" are more like "display cases" now, or an
intermediate storage container that adds top access (useful for
totes).
2021-10-15 06:46:27 -04:00
Aaron Suen
25ae91cb17 More distinct non-lava-like look for molten glass 2021-10-01 07:02:07 -04:00
Aaron Suen
b73d1d1290 Pre-clean-transparent filter on all textures
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config.  Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
2021-09-23 07:36:21 -04:00
Aaron Suen
38fc6ab5d7 Subtler domain wall particles 2021-08-07 00:33:48 -04:00
Aaron Suen
d5d9cb07aa Tone down extreme glass brightness a bit 2021-08-07 00:16:54 -04:00
Aaron Suen
58968f39b7 Crude glass falls upon cooling 2021-08-06 23:05:09 -04:00
Aaron Suen
0e0a423e7e Make all liquids never exist as item stacks
Any liquids that are dropped should become
placed nodes.  It was observed before this that
wet concrete may have been displaced in such
a way that it created a stack node; this ensures
such things are precluded as much as possible.
2021-08-06 21:20:45 -04:00
Aaron Suen
ffb25a9162 More exact DNT names
Keep actual name of DNTs distinct and self-describing instead of
relying on modname, which sometimes changes when things are
refactored.
2021-08-05 07:35:20 -04:00
Aaron Suen
bedfa4b211 Fix some APIs bypassing on_nodeupdate hooks 2021-08-04 07:36:31 -04:00
Aaron Suen
3dc6a0d6c1 Make "connected" glass non-optional
The game was designed with this appearance in mind, especially the
appearance of float glass, and having this turned off can have a
major impact on the aesthetics and even function (accessibility)
of builds.

The ability to enable/disable connected glass is of unproven value
even to lower-end systems, as most of the additional work is in
the background mesh-building thread, and by now the game is complex
enough that other factors completely overpower the impact this has
on performance.

Forcing this mitigates the risk that players who have connected
glass turned off will not experience the proper results of using
float glass, and that their builds will appear very different for
other players.
2021-08-04 07:27:53 -04:00
Aaron Suen
011e171e2d Float glass tanks too now 2021-08-04 06:42:14 -04:00
Aaron Suen
964f2c5044 Make sure glass DNTs are queued 2021-08-03 21:08:57 -04:00
Aaron Suen
00b3dc477a Unified fluid wandering system
- New fluid wandering API, mostly unified logic, only needs
  some parameters, plus the "generation check".
- More sophisticated behavior seeking down-slopes beyond simple
  immediate flowing node reach ("subtle slope" detection).
- More reliable timing using DNTs.
- Set firm movement rate of concrete, molten glass.
- Reduce molten glass generations, since it can now be more
  reliably directed.
2021-08-02 07:17:51 -04:00
Aaron Suen
1ccbf0bb8c Fix formatting confused by parens in long string 2021-07-10 11:14:07 -04:00
Aaron Suen
9fb4cf55b2 Deprecate register_limited_abm
This has just been an alias to minetest.register_abm
for a while now, and all ABM enhancement features
have been added directly to the core API.
2021-07-10 11:09:44 -04:00
Aaron Suen
8a8bed8e5d Major settings cleanup
- Run all settings through a common API.
- Use modname prefix consistently for setting
  keys instead of "nodecore".
- Add automatic dumping of settingtypes.txt
  metadata for maintenance.
- Include initial settingtypes.txt for game for
  main menu use.
- Remove per-recipe tuning for pummel recipes,
  as there were way too many of those to be
  possibly useful and it was clogging up the
  settings menu.  Use tool rate adjustments to
  control it instead.
- Remove vestigial enable_damage setting.
2021-07-10 10:04:03 -04:00
Aaron Suen
54a18a6097 Make lenses a bit more sensitive to activation
Specifically, molten glass should now trigger them
(intended) as well as 1 more tier of lux (probably
not important).
2021-06-22 00:50:22 -04:00
Aaron Suen
8e94e09aee Unify node update hooks 2021-06-20 08:20:46 -04:00
Aaron Suen
3dd945085e Remove the txp_* overlay image feature
- For inventory and wield images, this is already
  possible via override.txt since 5.3.
- For special tiles, this will be possible in 5.4.
- This complicates things, and introduces warning
  messages into mods built without awareness of
  this feaure.
- As far as I know, no texture packs have actually
  ever used this feature.
2021-04-11 10:42:27 -04:00
Aaron Suen
275714df02 Rework optic domain wall particles
The old system effectively cached cross-block
boundary information forever and never expired
them, even if the node creating them was
removed (that would have been easy to fix) or
an obstacle placed in the path (that would have
been difficult to fix with the old method).

Instead just do the simplest thing and split this
into a separate loop, and run a 2-second DNT with
a separate forward-trace from all active optic
nodes.

Doing a second forward trace for each node output
may not be as efficient but ultimately we create more
problems than we solve when we try to be too clever.
2021-03-24 06:55:30 -04:00
Aaron Suen
2ffe0e765b Add optic beam block crossing particle effects
Wherever an optic beam strikes a mapblock boundary,
it now creates a particle effect visible to players close
enough.  This can be used to plan circuits so they work
entirely within a single mapblock and thus are never
internally interrupted by unloading.
2021-03-22 09:31:01 -04:00
Aaron Suen
267450add4 Register a few obvious inversions
Ones that were not done manually before,
and can probably give us a noticeable
speed-up right now.
2021-03-21 12:08:55 -04:00
Aaron Suen
c3519ca37c Fix backface culling on most mesh nodes 2021-03-15 19:17:25 -04:00
Aaron Suen
95f0fb0ee9 Heaviest image compression option 2021-03-09 08:33:58 -05:00
Aaron Suen
c706163bc1 Model object file optimization
https://github.com/ExeVirus/Compress-Obj
2021-03-09 08:25:01 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
c020726ae6 Fix lens flicker
Lenses won't transition directly from active to
shining, which only happens in flicker scenarios
2021-02-27 08:05:53 -05:00
Aaron Suen
d4fdf8c6e8 Fix items unplaceable due to stack/touch-hurt 2020-09-26 15:03:22 -04:00
Aaron Suen
1632b6352a Revert "Appease 5.4-dev texture_alpha warnings"
This reverts commit 253c2282917ecade5b8356d592edab40b1d517f5.

Apparently this warning is full of crap.  Explicitly
setting use_texture_alpha in the node def does
something DIFFERENT than what the engine says
it's doing enabling it internally.  use_texture_alpha
enables alpha BLENDING, which is what we
don't want with interpolation filters, whereas
leaving it off enables alpha THRESHOLDING which
is exactly what we want.
2020-09-05 23:46:44 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -04:00
Aaron Suen
6cd356c191 Remove explicit node non-diggability
This opens up the possibility of mods adding
tools that CAN dig some of these more exotic
things.
2020-09-02 08:21:46 -04:00
Aaron Suen
253c228291 Appease 5.4-dev texture_alpha warnings
Apparently we will be required to enable
use_texture_alpha explicitly for anything using
any level of transparency, not just alpha
blending, in some future version.
2020-08-31 23:36:35 -04:00
Aaron Suen
78d321c24f Support explicit TP overrides for special_tiles
Hughes Ross has started to work on a PR for this
(https://github.com/minetest/minetest/pull/10140)
but it doesn't look like it will be ready until 5.4 at
least, and we will support pre-5.4 versions for
some time yet.  The ability for TP artists to
override special_tiles is necessary to allow things
like flowing liquid textures to be customized in
texture packs.

Add a hack for these, similar to how we did the
inventory/wield image hacks.

Note that we are also forcing overrides for special
tiles, since there may be cases where we reuse a
base image without modifiers but TP artists may
still want an independent override.
2020-07-04 19:25:37 -04:00
Aaron Suen
3e3260f789 Back out optic "virtualization"
Apparently this interacts badly with
optomechanics when multiple optic
tick cycles are running on a single
globalstep, since it may cause doors to
miss signals if they quiesce back to
off during the step.
2020-07-03 22:12:10 -04:00
Aaron Suen
dc1fc75321 Log warning on optic limiter 2020-07-03 09:56:38 -04:00
Aaron Suen
efa43e972d Change optic limit to CPU time-based
Instead of limiting the number of cycles
to some arbitrary upper bound, run as
many cycles as necessary up to a CPU
time limit, i.e. we only allow expansion
of globalstep time by a fixed limit.
2020-07-03 09:32:46 -04:00
Aaron Suen
12302342dc Backout hashed value caching
At only 50% hit ratio, it's probably
costing as much to cache as to recalc,
and this simplifies the code better.
2020-07-03 09:26:26 -04:00
Aaron Suen
f27378ca12 Optic "virtualization"
If we're running multiple optic ticks in
rapid succession, then we don't return
control to the rest of the game between
ticks, so there's no point in reading the
map more than once per pos, and no
point in updating the map until the end
when optics may have oscillated
across multiple states.

Maintain a cache and commit buffer
during each globalstep and only flush
them at the end.
2020-07-03 09:23:19 -04:00
Aaron Suen
ed57861fcc Better param naming 2020-07-03 08:38:15 -04:00
Aaron Suen
d6426e9a9f Remove redundant dependency logic 2020-07-03 08:37:09 -04:00
Aaron Suen
32902d5554 Un-hard-code optic config parameters 2020-07-03 08:31:03 -04:00
Aaron Suen
0675d943ad Make lenses sense input immediately 2020-07-03 08:24:09 -04:00
Aaron Suen
fe1a5e38b7 Microoptimization consistency
Carry the node pre-indexing a little further to
cover the scan case as well.
2020-07-01 21:40:32 -04:00
Aaron Suen
9203734e5a Optics overhaul: eliminate node meta
Apparently as oilboi pointed out, node metadata
is kinda gross, and in this case we didn't actually
need it, since the information could actually
always have been inferred from the nodes
themselves.

Instead of storing output state in node meta,
just register a callback on the node definition to
interrogate the node itself about its power output.
2020-07-01 21:35:23 -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
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -04:00
Aaron Suen
e7bd68a24b Reduce optic tick speed to 12Hz
This is the GCF between 60Hz and 144Hz
displays, so ideally a beefy enough
machine should be able to run optics
smoothly either way.
2020-06-24 08:16:51 -04:00