Time Nick Message 04:31 BuckarooBanzai sfan5: i like the rising adoption of mods with integration tests :) 13:59 [MatrxMT] filler bots posting on forums again https://forum.minetest.net/viewtopic.php?p=438759#p438759 15:53 MinetestBot 02[git] 04grorp -> 03minetest/minetest: Fix incorrect documentation of new-style particlespawner size property 135d18b6f https://github.com/minetest/minetest/commit/5d18b6fcd0960fa495164bd8ac91b39e2d3b4b2e (152024-08-27T15:51:29Z) 18:50 blaub swift110-mobile: hey what's your channel again? 19:25 MTDiscord Discord bridge may reconnect a few times 19:32 blaub does minetest have enemies now? 19:34 MTDiscord I mean sure, plenty of people dont like the engine 19:35 MTDiscord Unless you are referring to mobs in a game, which would be weird because Minetest is an engine, not a game 19:50 blaub very narcisstic answer 19:51 MTDiscord blaub: I am sorry you feel that way. What would you like to be different? 19:51 ireallyhateirc not sure how that's narcisstic tbh 19:51 MTDiscord Ah, they left. 19:51 jonadab In general, people who really want a PvE combat-oriented game, tend not to like the engine, because none of the combat-oriented games / mods that exist are very good. 19:52 jonadab Not sure whether that is a weakness in the engine, or just a sign that the community writing content for it doesn't care that much about PvE combat. 19:53 ireallyhateirc yeah, obviously the engine needs to be adjusted to support many different types of voxel games instead of a vague minecraft-like experience 19:53 ireallyhateirc but we're getting there 19:53 MTDiscord It already does support other types of voxel games, but no one wants to make them 19:54 ireallyhateirc I'm making one, please be patient!!! 19:54 jonadab Personally, I like the fact that the games we have, tend to have a really solid peaceful-mode experience, complete with a meaningful power progression and the ability to farm large quantities of resources for building. 19:55 jonadab Certain other voxel games, which shall remain nameless here but are implemented in Java, are absolute pants for peaceful mode play. 19:55 jonadab Because too many of their infrastructure/farm things are based on mob drops. 19:56 jonadab Minetest has never fallen into that particular trap. 19:56 ireallyhateirc greenxenith, I'd argue that Minetest still has a way to go, for example dehardcoding stuff like camera, player physics and such 19:56 MTDiscord I never said there wasnt miles of room to improve 19:57 MTDiscord All I said was other types of voxel games are completely viable already 19:58 ireallyhateirc well I guess, I always end up banging my head against a concrete wall when I try implementing something non-minecraftish though 19:58 ireallyhateirc less with every release though 19:59 ireallyhateirc My game is going to be a psychological horror taking place in a procedurally generated maze city 19:59 MTDiscord The longer you work with the engine the easier it gets to work around it 20:00 ireallyhateirc true, I'm doing minetest for 2 years only so far 20:00 MTDiscord Some of us are jaded when gauging ease of use 20:12 ireallyhateirc I think blaub was thinking about MTG which left a pretty ugly legacy for Minetest's reputation, but that's not a good reason to call someone names and leave lol 20:15 MTDiscord I assumed as much, which is why I try to remind people that Minetest is not the game. Game mechanics dont go in an engine. 21:26 [MatrxMT] Can somebody help me understand how the gennotify thing works during the mapgen process? 21:27 [MatrxMT] I don't understand how or why it is used. If you know that you want to generate a temple somewhere, why not build it right away and move it forward? Is there a benefit to this? Or does it do something else? 21:27 ireallyhateirc afaik gennotify works like this: the engine generates something and passes that data to lua 21:28 ireallyhateirc say you register some decorations like a type of a plant or something 21:28 ireallyhateirc then gennotify can tell you where exactly that plant was generated 21:30 [MatrxMT] So it's more like a marker for yourself and for potential other mods that mess with the mapgen? 21:31 ireallyhateirc yes 21:32 ireallyhateirc I think you can also get biomemap and heightmap with it 21:32 ireallyhateirc nope 21:33 ireallyhateirc I confused two different things, biomemaps and heightmaps are another thing 21:33 [MatrxMT] No, that seems like something else. 21:33 ireallyhateirc You can also do your own custom gennotify with the mapgen env for a custom lua mapgen 21:34 [MatrxMT] I was thinking of using it, but I haven't figured out yet how. 21:34 ireallyhateirc it's quite easy, the first thing you need to define a mapgen script - a file that runs in the mapgen env 21:35 [MatrxMT] I'm currently trying to migrate my cave generation mod, which works well but is kinda slow (1s per 80x80x80 chunk) to work in an async environment that Minetest 5.9.0 now supports: git.noordstar.me/Bram/noordstar_caves 21:35 ireallyhateirc you do it with minetest.register_mapgen_script("mymod/init.lua") (or some other file) 21:36 ireallyhateirc then in mymod/init.lua you can do stuff and most importantly use this: minetest.register_on_generated(function(vmanip, minp, maxp, blockseed)) 21:36 [MatrxMT] I'm also trying to figure out how to share my personal global variable. I've defined a noordstar_caves.registered_biomes, noordstar_caves.registered_decorations and noordstar_caves.registered_shapes but they (naturally) don't get shared with the environment for free - unlike the standard versions of those global variables. 21:36 ireallyhateirc then you can work with the voxel manipulator object and hence change map data 21:37 ireallyhateirc > kinda slow (1s per 80x80x80 chunk) 21:37 ireallyhateirc that's extremely slow, I could probably do that in 30ms 21:37 [MatrxMT] Yes, I'm aware on how the rest of the mapgen objects work. :) It's mostly that the gennotify documentation is kinda vague on what it does and what it's used for? 21:38 ireallyhateirc I generate 100 mapchunks in 1s 21:38 ireallyhateirc In Exile for example we use it to tell us where animal eggs were spawned 21:38 [MatrxMT] What are you doing on those mapchunks? 21:38 ireallyhateirc Drawing roads for my city game 21:39 ireallyhateirc though could be a bad example because it's 2D 21:39 ireallyhateirc but I also do tasks like snow placing in the vm, worst code runs 30-100ms 21:40 [MatrxMT] Yeah, I don't think they'd compare. I need to carve cave shapes based on the registered_shapes variable, then decorate them using the registered_biomes, and then sprinkle stuff on top using registered_decorations. 21:40 ireallyhateirc I'd have to look at what exactly your mod does though and see if I could rewrite it to be faster 21:41 ireallyhateirc have this: https://gist.github.com/sfan5/1a124eb496a39734f53fb4daffc47bee 21:42 ireallyhateirc example code that uses the mapgen env 21:48 [MatrxMT] Wowie, thanks! ❤️ 21:49 [MatrxMT] I would recommend looking at API.md to get a glimpse of what it is doing: git.noordstar.me/Bram/noordstar_caves/src/branch/main/API.md 21:49 [MatrxMT] My best performance is about 1.51 calculations per node, which averages it on my laptop to about 600ms per chunk. 22:02 ireallyhateirc you have your own flat array data type? 22:04 MTDiscord Bram: apply https://content.minetest.net/packages/jwmhjwmh/jitprofiler/ to find out where time is spent 22:05 MTDiscord at a glance however i already see that you're using abstractions too liberally. almost none of them are "zero cost". you need to think roughly in terms of the work your lua code results in. 22:05 MTDiscord for example you are iterating positions and turning each into an index individually. it is much faster to iterate indices with the respective strides. 22:06 ireallyhateirc yeah, I can see that too. Function calls and such are expensive, I limit that to minimum in all my VM stuff 22:07 [MatrxMT] Yes. The documentation didn't seem to explain why the chunks were larger than 80x80x80. The minp and maxp did not reflect the vm size. 22:07 sfan5 the vmanip contains one extra block at each side to accomodate overgrowth. 22:07 sfan5 you should only fill [minp, maxp] with nodes 22:08 [MatrxMT] Even more. The vmanip contains a strip of 8 blocks on all sides. 22:08 [MatrxMT] 16, my mistake. The flat array is of length 1.404.928. 22:09 [MatrxMT] Which is 112 x 112 x 112 = (16 + 80 + 16) ^ 3 22:10 [MatrxMT] The documentation reveals nothing about this, leaving me to debug my code for hours because my test generations wouldn't line up and always be skewered by 32 nodes per axis. 22:11 ireallyhateirc that's yet another thing - mapchunk offset 22:11 ireallyhateirc meaning the grid starts at xyz: -32 22:12 ireallyhateirc I guess I could take a look at the VM stuff documentation and add extra explanation to save other people hours of debugging 22:16 [MatrxMT] Keep in mind that the strip of 16 blocks always appears in at least one other chunk's generation phase again - so it's not like those strip nodes need to be addressed right away. 22:18 [MatrxMT] I will definitely try this. I might need to do some fixing on Linux for that - Minetest always gets a Segmentation fault on my Linux machine upon boot, _(using the Nix package manager)_ and I'm currently developing everything in Windows. But I'd love to use tooling like that to optimize the engine. 22:22 ireallyhateirc hmmmm I'm running Guix but I have Nix installed too so I could try idk 22:22 [MatrxMT] I haven't looked into it for a while - I can come back to it when I have more context to share. Who knows, maybe it's even my fault that it doesn't run. 22:24 ireallyhateirc well Nix is reproducible so it's probably the package that's broken or you're simply running it in a weird and improper way 22:24 ireallyhateirc you're running NixOS or just Nix as a package manager? It's good to update package definitions btw, but I don't know Nix well enough to tell you the command 22:25 [MatrxMT] Nix as a package manager on EndeavourOS. 22:26 [MatrxMT] I am having some issues with certain apps not running due to some weird rendering issues that might be related to OpenGL. And I'm not smart enough to understand/solve those. That might be to blame for the Segmentation fault, too. 22:27 ireallyhateirc use Minetest's flatpak first and check if it works. If it doesn't then something's likely wrong with drivers/firmware and not with Nix