teknomunk
  • Joined on 2024-02-12
teknomunk commented on pull request VoxeLibre/VoxeLibre#4453 2024-06-27 13:17:47 +02:00
Grand Chests Refactor (fixes #281)

(nitpick) Multiline comments aren't rendered properly by gitea.

teknomunk approved VoxeLibre/VoxeLibre#4453 2024-06-27 13:17:47 +02:00
Grand Chests Refactor (fixes #281)

Looks good, as I only found a few minor things to nitpick about. Ping me if you address any of these so I can re-approve.

teknomunk commented on pull request VoxeLibre/VoxeLibre#4466 2024-06-27 12:57:45 +02:00
More randomness for slime chunks

I did a profile of this recently (local access compared to accessing a global) and accessing a local was about 3 times faster on my hardware than a simple global access (see https://git.minetest.la

teknomunk commented on pull request VoxeLibre/VoxeLibre#4467 2024-06-27 12:31:38 +02:00
Choose direction vectors uniformly for spawning

it is easy to see

Unfortunately, it wasn't for me. While I am decent using and understanding mathematical concepts I'm familiar with, reasoning about new concepts and things like proofs I'm…

teknomunk commented on pull request VoxeLibre/VoxeLibre#4338 2024-06-27 02:52:52 +02:00
mcl_weather sky color refactor

I found a bug this morning with the sky color when returning to the overworld from the nether

That's a rare one, I'm glad you encountered it while working on this. :) It's both rare and…

teknomunk pushed to skycolor-refactor at teknomunk/MineClone2 2024-06-27 02:50:54 +02:00
999d625d32 Make sure overworld always gets a sky update regardless of weather, add assert to enforce sky color gets set every update
teknomunk commented on pull request VoxeLibre/VoxeLibre#4445 2024-06-27 02:29:24 +02:00
Correct space check when spawning mobs

After I checked this behaved correctly across the integer boundary, I did use this.

110.times {
teknomunk commented on pull request VoxeLibre/VoxeLibre#4445 2024-06-27 02:27:09 +02:00
Correct space check when spawning mobs

Seems reasonable. Implemented.

teknomunk pushed to fix-has_room at VoxeLibre/VoxeLibre 2024-06-27 02:24:20 +02:00
a17c6b0745 Add short circuit if sub-node space check isn't possible:
teknomunk commented on pull request VoxeLibre/VoxeLibre#4445 2024-06-27 02:18:25 +02:00
Correct space check when spawning mobs

Good catch. Fixed.

teknomunk pushed to fix-has_room at VoxeLibre/VoxeLibre 2024-06-27 02:18:15 +02:00
d42043a7cf Replace second call to minetest.find_nodes_in_area with checking top layer for matching nodes, change p2 calculation to use ceil(value) - 1, fix dx*dy*dz calculation
teknomunk commented on pull request VoxeLibre/VoxeLibre#4467 2024-06-27 01:35:13 +02:00
Choose direction vectors uniformly for spawning

The method you have here looks similar to the method with equations 9-11 at https://mathworld.wolfram.com/SpherePointPicking.html that you linked to, but a 3D point selection with rejection sampling, which selects a uniform point in a volume and I don't think this gives a uniform distribution on the surface of the sphere.

teknomunk commented on pull request VoxeLibre/VoxeLibre#4467 2024-06-27 01:35:13 +02:00
Choose direction vectors uniformly for spawning

When I started writing the code for the distance selection, I started with math.sqrt() but found in testing it selected spawn points far from the player too often. The inverse CDF got somewhat better results and can be easily changed to any desired distribution. See #5 under https://en.wikipedia.org/wiki/Cumulative_distribution_function#Inverse_distribution_function_(quantile_function)

teknomunk suggested changes for VoxeLibre/VoxeLibre#4467 2024-06-27 01:35:13 +02:00
Choose direction vectors uniformly for spawning

I haven't tested this yet, but reading thru the article you linked and what I know about lua, I have a couple of issues.

teknomunk commented on pull request VoxeLibre/VoxeLibre#4445 2024-06-26 23:07:12 +02:00
Correct space check when spawning mobs

This is supposed to be math.floor, because minetest.get_nodes_in_area() uses an inclusive range. If you pass identical values for p1 and p2 it tests exactly one node. Using ceil tests…

teknomunk pushed to fix-has_room at VoxeLibre/VoxeLibre 2024-06-26 22:55:44 +02:00
c7fd065f2f Add check for presence of minetest.get_node_boxes before attempting sub-node space checks
teknomunk commented on pull request VoxeLibre/VoxeLibre#4445 2024-06-26 22:24:59 +02:00
Correct space check when spawning mobs

Lua: Runtime error from mod '??' in callback environment_Step(): ...est/games/mineclone2/mods/ENTITIES/mcl_mobs/spawning.lua:761: attempt to call field 'get_node_boxes' (a nil value)

it…

teknomunk commented on pull request VoxeLibre/VoxeLibre#4220 2024-06-26 22:07:34 +02:00
Add overhead mob spawning via spherical spawn volume

Thanks. Random variables was one of the math courses that didn't come easily.

teknomunk commented on pull request VoxeLibre/VoxeLibre#4280 2024-06-26 13:57:16 +02:00
New mcl_copper

I'm not positive about (1) and I haven't tested code to see how it behaves. It looks problematic to me, though. I should go check it to see how it behaves.

teknomunk pushed to persist-xp-orbs at teknomunk/MineClone2 2024-06-26 13:51:51 +02:00
bb9ed4498b Address review comments