Minetest logo

IRC log for #minetest, 2023-11-09

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:00 erle wait are you saying there isn't a lone guy doing this but like lots of them?
00:00 MTDiscord <warr1024> I think it's like an entire genre, yeah, and you can find shit going back like a hundred years or more...
00:02 erle i mean i know people label some stuff
00:02 erle but like
00:03 MTDiscord <warr1024> https://en.wikipedia.org/wiki/Political_cartoon ... you can see a lot of examples here where there's a LOT of labeling going on.
00:04 erle damn you are right
00:04 erle so garrison is just like 100 years behind the times caricature-style wise ig?
00:05 MTDiscord <warr1024> I dunno, I'm not very familiar with is work specifically but it does seem to fit in with the overall tradition.  A lot of the other examples I've seen also express views that, let's just say, have not aged well when viewed by a modern audience...
00:05 MTDiscord <warr1024> Like hold up, Dr. Seuss did racist cartoons?  I never noticed before.
00:06 erle i'm pretty sure that garrison uses more labels though
00:06 erle rational wiki has Garrison's Law: “The more labels you have, the more effective your cartoon is.”
00:06 erle hehe
00:08 erle though i must even with the labels i do not understand what ”trump as don quixote fighting windmills” is supposed to say LOL https://rationalwiki.org/wiki/File:Garrison_Quixote.jpeg
00:09 erle Warr1024 i think being racist was a bit of a thing back then
00:10 erle (it still is, i guess, but it also was)
00:13 erle Warr1024 apparently 6 books from dr. seuss are no longer published because of racist imagery https://www.vox.com/culture/22309286/dr-seuss-controversy-read-across-america-racism-if-i-ran-the-zoo-mulberry-street-mcgelliots-pool
00:18 MTDiscord <warr1024> Yeah, it's weird when I look at a historical icon and see the racism because I have to also look up what the level of Cosmic Background Racism was at the time for comparison.
00:19 erle yeah, comparisons are important! as a friend of mine once told me “you have to understand the racism in the works of H.P. lovecraft in the context of the time – he was extremely racist even for his era”
00:24 MTDiscord <warr1024> Medusa's Coil was so racist that it made Lovecraft seem kinda comical.  Like, after reading the ending, it became super hard to take him seriously.  Like, Lovecraft's eldritch outer dimensions with unspeakable betentacled horrors turns out to just be your average inner city Long John Silver's.
00:27 erle well, i generally have difficulties taking people seriously who make hating others a big part of their identity
00:28 MTDiscord <warr1024> Yeah, it just sucks when you have to suddenly find out about it after you had been enjoying taking them seriously before.
00:29 DeepThgt i find it much simpler to ignore artists political opinions
00:29 DeepThgt or entertainers for that matter
00:29 erle that's sometimes possible, sometimes not
00:30 DeepThgt if i had to ignore people based off ideology/morals, id find it hard to talk to anywone or enjoy anything
00:30 erle for some authors, their works themselves are soapboxes from which they cry their ideology
00:30 DeepThgt at times amusingly thats untrue
00:30 DeepThgt like ayn rand
00:30 DeepThgt who died accepting charity
00:31 erle this is even true with software
00:31 MTDiscord <warr1024> Being able to ignore their views would make it possible to enjoy their works again but I'm not sure if I can just choose to ignore those views and continue enjoying without somehow endorsing those views myself.
00:32 erle for example, urbit is written by a monarchist and when i looked at the way it was structured, it showed (do not learn urbit, the hoon programming language is a literal scam that uses annotations to execute fast c code with a questionable correspondence to the hoon code)
00:33 erle for a popular somewhat-contemporary literary work, you can just look at the topic of slavery in harry potter. the house elves work without payment! many of them do not want to be freed!
00:34 DeepThgt i dont hate harry potter for the authors views
00:34 DeepThgt i hate harry potter because its horrible fiction
00:34 erle yeah lol
00:34 DeepThgt i flat out dont care about artists views because usually they are horrifically uninformed
00:34 DeepThgt you dont have time to develop art and learn things
00:35 erle oh but they are interesting for interpretation
00:35 DeepThgt so, thats why i dont feel like im endorsing anyones views or anything
00:35 DeepThgt i just dont care of the opinions of a dancing monkey
00:35 DeepThgt they are there to dance and should sftu and dance
00:36 erle for example, do you know the movie starship troopers? at least some people who did not know it was made by a guy who hates nazis misunderstood it (though i would argue that neill patrick harris in the leather uniform is the point where you should realize the protagonists are NOT the good guys)
00:36 DeepThgt i have heard it was an attempt at lampooning the original story
00:37 DeepThgt but it falls flat at that
00:37 DeepThgt and just comes off as camp
00:37 DeepThgt the only real message one gets outta the movie is the only good bug is a dead one
00:37 erle did you watch it?
00:37 DeepThgt several times
00:37 erle it is very campy, but in the same way that the lion king is campy
00:37 erle (scar's song)
00:38 erle i think one of the best scenes is the gender-neutral shower scene. you have all these beautiful young soldiers … but they only talk about war. they are horny, but only for violence!
00:39 DeepThgt well, i imagine war is a common topic when at war, and they also discuss love in the same scene
00:39 erle it's a bit like contemporary superhero movies. everybody beautiful, but no one flirting.
00:39 DeepThgt eww capesh
00:40 erle (i'd argue that superhero movies that are not at least partial deconstructions are also inherently right-wing, regardless of the opinions of the authors)
00:41 DeepThgt i cannot say im intimately familiar with superhero franchises, but i cannot say id see anything id call right wing, unless you are referrirng to what americans call right wing
00:41 DeepThgt right wing is pro monarchy or theocracy
00:42 erle well, a lot of superhero movies are very authoritarian in structure. those who want to change the world are the villians (even if they have good intentions). the superhero keeps the status quo, through violence.
00:42 MTDiscord <luatic> that is a very weird definition of right wing
00:42 DeepThgt either way, not minetest so im gonna stfu
00:42 erle luatic good that you are there, can you help me fix the horizon in xcam?
00:43 MTDiscord <luatic> probably not (i should be going to bed soon-ish), but what's up with it?
00:43 erle DeepThgt btw if you want to make that camera crafting mod, you you need more than an api that says ”snap a photo for this player and give them the item” ?
00:43 DeepThgt no
00:43 erle not even image size or field of view or so?
00:44 DeepThgt fov ya
00:44 erle or rendering quality? (supersampling)
00:44 erle luatic https://content.minetest.net/uploads/906fd58f4e.png
00:44 DeepThgt well, idk how fov would help tbh
00:44 erle luatic as you can see the thing is slightly off
00:44 erle i do calculate the vectors the following way
00:44 erle local dir = girl:get_look_dir()
00:44 MTDiscord <luatic> so basically your left / right or up vector is probably off
00:45 erle local right = vector.normalize( vector.new( { x=dir.z, y=dir.y, z=-dir.x } ) )
00:45 erle local down = vector.normalize( dir:cross( right ) )
00:45 erle see any issues with that?
00:45 MTDiscord <luatic> the right vector is sketchy
00:46 erle a friend told me this is the ghetto version of rotating it by 90 degrees lol
00:46 erle i believed her, she seemed trustworthy
00:46 MTDiscord <warr1024> clever ... though I think I usually cross +y with lookdir to get right.
00:46 MTDiscord <luatic> yeah but rotating it around what axis?
00:46 erle also she said something about matrix and quaternion
00:46 MTDiscord <warr1024> I guess it doesn't work in gimbal lock, but neither would swapping x/z
00:46 erle and that i should do this differently
00:46 erle to not gimbal lock
00:46 MTDiscord <luatic> wise words, but my existing quaternion implementation has skill issues
00:47 MTDiscord <luatic> well at least the API somewhat sucks
00:47 MTDiscord <luatic> i think it works?
00:47 erle do you have tests?
00:47 MTDiscord <luatic> no
00:47 erle LOL
00:47 erle then i don't think it works :P
00:47 MTDiscord <luatic> that is a fair assumption
00:47 MTDiscord <luatic> hence why i want to rewrite it, with test
00:47 MTDiscord <luatic> s
00:47 erle there is too much that can go wrong
00:47 MTDiscord <luatic> agreed
00:48 MTDiscord <luatic> for example i don't seem to have even documented which conventions i'm following?
00:48 MTDiscord <luatic> like, how is the coordinate system oriented?
00:48 erle i suggest to look into TDD and get some reviewer who is not familiar with your code
00:48 MTDiscord <luatic> i know how to write tests, i just didn't care enough
00:48 erle if you have no issues with me asking questions like i am 5 years old and doing this for the first time, i can do that
00:49 MTDiscord <luatic> (i am aware that this untested impl is not up to high standards, in part by virtue of being untested alone)
00:49 MTDiscord <luatic> if you want tested pure lua stuff from me, take a look at https://github.com/TheAlgorithms/Lua
00:49 MTDiscord <luatic> sadly i don't have a reviewer scrutinizing my code there
00:51 erle from my POV the trick with testing first is that you end up writing APIs that are easy to use
00:51 erle instead of easy to implement
00:51 MTDiscord <luatic> you need to find a tradeoff between the two
00:51 erle well, i have seen enough software with test cases that were obviously bolted on afterwards
00:52 MTDiscord <luatic> if i write the tests second, i do notice API deficiencies
00:52 erle the funniest thing so far is apenwarr redo, the ”recursive” build system that can not recurse on itself because of some strange choice of data structure.
00:52 erle within it's testsuite it needs to do cursed things with the database holding the build state, otherwise the tests that call redo themselves would not pass.
00:53 MTDiscord <warr1024> Who is apenme and why do you keep mentioning them
00:53 erle lol
00:53 erle that took me way too long
00:53 MTDiscord <greenxenith> App'n'warr?
00:54 MTDiscord <greenxenith> 🤷
00:54 erle avery pennarun
00:54 erle oh btw
00:54 erle is there a name for the extremely-well made style of journalistic presentation where people gloss over important details, like johnny harris for example?
00:55 erle i keep noticing this kind of thing, where people do not lie and do not seem to have any kind of ideological reason, but they smooth over details that are inconvenient to telling a good story
00:55 erle because they are, for example, difficult to explain in 3 sentences or are incredibly nuanced
00:56 erle this kind of stuff also happens in software, to an extent. you can not bullshit the computer, but you can simply pretend in the documentation that something does not exist and most users will not notice if it is well-hidden hehe
00:56 MTDiscord <luatic> "fitting the narrative"?
00:56 DeepThgt i thought that was just journalistic SOP
00:57 MTDiscord <luatic> you say i can not bullshit the computer, but i got a bull, and i can fit quite a bit of its shit into the computer case.
00:57 erle luatic i always thought that was the name for doing it out of ideological reasons
00:57 MTDiscord <luatic> mhm, does a narrative need to be ideologically motivated?
00:57 erle i want one that purely covers the storytelling aspect though
00:57 erle hmmmmmmm
00:57 erle smilie_thonk.jpg
00:58 MTDiscord <luatic> "narrative" is a term from storytelling
00:58 MTDiscord <luatic> "a spoken or written account of connected events; a story"
00:58 MTDiscord <warr1024> Ideology isn't always a thing that the speaker is consciously aware of.
00:59 erle yeah, obviously there is a lot of cultural osmosis going on
00:59 erle (see: every story influenced by lovecraftian horror ever)
01:00 erle for something completely different, what do you do with the leftover water-vinegar-spices mixture from a jar of pickles? i found that cooking rice in it gives it an incredible taste
01:00 MTDiscord <luatic> anyways erle for debugging, set up some particles; spawn them every globalstep, give them a short expiration time. spawn a particle at eye pos + look dir. that should be at the center of the screen. spawn a particle at eye pos + look dir + right. that should be, well, to the right of the center. if those two particles are correct, an "up" vector obtained as the cross product of the two should be correct too (though you may need to flip some
01:00 MTDiscord signs).
01:01 erle luatic nice tip. i already did it by just spawning the “lens” through which i cast though. this is why i *know* the thing is wrong.
01:01 erle i just don't know how to construct the correct one
01:01 MTDiscord <luatic> it isn't easy.
01:02 erle well, i didn't do it because it was easy
01:02 MTDiscord <luatic> i think i had this issue a while ago. i think i might've even "solved" it pretty much the way you now "solved" it. but i also think it probably didn't matter, because my spread was circular.
01:02 erle i did it because i thought it was easy when i came up with it 2 days ago
01:02 erle wdym?
01:02 erle like what was your problem?
01:02 MTDiscord <luatic> yeah, now i remember. i did this twice: once for spiraling down, once for adv weapons. both have, well, weapons, and the weapons need spread, and that spread needs to be orthogonal to the look dir.
01:02 isAAAc left #minetest
01:03 erle well that is exactly what i need
01:03 erle and circular vs rectangular is not really an issue is it?
01:03 MTDiscord <luatic> you need the "right" vector to not be rotated
01:03 MTDiscord <luatic> otherwise you get the rotation in your picture
01:03 MTDiscord <luatic> rotated around the look dir, that is
01:03 erle well how to do
01:04 MTDiscord <luatic> weapons with radial-symmetric spread don't care about such a rotation
01:04 erle oh now i get it
01:04 erle lol
01:04 erle sorry
01:04 MTDiscord <luatic> i swear if the minetest game jam judges voted based on the quality of algorithms and math in the games we would have won ^.^
01:05 erle math. not even once.
01:06 MTDiscord <luatic> but probably nobody would have even noticed if we just used a random offset in a cube to randomize the directions of projectiles (possibly with normalization afterwards), even though that skews the distribution.
01:06 erle luatic btw if you want to be funny, tell me where the sun is in the picture i make with xcam and i can render it
01:07 erle then players could photograph the sunset in minetest hehe
01:08 MTDiscord <warr1024> luatic: if your algorithms and math could have actually run on a real-world computer, you'd have probably fared better than you did.
01:08 MTDiscord <luatic> valid point
01:08 MTDiscord <luatic> but good mapgen in lua is very hard to do
01:08 erle what game was it?
01:09 erle and was it dog slow?
01:09 MTDiscord <greenxenith> depends on what you consider "good"
01:09 MTDiscord <luatic> erle: spiraling down and.. the mapgen was
01:09 MTDiscord <greenxenith> a dog would be much faster than the game, id say the game ran at more of a... tortoise pace
01:09 MTDiscord <warr1024> I'm on a thinkpad T430s and it was painful.
01:10 MTDiscord <luatic> i blame minetest and luajit
01:10 MTDiscord <greenxenith> was that last years jam or before
01:10 MTDiscord <warr1024> I blame how ambitious you were in your math and not being willing to cut corners 😏
01:10 MTDiscord <luatic> that too
01:10 MTDiscord <luatic> GX: last year
01:10 MTDiscord <luatic> the year before i tried to write 4 arcade games at once and now i have a model-accurate particle-based lunar lander explosion.
01:10 erle memo to myself: do not let luatic near the raytracer
01:11 MTDiscord <luatic> oh also the lunar lander basically works
01:11 erle (it is already very slow)
01:11 MTDiscord <greenxenith> do not let luatic near the anything, lest it be assimilated into modlib
01:11 MTDiscord <luatic> heh
01:12 erle modlib dependency system for its parts when
01:12 MTDiscord <luatic> wdym dependency system?
01:13 MTDiscord <warr1024> You mean like breaking modlib up into modules so you can assemble trimmed down optimized versions?  Would be kinda nice.
01:13 erle hehehe
01:13 erle yeah
01:13 erle modlib should be like a dozen mods
01:13 MTDiscord <luatic> that'd be like < 1k lol per mod. heresy.
01:13 muurkha luatic: that sounds like a good lunar lander
01:14 MTDiscord <luatic> i should probably polish it sometime
01:14 MTDiscord <warr1024> To be fair NodeCore's internal API was once a single huge mod, and then it evolved into a somewhat less huge mod with like half a dozen other mods with pieces spun off ... but becuase it's a pain to figure out exactly what things I need and don't need, and they're IN the game and all get loaded anyway, I just created a meta-mod that depends on them all and I just always depend on that, so Task Failed Successfully 😆
01:14 MTDiscord <luatic> but there's always something else, something more interesting or pressing to be done..
01:14 MTDiscord <luatic> and then minetest always gets so hella frustrating
01:14 muurkha warr1024: apenwarr is the first person who implemented djb's redo, but erle isn't a fan of apenwarr's design choices
01:15 MTDiscord <luatic> like i wanted non-voxely-surfaces for my lunar lander
01:15 MTDiscord <luatic> i had to make the moon dust a liquid
01:15 erle muurkha i do not think he is even the first? only the most popular?
01:15 MTDiscord <warr1024> Ah, haha, I keep forgetting that djb does stuff other than cryptography :-)
01:15 MTDiscord <luatic> (with modlib's advanced liquid raycasting capabilities this wasn't an issue, but it's still a dirty hack)
01:16 erle Warr1024 djb wrote some old makefiles like he had a redo-ish system and was just translating it to makefile syntax. i asked him twice in person about it, did not get an implementation, so i made my own.
01:17 muurkha I don't know why your horizon is a bit tilted
01:18 MTDiscord <luatic> anyways, honestly i'm quite proud of how spiraling down's mapgen turned out, except in terms of performance, but i really don't see how to make it faster without compromising on the parameters; it has to place multiple layers, insert cavities (ellipses) connected by tunnels, add ore clusters (with "weaker" ores towards the edges), decorations (which follow some "grouping" rules)
01:18 erle muurkha btw the design choice is pretty much “it does not work recursively” which is a bit weird for a build system advertised as recursive
01:18 MTDiscord <luatic> it's basically a full-fledged mapgen which does give quite a unique vibe
01:19 erle here is a redo timeline https://web.archive.org/web/20160818124645/http://jdebp.eu./FGA/introduction-to-redo.html
01:19 MTDiscord <luatic> and if (1) minetest allowed mapgen to run in multiple, separate threads and (2) we had some way to write mapgens in a faster language than lua, it would actually be decent
01:19 MTDiscord <luatic> (1) probably suffices to make it half-decent given the constraint of keeping lua
01:19 erle i question the wisdom of “it is slow, so let's make it threaded”
01:19 erle it will still be slow then
01:20 muurkha interesting, I guess when I was a kid I didn't recognize the racism in Mulberry Street, On Beyond Zebra, and Ran the Zoo.  I don't think I ever read the others
01:20 muurkha <warr1024> I'm not sure if I can just choose to ignore those views and continue enjoying without somehow endorsing those views myself.
01:20 muurkha you can except in one case
01:21 erle wait what case
01:21 MTDiscord <luatic> erle: multithreading increases the throughput; multiple mapblocks can be generated in parallel.
01:21 erle you mean except the overly racist works?
01:21 muurkha which is the case that the view is specifically that you shouldn't enjoy the works of artists you disagree with
01:21 muurkha because you are somehow endorsing that view by doing it
01:22 erle i am kinda glad that hitlers paintings are genuinely bad – otherwise we would have had such a discussion in art class with lots of edgy 16 year old teens
01:23 erle luatic really slow code is often not helped much by a linear speedup though. are you sure that this would help enough?
01:23 smk joined #minetest
01:23 erle maybe you could just link the especially slow portions here
01:24 erle then all of us can take turns saying ”this is not necessary” and you can say ”but it is accurate” and then i can finally be on team ”better fast than correct”
01:24 muurkha I think it's reasonable to argue that superhero comics and movies are sort of inherently pro-monarchy or theocracy.  Superman is a literal god and the whole comic is about how it's good for him to be free to use his divine powers to smite evildoers without answering to any human authority
01:24 erle this is what the deconstructions target actually
01:24 erle e.g. superman: red son
01:24 MTDiscord <luatic> erle: maybe not enough, depending on how many threads. but IIRC the numbers were in the couple hundred millisecond (think 200-400) range.
01:25 muurkha there's also the issue that due to the Comics Code most of them engage in no questioning whatsoever of the justice of the established power structure
01:25 erle are you sure that's the fault of the comics code?
01:25 MTDiscord <luatic> (this is not all that bad once you benchmark how long it takes to just fill a mapblock with random nodes)
01:25 muurkha DeepThgt: fov helps because you can take zoom photos
01:25 muurkha the right vector looks fine to me
01:25 erle i was taking zoom photos until i made the “lens” bigger
01:26 muurkha although who knows, maybe it's actually left ;)
01:26 erle could be left yeah lol
01:26 DeepThgt lok well fov too
01:27 erle WHO KNOWS
01:27 MTDiscord <luatic> muurkha: you can't possibly expect to get the left/right vector just by rotating your look dir 90° around some axis. simplest counterexample: what if your lookdir is parallel to that axis?
01:27 erle i mean i was pretty much planning ending up with an upside down picture when i had this canvas camera obscura thing. but i am not doing that and i still have to switch x and y, so …
01:27 erle no
01:27 erle i mean x and -x
01:27 erle damn i sleepy
01:28 erle Need For Sleep
01:28 MTDiscord <warr1024> The "safe" way to get the left/right vector doesn't even involve lookdir, you have to use get_look_horizontal and then some trig separately.
01:28 erle oh that's some tip
01:28 muurkha erle: I think apenwarr is the first to publish, though plausibly djb wrote one that he never shared, as with qhasm
01:29 muurkha aha, thanks for the timeline
01:29 MTDiscord <warr1024> Haha, I sort of assumed maybe you already knew about get_look_horizontal but just didn't want to deal with it because the alternative works okay in like 99.9%+ of cases anyway 😆
01:29 erle muurkha alan grosskurth (2007) for his university thesis was first to publish
01:29 muurkha aha, apparently Alan Grosskurth implemented it in 02007 and I just never noticed.  that's awesome!
01:30 erle which makes apenwarr's redo even more weird. it tries to be cleverer than all other implementations and has some neat features, but what use is a clever implementation that is less reliable than a naive implementation if the whole purpose of the thing is to get something correct that other systems do not?
01:31 MTDiscord <luatic> anyways, i'll go to bed now. good night.
01:32 muurkha erle: I do think you can enjoy overly racist works without endorsing racism, although it depends on the context.  like maybe you shouldn't show Triumph of the Will at a fundraiser for a Palestinian charity because it is probably going to get appropriated by racists (even though there's nothing specifically racist in the film itself)
01:32 erle in particular, scheduling parallel build threads with apenwarr redo puts particular constraints on your build that it does not ensure hold.
01:32 erle like, i would be happy with some system that just bugged out then
01:32 erle but assuming something and then silently failing because you don't actually check is less useful than gracefully failing
01:32 muurkha erle: really slow code is often helped sufficiently by an order-of-magnitude speedup, and I've used 64-core Linux amd64 machines
01:33 erle i have no 64 core linux machines, i was more thinking in terms of ”if this gets 8 times as fast, but is accidentally quadratic, that won't help much”
01:33 erle gets to be
01:33 muurkha yes, it is definitely the fault of the Comics Code that the comics that engaged in any kind of social or political critical thinking had to stop publishing
01:33 muurkha in the US
01:33 erle i see
01:34 erle weird that it lasts to this day
01:34 muurkha luatic: you can definitely get the left-right vector by rotating your look dir 90° around the Y-axis.  if your lookdir is parallel to the Y-axis, you've still rotated 90°, after all :]
01:34 muurkha you need to rotate the up dir as well
01:34 erle dr. horrible's sing-along blog put a good spin on it: “it's not about MAKING money. it's about TAKING money”
01:35 muurkha maybe apenwarr didn't think Grosskurth's implementation was good enough to be useful
01:35 erle apenwarr definitely wrote do, a public-domain shell script that rebuilds everything every time
01:35 erle it is very useful
01:36 erle the thing is, you can see from the failure modes that apenwarr redo is one (maybe the only?) implementation that tries to act to the outside world as a recursive build system, but is actually just a normal one in a trenchcoat.
01:37 muurkha I agree that multithreading doesn't help much with accidentally quadratic code, though it does help some.  I mean if you can get embarrassing parallelism from your accidentally quadratic code [maybe it's quadratic per mapblock] you can still  process 8 times as big a problem on 64 cores.  but usually EP requires that it be linear-time on a uniprocessor first
01:37 erle to work, it needs the concept of a ”run”, in which something is built. you can not nest ”runs”
01:37 MTDiscord <warr1024> If your code is accidentally O(n^2) instead of O(n), you can still get benefits running it on a quad-core as long as n <= 4 😏
01:38 MTDiscord <luatic> I don't remember the complexity analysis, but I think spiraling down's mapgen should be roughly expected linear or linearithmic time, not quadratic.
01:38 erle luatic i have a tip for you that does not require complexity analysis: write code on a 10 year old computer
01:38 muurkha the influence of the Comics Code lasts because almost all of the popular comics are from the Comics Code period, even including somewhat subversive ones like V and Watchmen: https://en.wikipedia.org/wiki/Comics_Code_Authority
01:38 MTDiscord <luatic> The problem is really just that it takes too damn many milliseconds, i.e. the constant factors, and I don't see much more potential for optimization without compromising on parameters.
01:39 erle muurkha how did a queer villain like V get past the radar though?
01:39 MTDiscord <luatic> erle: can you even run any pure lua mapgen properly on your 10 year old computer?
01:39 erle not this shit again
01:39 MTDiscord <warr1024> Pretty sure erle's computer is older than mine and mine is 11 years old.
01:39 muurkha V was the villain?
01:39 muurkha ;)
01:39 MTDiscord <luatic> IIRC when I benchmarked I figured out that the most simple pure Lua mapgens - like setting random content IDs - were already in the 50-something millisecond range or something.
01:40 muurkha maybe because he was plausibly the villain
01:40 erle muurkha well, from societie's point of view hehe
01:40 MTDiscord <luatic> (50ms per register on generated call)
01:40 erle luatic but i meant it. when i wrote my synthesizer code for libglitch i purposefully chose the slowest computer i had at the time.
01:41 erle rationale: if it runs there, it probably runs on faster ones
01:41 MTDiscord <warr1024> Is setting random content IDs actually the simplest?  A lot of it would be affected by your looping discipline, and the random function itself is a bit of a performance blackbox...
01:41 erle (with a synthesizer you can not afford not rendering a sample, as then you get stuttering music)
01:41 MTDiscord <luatic> the loops were proper
01:41 erle show the code
01:41 muurkha luatic: register?
01:41 MTDiscord <luatic> i also did just simple layered mapgen, also in the 50 ms range iirc
01:41 MTDiscord <luatic> muurkha: register_on_generated
01:42 muurkha erle: I have plenty of computers that libglitch won't run on
01:42 erle the simplest mapgen is obviuosly setting every node to default:stone
01:42 erle muurkha they are probably slower than what i had at the time
01:42 muurkha luatic: oh, sorry
01:42 MTDiscord <warr1024> I generally insist on testing MT mods on the slowest machine I've got that will competently run MT at all.  The minimum system requirements for a thing tend to gravitate toward whatever kind of system the developer uses, so don't get too powerful of a dev machine unless you want to limit your audience unnecessarily.
01:42 muurkha erle: mostly they have less RAM
01:42 erle muurkha oh, i did not realize it was limited by that!
01:42 MTDiscord <warr1024> @🕳 you got a link to that mapgen code?
01:42 erle ig you could reimplement it in C, but even then you need the ringbuffer
01:43 muurkha sure
01:43 erle i agree with what Warr1024 says. mineclone2 devs having much more powerful computers than their playerbase has lead to very sad bugs.
01:43 MTDiscord <luatic> @warr1024 not the simple ones, no; that was early on in testing. the complex one is here: https://github.com/spiraling-down/game/blob/master/mods/sd_map/gen.lua.
01:44 erle the latest of which is it simply not working on devices with too little RAM (the new mineclonia works on those devices though, allegedly it has less code and more features hehe)
01:45 MTDiscord <warr1024> Well, it's got all the necessary microoptimizations I guess, it's just ... really complicated.
01:45 erle -- lazily creates noises (ahead-of-time is not possible)
01:45 muurkha ring buffers are fine most of the time, though someone did apparently reimplement my bytebeat "crowd" for the 6502
01:46 erle -- Each transition between two layers needs its own noise
01:46 erle haha this is where i would start the fakery if this turned out to be performance-relevant
01:47 erle (it is probably not, right?)
01:47 erle local chunk_size = 40 -- TODO this is not optimal due to offsets
01:47 erle what effect does this have luatic?
01:47 MTDiscord <luatic> just placing the layers was still bearable. it's just that all the features together, even after optimizating using the LuaJIT profiler, were not optimal.
01:48 erle and you could, of course, not rip any one of them out or simplify them
01:48 erle as that would have messed with the vision
01:49 ShadowBot joined #minetest
01:49 erle luatic in this optimized form, what is most expensive still?
01:49 MTDiscord <luatic> erle: I don't remember, I'd have to fire up a profiler and check again
01:50 MTDiscord <luatic> the chunk size is effectively a chunk size the mapgen uses for chunk features that go cross-chunk
01:50 erle -- Generate map: Loop over nodes in Z-X-Y order;
01:50 erle -- this is not optimal for cache locality (Z-Y-X would be optimal),
01:50 erle -- but it is required to minimize expensive perlin noise calls
01:50 erle why are those calls so expensive?
01:51 MTDiscord <luatic> because they have to compute the perlin noise at a point
01:51 MTDiscord <luatic> it's just that when you're doing layers, it's best to think of the world in terms of "stacks" rather than.. X-lines
01:51 erle would it have been possible to pre-calc something here?
01:51 erle like, the entire map?
01:51 erle place mapblocks as schematics hehe
01:52 MTDiscord <luatic> erle: precalculating the entire map is something that has been considered in hindsight
01:52 erle so, would it have been possible?
01:52 MTDiscord <warr1024> IIRC the mapgen wasn't necessarily the worst thing.  The ridiculous number of mobs was also a good contender.
01:52 erle i know that minetest struggles placing big schematics
01:53 MTDiscord <warr1024> It's not impossible to ship a precalculated map but then you'd be suffering in download times instead of compute...
01:53 erle would you though? how big can a mapblock be
01:53 MTDiscord <warr1024> I've found modgen to be a pretty impressively efficient way to pull in pregenerated maps...
01:53 erle i need to sleep, will read later
01:53 erle good night
01:53 MTDiscord <luatic> the mobs have since been fixed. simply counting mobs in an area and not spawning new ones at some point does the trick.
01:54 MTDiscord <luatic> https://github.com/spiraling-down/game/blob/master/mods/sd_mobs/max_count_by_chunk.lua here's the trick for any mob mod authors btw. simply divide the world into chunks, count by chunk, impose a limit. with such an efficient index, no inefficient get_objects_inside_radius calls are needed.
02:00 MTDiscord <warr1024> I use the trick of dividing the world up into a grid and doing an O(n) once-over indexing myself in a number of cases ... but it makes me wonder about how you can do a thing without having to be limited to the grid.  Like if I want to efficiently tell every entity that is within N distance of every other entity with euclidian distance.  IIRC there's a way you can speed things up with a grid index, but it's not quite so simple as checking
02:00 MTDiscord the one cell that the one entity ends up in; you have to check neighboring cells, and then post-filter...
02:01 MTDiscord <warr1024> IIRC wasn't there supposed to be some PR that was going to make this happen automatically for objects_inside_radius using some kind of spatial indexer?
02:01 x_ joined #minetest
03:20 JerryXiao joined #minetest
03:26 sparky4 joined #minetest
04:19 fluxionary i'm just jumping into a dead conversation and then leaving, but get_objects_inside_radius and get_objects_in_area very much need to use more efficient data structures to reduce the time it takes to execute them. on busy servers like your-land, these functions can demand 90% or more of the total runtime of the server. i've looked into a solution to an extent, but updating such structures efficiently every server step is far from trivial. i've
04:19 fluxionary found a couple of relevant papers but i haven't tried to implement them and i'm not even certain they'd help in practice
04:20 sparky4 joined #minetest
04:25 fluxionary when you've only got 100 active objects on the server, iterating them all doesn't cost much. but if you've got 10000 on average, and most of those objects are calling `get_objects_inside_radius` or `get_object_in_area` every few server steps, it adds up
04:27 MTDiscord <wsor4035> didnt lmd/josiah have a pr to use spacial trees or something at one point?
04:28 MTDiscord <wsor4035> https://github.com/minetest/minetest/pull/12040 ah right, it never went anywhere
04:47 MTDiscord <warr1024> I've got like in the low thousands sometimes, and they hurt rendering quite a bit, but with a combination of no on_step hook and careful O(n) indexing when I do process them, there's very little server pain from them.
04:48 fluxionary @Warr1024, you're talking about single player? it gets much worse in busy multiplayer servers with lots of hostile mobs
04:49 MTDiscord <warr1024> Nah, mostly multiplayer.
04:50 fluxionary hm. i'm curious to see what you've done. thinking on it, how could you ever update mobs without an on_step hook?
04:50 MTDiscord <warr1024> Though the actual number of entities I need has been cut down a lot since converting some stack nodes to use actual mesh nodes for rendering.  That helps a ton.  Cobble storage used to be a massive frame rate sink.
04:50 MTDiscord <warr1024> I just don't do mob entries.
04:50 fluxionary entries? do you mean entities?
04:51 fluxionary you're just talking about static entities like in smartshops and shelves and stuff?
04:52 MTDiscord <warr1024> Stack nodes and such, but basically probably something like that
04:52 MTDiscord <warr1024> MT can handle a lot of static entities fine, it's just a problem dealing with ones that are constantly moving.
04:53 MTDiscord <warr1024> This is why some hosts pay like $5 a month for a server and have tons of capacity to spare while others pay $50 a month or more and are always struggling.
04:53 fluxionary "stack node" isn't a term i understand. i do a lot of work w/ mods and mobs, can you explain it in other terms?
04:54 MTDiscord <warr1024> A node representing a stack of items.  You can't display those as a node so you need an entity to display them and the node itself is just airlike.
04:56 fluxionary Warr1024, so you're talking about a replacement for "builtin:__item"
04:57 MTDiscord <warr1024> I guess you've never actually seen NodeCore then?
04:57 fluxionary oh, i *have* seen NodeCore, but i don't think of it much
04:57 MTDiscord <warr1024> Builtin items are still a thing, but they only live as long as the item is moving.
04:58 fluxionary i never played on a multiplayer NodeCore server, i don't know anything specific to the performance of such servers
04:58 fluxionary mostly i've played on things that were based on minetest_game or things close to that
04:58 MTDiscord <warr1024> The fact that a few things require use of entities to display makes entity performance interesting.
05:00 MTDiscord joined #minetest
05:00 MTDiscord <warr1024> I left MTG in 2018, and it was so long since I played it that when I played Piranesi, I found all the artwork really novel, but everyone was complaining about these old MTG textures they'd seen everywhere before.
05:02 fluxionary is Piranesi a public server? i'll have to check that ouot
05:02 MTDiscord <warr1024> No, it's a game, mostly SP.  It placed 2nd I think in the last jam, and I ended up making a remake of it called the Piranesi Restoration Project which is now sort of the canonical edition.
05:02 fluxionary on mtg-ish servers, the worst performing entities are signs - complex composures of small textures. if you've got a ton of signs near /spawn, say goodbye to any potential low-powered clients
05:03 fluxionary Warr1024, i should check that out. i'm mostly interested in the interests of big multiplayer servers, but i do like to keep track of all creative aspects of the game
05:04 MTDiscord <warr1024> It is kind of funny how some entities can bog down a server but have little impact on a client, while others are okay on the server but just murder clients 😂
05:05 MTDiscord <warr1024> There are a lot of really interesting experiences in the jam games, and non-souplike games in general.  Not all of them have much multiplayer potential, but some of them do nevertheless.
05:05 fluxionary Warr1024, well, there's at least some heuristics to explain that. some entities require sending a relatively large amount of data to the client, and the data needs to be decoded, and that isn't efficient.
05:06 fluxionary Warr1024, other entities have expensive on_step callbacks, and beat up the server
05:06 MTDiscord <warr1024> Entity rendering is particularly inefficient, so each visible entity incurs some baseline cost, and lots of little ones add up quickly.
05:07 fluxionary Warr1024, that's true too. the client has to draw every entity in range, even if the player can't see it
05:07 fluxionary though there's a little bit of culling going on
05:08 fluxionary some drawtypes are less expensive than others, which was the major reason why i forked the smartshop mod
05:08 MTDiscord <warr1024> There is no batching of any kind for entities, and apparently this hurts pretty badly.
05:09 MTDiscord <warr1024> Hmm, yeah, tool extrude meshes are painful too, especially with higher res textures
05:11 fluxionary are you talking about what the client sees as the wielded item, or what other players see from e.g. 3d_armor's wielditem submod?
05:11 fluxionary also this piranesi server what even is this. infinite maze?
05:13 MTDiscord <warr1024> Yeah, it's like a myst-like puzzle game set in a house that's hard to navigate.  There are a lot of clues and stuff.
05:13 fluxionary i'm half-asleep but i mean to check this out sometime in the future. an interesting concept
05:14 MTDiscord <warr1024> The extrude mesh is that thing that MT does to turn a 2d image into a 3d model, like yeah, tools are a common use.
05:15 MTDiscord <warr1024> Dunno about 3d armor mod but I assume it works a lot like in NodeCore...
05:15 MTDiscord <warr1024> I think in all cases I just use the world item visual type and MT handles several different drawing modes.
05:16 MTDiscord <warr1024> wielditem dyac
05:16 fluxionary it's the "wielditem" drawtype, when used w/ an item that doesn't have a 3d model (mesh/nodebox/node)
05:19 fluxionary hm, maybe not node. but mesh and nodebox for sure
05:23 fluxionary https://gitea.your-land.de/your-land/bugtracker/issues/3723
05:24 MTDiscord <warr1024> Haha ick.  Definitely worth cutting down on those if you can.
05:25 MTDiscord <warr1024> One issue with building spatial indexes though is knowing when during the server step cycle you should clear and rebuild the index ...
05:27 fluxionary yeah, there's descriptions of algorithms about rebuilding it when things are modified, but i haven't found much about updating only on a discrete update step
05:27 fluxionary and the vague algorithms are already pretty complicated
05:32 fluxionary zzz going to sleep, good talk
06:35 liceDibrarian joined #minetest
06:44 calcul0n joined #minetest
09:06 erle fluxionary you should check out cora's unicode signs and investigate it for performance
09:07 erle to see if it is improves the situation over the texmod signs
09:53 calcul0n_ joined #minetest
10:37 sugarbeet joined #minetest
10:48 appguru joined #minetest
11:01 sys4 joined #minetest
11:15 HumanG33k joined #minetest
12:10 Elouin joined #minetest
13:02 jaca122 joined #minetest
13:06 calcul0n joined #minetest
13:35 m33 joined #minetest
13:56 s20 joined #minetest
14:09 Wuzzy joined #minetest
14:13 definitelya joined #minetest
14:27 sys4 joined #minetest
14:46 erle turns out i totally can get normals for the surfaces i hit and use that for lighting: https://mister-muffin.de/p/8Grn.png
16:04 CRISPR joined #minetest
16:13 celeron55 as you're using raytracing you could add water reflections 8)
16:19 erle indeed, but right now i am trying to make the water half transparent
16:19 celeron55 that could be more difficult actually
16:20 celeron55 as funny as it sounds
16:20 erle maybe i just need to cast twice
16:20 erle and average the results
16:22 celeron55 if you randomly make rays hit water and randomly not, you could get an interesting effect
16:22 celeron55 i mean, per ray
16:23 erle i think that happens already kinda because of the supersampling but give me a moment
16:23 jonadab That would come through as ditthered, celeron55.
16:23 erle water dithering neat
16:23 jonadab *dithered
16:24 erle this is pretty ghetto
16:24 erle exactly how i like it
16:25 MTDiscord <warr1024> IIRC you can just continue a raycast, you don't need to bail out on the first hit, right?  So for semitransparency, when you hit water, just remember that you did, and continue on, and when you reach the end, average in the water color.
16:25 erle oh LOL
16:25 MTDiscord <warr1024> For reflections, yeah, you'd have to kick off another raycast.
16:25 jonadab Slightly smoother dithering could be achieved by replacing the random selection with modular arithmetic on a ray count.
16:25 erle Warr1024 the problem is that if you continue that kinda looks shitty at some node/nodebox edges
16:25 erle eg. a chair in water
16:26 jonadab Although you'd want to offset it on each line/row of rays.
16:26 jonadab If you want water to look actually realistic, you have to do refraction.
16:27 jonadab But that juice is probably not worth the squeeze.
16:27 erle celeron55 it works, but WELCOME TO THE EXTREMELY MOIRE EFFECT WATER
16:27 MTDiscord <warr1024> If you end up doing a 2nd raycast anyway, refraction wouldn't cost much beyond just adjusting the angle and a bunch of potential fine-tuning work.
16:28 jonadab It wouldn't cost much CPU time.  Programmer time, I'm not sure.
16:28 MTDiscord <warr1024> But if the point of photography is to capture the scene you actually see, then you probably shouldn't do stuff like that unless somebody is going to make an at least optional shader or something to do it in the regular MT client.
16:29 jonadab If the point of photography were to be exactly what you see in-game, he wouldn't be doing black and white.
16:30 jonadab But I was mostly being silly when I mentioned refraction.  I don't think users will _expect_ that.
16:32 MTDiscord <greenxenith> An optional water reflection shader? Who would do such a thing?
16:34 jonadab People who think realism is more important than how much fun the game is to play.
16:34 jonadab Personally I dislike shaders.  They make the world harder to visually parse.
16:35 MTDiscord <greenxenith> Sorry, but i find that take to be rather narrow minded. I respect your opinion though
16:36 jonadab It doesn't bother me if other people want to use shaders.
16:36 jonadab I just don't want to use them myself.
16:36 MTDiscord <greenxenith> Many people are able to appreciate both visual and mechanical complexity. Not to mention certain graphical effects enhance game mechanics. Also bold of you to assume reflections must be realistic.
16:37 jonadab *shrug*
16:38 erle i also think they make the world harder to visually parse. but i find it funny that you can probably cheat in some games using shadows and reflections.
16:39 MTDiscord <greenxenith> Do you find it difficult to parse the real world?
16:39 jonadab I mean, if you can change how things are rendered, you can cheat in much more straightforward ways, e.g., see through walls.
16:39 jonadab Sometimes, @greenxenith
16:40 erle greenxenith, i do indeed and that is for example why i have bandstop filter glasses that filter out blue lights
16:40 jonadab e.g., it's hard to see the road when driving east around sunrise.
16:40 erle like at night i get disoriented by flashing lights from police and ambulance
16:40 MTDiscord <greenxenith> Cheating via shaders is a moot point
16:40 erle if they drive by
16:40 erle tired: cheating via shaders. wired: cheating via looking directly at the opengl.
16:41 erle oh this is texture x? must be an enemy
16:41 MTDiscord <greenxenith> Thats just looking at the rendered world with extra steps
16:42 jonadab "You're still using an external computer?  I just run the game directly in my brain!"
16:42 MTDiscord <warr1024> I don't particularly care much one way or another about shaders (I'll turn them on for screenshot but off for day to day play)
16:42 MTDiscord <warr1024> I would like to say I also respect your opinion, but since you didn't offer the same courtesy I probably shouldn't either.
16:43 MTDiscord <warr1024> The fact that a suggestion might result in additional realism doesn't mean that you can just drag realism in as a strawman to argue against the suggestion.  While I don't care too much about realism, I don't see what the point is in going out of your way to avoid it.
16:44 jonadab No, I didn't mean that.
16:44 jonadab I just don't know what shaders could contribute *other* than realism.
16:44 MTDiscord <warr1024> If you want to make a "don't be so realism-obsessed" argument you should probably wait for the other person to mention realism first 😆
16:45 jonadab (Setting aside weird hacks like using them to see around corners.)
16:45 MTDiscord <warr1024> What I'm saying is that it's not a good idea to put a whole bunch of shader-realism into the photography mod if there isn't a corresponding experience with the game itself outside of the photography mod.
16:45 jonadab That's fair enough.
16:45 erle jonadab the dithering shader i have seen actually makes the world more smooth
16:45 erle there could also be shaders for toon effects like outline ig
16:45 erle but those can easily be done otherwise
16:46 MTDiscord <warr1024> It would be weird to setup a scene a certain way, then go to take a photograph of it and then find out that because the photography thing does reflections and refraction with water that MT does NOT do, your photo came out looking dramatically different than the scene you lined up.
16:46 erle i will not put shader-stuff in the photo mod
16:46 erle i just want transparent water and MAYBE transparent glass (but then i have the issue with several glass plates behind each other)
16:47 MTDiscord <warr1024> haha, yeah, for glasslike render types, I think the mesh generation stuff does a lot of work that raycast is not going to be much help for you with.
16:47 MTDiscord <warr1024> Like you'll have to do a lot of "would this surface actually be drawn or not" logic all on your lonesome.
16:48 MTDiscord <warr1024> I would think that at least attempting to handle transparent glass might be important, while not supporting it for water is a more reasonable choice, since there are configurations of MT that make water opaque, but none that make glass opaque.
16:49 MTDiscord <warr1024> So if you just supported "MT with all the fancy shit turned off" then at least there would be configurations under which the camera's output makes sense.
16:49 erle well i just handled the water transparency bit i think
16:50 erle now give me a formula to draw the sun into the sky lol
16:50 MTDiscord <warr1024> Haha, seeing all those black and white photos, now I kinda want to see the camera mod support "infrared" and do heat photography.  You'd have to have modders define a bunch of heat source stuff (though you could at least roughly infer from some heuristics like the igniter group) 😄
16:51 erle i am pretty sure that exile is probably weird enough to already define temperature everywhere
16:51 erle otherwise how would players die of freezing
16:51 MTDiscord <warr1024> NodeCore doesn't define it for everything but it has heat emitters pretty explicitly marked.
16:51 MTDiscord <warr1024> Actually, if I had film photography in NodeCore, I wouldn't even take pictures of stuff, I'd just develop the unexposed film to check for radiation 😆
16:52 erle lol neat
16:52 erle so what exactly is radiation in nodecore?
16:52 erle a node attribute?
16:53 MTDiscord <warr1024> Nodes and items have a lux_emit group, with the intensity being proportional (I think linearly) to the group value.
16:54 MTDiscord <warr1024> Similar with radiant_heat or whatever it's called; those only pass through sunlight_propagates though.
16:54 MTDiscord <warr1024> Lux radiation on the other hand can be absorbed or scattered by various material; there's a group to explicitly set it, and a heuristic function as a fallback for those that don't.
16:56 MTDiscord <warr1024> Haha, actually, a photography film that's sensitive specifically to radiation in NodeCore could be really useful high-tier equipment for fine-tuning radiation shielding.  The radiation exposure algorithm actually uses raycasts already (I cast a random ray backwards out from the player and see if it strikes a radiation emitter).
16:57 MTDiscord <warr1024> Oh, no, actually, it does NOT use raycasts; I just step the ray manually.  The fundamental frequency of lux radiation is ~1m so I have to allow for things like tunneling 😳
16:57 MTDiscord <greenxenith> BTW shaders just define how a scene is rendered, jonadab, so the blocks you see regularly are also shaders. They have nothing to do with realism intrinsically.
16:58 erle warr1024 celeron55 jonadab greenxenith … partially transparent water, here: https://mister-muffin.de/p/RHNk.png
17:01 erle so what other effect is missing
17:01 erle don't say clouds lol
17:07 MTDiscord <warr1024> Haha, damn, they stack if you take the same scene twice?  That's kinda nice 😄
17:07 MTDiscord <warr1024> You had some screenshots earlier where you had placed the photos against nodes in the world, right?
17:07 MTDiscord <warr1024> Now support taking photos of THAT.
17:08 MTDiscord <warr1024> (Ironically I bet it would actually be pretty easy)
17:08 erle what do you mean they stack?
17:08 erle oh
17:08 erle right
17:08 erle yeah i made this on purpose
17:09 erle instead of random variations i use a table with predictable offsets for the supersampling
17:09 erle this allows me to see if the rendering changed at all if i change code
17:10 MTDiscord <warr1024> Heh, actually the idea of "instead of using a digest of the scene in metadata, just use a new random number eachtime" wouldn't have occurred to me at first 😄
17:10 erle Warr1024 i do not think it would be so easy to take photos of photos in the world, because all i get is the node type and the normal. i could figure out where i hit and do some linalg i guess to figure out which pixel, but why don't you do it lol
17:10 erle a digest of the scene is not what i want though
17:11 erle i mean, i basically want the supersampling to send out more rays that ideally are slightly going into a different direction, to get the depth-of-field effect (and also a higher resolution kinda)
17:11 MTDiscord <warr1024> You're using raycast, aren't you?  They're supposed to have intersection_point or something with the actual high precision place you hit.  If you can figure out which pixel in the photo matches the in-world coordinates, you could yoink that pixel out of the original photo...
17:11 erle so hardcoding those directinos makes sense
17:12 erle pointed_thing.intersection_point and pointed_thing.intersection_normal
17:12 erle oh lol
17:13 erle this is funny
17:13 erle give me the math and i may do it
17:17 erle can entities have non-cube collision boxes?
17:20 soundtoxin joined #minetest
17:22 Pexin joined #minetest
17:29 vampirefrog joined #minetest
17:35 bdju joined #minetest
17:36 erle idea: minetest ghostbusters game with human and ghost team. the ghost team are players only visible as dark shadows on photos and by indirect effects (e.g. sound of footsteps, whooooosh, torches extinguishing when they are near). the human team has cameras and a limited amount of ghost traps or whatever. ghost team must scare the human players to death, human team must catch the ghosts.
17:52 sparky4 joined #minetest
17:54 Desour joined #minetest
17:58 mrkubax10 joined #minetest
18:04 fluxionary entity collision boxes are currently always rectangular prisms aligned with the cardinal directions
18:05 grorp joined #minetest
18:06 Talkless joined #minetest
18:07 qqq joined #minetest
18:10 mrkubax11 joined #minetest
18:35 grorp joined #minetest
18:44 erle Wuzzy btw did you see my photography mod? https://content.minetest.net/packages/erlehmann/xcam/ https://content.minetest.net/uploads/705be8a927.png
18:44 erle i wonder if you have any ideas on how to improve it
18:45 Wuzzy add color
18:48 erle can't easily
18:48 erle the shading right now is based on node name, normal vector on the hit surface and the light level
18:48 Wuzzy ahh thats how
18:49 Wuzzy i wondered how you got the grayscale color since i cant recall any function to get somthing like "pixel color"
18:49 erle oh there is also distance fog
18:50 erle node definitions have minimap_color but for reasons it is only exposed on the client
18:50 erle would be neat if it was exposed on the server, but i have no idea how much the server can actually do that
18:50 Wuzzy well. add a polaroid camera item, and a sound. give the player the item once it has "developed"
18:51 erle a sound would be funny hehe
18:51 Wuzzy hmmm
18:51 erle i think DeepThgt already had ideas to improve it
18:51 erle i think maybe i could add some noise to surfaces
18:51 Wuzzy oh the camera doesnt render plants correctly
18:51 erle no it does not
18:51 Wuzzy they render as cubes
18:51 erle because i just abuse minetest's raytracing function
18:52 erle well, do you have any idea what to do with plants?
18:52 jonadab erle: lens flair ;-)
18:52 Wuzzy not realy but plantlike nodes have a predefined shape so that might help
18:53 erle Wuzzy i am hitting the collision box i think
18:53 erle so if you want to make a game where you have to photograph players they have to be black cuboids
18:53 erle just label them SEELE-01 through SEELE-12 or so and it's okay ig
18:53 appguru joined #minetest
18:54 erle appguru i introduced normal-based coloring https://content.minetest.net/uploads/705be8a927.png
18:54 Wuzzy oh and async should definitely be utilized since the calculation appears to be slow. so creating a photo appears to block the entire server
18:54 Alnotz joined #minetest
18:54 Wuzzy found a bug. photo disappears when i place it
18:55 Wuzzy but in 5.8.0-dev
18:55 erle huh?
18:55 erle where did you place it though
18:55 MinetestBot [git] grorp -> minetest/minetest: Fix auto_install_spec being used as a table (#13970) 3944507 https://github.com/minetest/minetest/commit/394450758ed822b38a851f8c3ee601c68403e47e (2023-11-09T18:54:47Z)
18:55 erle i bet it's on the side of some node you pointed from above
18:55 erle the placement code should use raycasting too ig
18:56 erle so about those translations: if i input this to which function, what is the output? local string_assignment = S("string assignment")
18:57 MinetestBot [git] MisterE123 -> minetest/minetest: Fix misrendered fall_damage_add_percent calculation formula (#13969) fe8d04d https://github.com/minetest/minetest/commit/fe8d04d0b3c2e3af7c406fb6527f1b5230a30137 (2023-11-09T18:55:26Z)
19:00 Wuzzy S is a shortcut. it is implied the boilerplate code "local S = minetest.get_translator(translation_domain)" was called before, where translation_domain is a dev-chosen identifier that is usualyl equal to the mod name
19:00 Wuzzy the content of string_assignment should be the translated string of "string assignment" or, if no translation is available, the input
19:01 e1z0 joined #minetest
19:01 Wuzzy Minetest does some string magic behind the scenes for the "translated string" to work on clients but as a lua dev you dont have to worry about it. you can pass it around like a normal variable
19:02 erle i do not understand. can you maybe give me the *output* for that test file that you posted?
19:02 erle in german or english because i am not fluent in other languages
19:02 sparky4 joined #minetest
19:02 Wuzzy oh
19:03 Wuzzy ah you mean from the test script... lol right
19:03 Wuzzy i was talking about the actual output when executing the actual lua code, but you didnt mean that
19:04 Wuzzy erle, this is what my script has produced: https://mister-muffin.de/p/V0QX.txt
19:05 Wuzzy (file name: template.txt)
19:06 Wuzzy to get this output yourself. put the lua file in a dummy mod, with the code in init.lua, then create a directory called "locale", then run mod_translation_update within the mod directory. the script should then autogenerate locale/template.txt in the first run and update it in any subsequent runs when the lua file has changed
19:07 erle uh oh
19:07 erle thanks
19:08 erle so what is the simplest thing that could be tested here for a single line of input?
19:08 erle like: a combination of a function in the translator script, an input and an output
19:08 erle or is a single line not enough?
19:09 erle oh damn, could it be that everything important in this script is a side effect?
19:21 Wuzzy minimal lua file: S("Helloworld")
19:26 Wuzzy yeah this script relies on globals a lot (especially for the command line args)
19:27 Wuzzy but that could be refactored if its really needed
19:28 erle i think i need some time to figure out if it can be tested the way i think it should. it would probably still make sense to have an example input and output regardless.
19:28 erle i mean, your commented file contains a bunch of domain knowledge that might get lost otherwise
19:29 erle Wuzzy am i correct in that what is done there is parsing lua with regexes?
19:29 Wuzzy yes
19:29 Wuzzy this is not a full lua parser because that would be overkill, of course
19:29 erle well other people wrote one, but i see what you mean https://pypi.org/project/luaparser/
19:30 erle it's just a bit confusing for me (but i know regexes)
19:30 Wuzzy the downside of regex is always the awful syntax. u just gotta learn it :/
19:31 Wuzzy oh the excuse i use is that i just demand from the user that the strings are put in the lua in a certain way. i wrote it all in the README file
19:32 Wuzzy your xcam mod is quite impressive tbh and obviously the biggest downside is that ur very limited by minetest
19:33 erle i am not too concerned about lack of source redaability right now, it is more that i saw the minor changes and comments in the PR and thought maybe it needs tests. but i must admit that i am confused and should buy food and eat.
19:33 erle i think i am content with being limited. restrictions breed creativity
19:34 Wuzzy well in that case i suggest to just polish, polish, polish. in the current state is still very unpolished. i think performance is biggest issue but we have async
19:35 erle can i raycast in async though
19:35 erle also consider the following https://github.com/minetest/minetest/issues/13644
19:35 erle > When you pass vectors into or out of the async environment they lose their metatable.
19:36 erle sfan5 the commit you linked in https://github.com/minetest/minetest/issues/13644#issuecomment-1637040560 does not seem to exist, ig due to rebase or so
19:37 Wuzzy oh noes
19:37 Wuzzy this is a problem
19:38 erle well i can pass other things, pixels or so
19:38 erle but oh wait
19:38 erle i need to pass vectors
19:38 erle since otherwise the player will move and the photo will smear
19:38 erle guess one can just do a lot of vector.new() in the async env lol
19:39 Wuzzy am i right in the assumption the raycasts are the slowest part?
19:40 erle well, i am pretty sure that doing between 64k and twice as much raycasts is not fast
19:40 erle but then again i do other stuff that often too
19:40 erle maybe i should profile it
19:40 Wuzzy ouch
20:26 gera joined #minetest
20:30 Thelie joined #minetest
20:38 MTDiscord <grorp> it would be nice if you could copy a part of the map into the async environment and do the raycasting there
20:38 MTDiscord <grorp> transferring VoxelManips into the async env is already possible, what's missing is support for raycasting on VoxelManips
20:56 erle i mean otherwise i could just raycast the scene very slowly lol
20:56 erle like even slower
20:57 erle give the server room to breathe
20:57 erle long exposure time
21:09 liceDibrarian joined #minetest
21:16 diceLibrarian2 joined #minetest
22:04 sparky4 joined #minetest
22:22 fluxionary joined #minetest
22:47 erle i added a 8×8 noise texture to the nodes that xcam renders https://mister-muffin.de/p/pdjv.png
23:07 appguru joined #minetest
23:14 amfl2 joined #minetest
23:35 panwolfram joined #minetest
23:50 srifqi joined #minetest

| Channels | #minetest index | Today | | Google Search | Plaintext