Minetest logo

IRC log for #minetest-dev, 2021-07-24

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

All times shown according to UTC.

Time Nick Message
01:07 pgimeno <sfan5> does that generate a big commit that removes and readds each line?  <--  well, yes, but it's actually a trivial PR: if git diff -b returns no changes then it's fine. The only problem is that it will make any PR that modifies the same files conflict, but rebasing is also trivial.
01:09 pgimeno re UI, I'd like that online is just another choice for games. Maybe with a special formspec like in hecks' initial proposal.
01:13 v-rob joined #minetest-dev
02:28 MTDiscord <Techy5> a minor documentation fix for y'alls consideration: https://github.com/minetest/minetest/pull/11479
02:39 behalebabo joined #minetest-dev
02:50 Extex joined #minetest-dev
03:00 specing_ joined #minetest-dev
05:34 v-rob joined #minetest-dev
07:58 behalebabo joined #minetest-dev
08:49 YuGiOhJCJ joined #minetest-dev
08:50 longerstaff13 joined #minetest-dev
09:15 calcul0n_ joined #minetest-dev
09:31 behalebabo joined #minetest-dev
09:39 lhofhansl joined #minetest-dev
09:40 lhofhansl #11430 and #11422 are ready for another review.
09:40 ShadowBot https://github.com/minetest/minetest/issues/11430 -- Add smooth light-shadow transition at noon by x2048
09:40 ShadowBot https://github.com/minetest/minetest/issues/11422 -- Distribute shadow map update over multiple frames to reduce stutter by x2048
09:44 sfan5 I looked at it before and the code is okay, just have to test it
09:45 lhofhansl For 11430 I'd prefer a faster transition.
09:53 entuland joined #minetest-dev
10:47 Fixer joined #minetest-dev
14:01 olliy joined #minetest-dev
14:05 hecks joined #minetest-dev
14:59 specing_ joined #minetest-dev
15:47 hecks How do functions from l_util end up in the core table?
15:48 Extex joined #minetest-dev
15:49 rubenwardy scripting_server.cpp:123
15:50 rubenwardy calls ModApiUtil::Initialize
15:50 rubenwardy `top` is the index of the core table
15:50 hecks and that puts the functions inside the table, correct?
15:50 rubenwardy yes
15:50 hecks so if I wanted to wrap one for safety, then in core I can just do something like
15:51 rubenwardy API_FCT is a macro that adds the functions to the table
15:51 hecks local o_encode_png = core.encode_png
15:51 hecks function core.encode_png(width, height, data, compression) ...
15:51 rubenwardy yeah, you can override functions
15:51 hecks thanks
15:51 rubenwardy is there a reason to not do this from C++? It's usually simpler to eg: validate in c++
15:52 rubenwardy as in - you then only have one function implementation
15:52 sfan5 there's e.g. core.register_item_raw and then builtin hides that and creates core.register_item
15:52 rubenwardy yeah
15:52 hecks 1. typechecks in c++ would be a little verbose
15:52 hecks 2. i want to convert some parameters
15:53 hecks so that 'data' can be a table or a string, if it's a table then the wrapper will encode it as a string
15:54 rubenwardy fair
15:55 sfan5 something relevant to what you seem to be doing btw: the server does not link to irrmt and thus not libpng either
15:57 hecks i wrote my own encoder
15:58 sfan5 no compression?
15:58 hecks we have zlib...
15:59 sfan5 oh
15:59 sfan5 yes indeed
15:59 sfan5 we do
15:59 hecks i had to pull in this lib for crc, hope that's fine https://github.com/GediminasMasaitis/crc.h
15:59 hecks added it to LICENSE.txt
15:59 hecks and placed it in src/util/
15:59 sfan5 sounds okay
15:59 hecks also copied its license to the top of crc.h
15:59 hecks hope it works on c++11 but if not, i'll backport it
15:59 sfan5 maybe something less C++-y would have done it too but I don't think anyone except me cares about this
16:00 hecks it's literally just used in one place
16:00 hecks nothing other than png uses something as ancient as CRC checksums
16:00 sfan5 anyway I'll be off
16:00 hecks if you really hate it i'll make a PNG encoder class instead of inlining it in l_util.cpp
16:18 Extex joined #minetest-dev
16:38 entuland joined #minetest-dev
17:05 calcul0n__ joined #minetest-dev
17:32 Cybille @hecks: TCP/IP Protocol was older then png and still use CRC. The Question was: How your PC know, if your HD has Checksum errors?
17:32 hecks bad bot
17:40 hecks #define PNGBS(n) writeU32( (u8*) ( & n ), n )
17:40 hecks why does this crash...
17:42 hecks #define PNGBS(n) writeU32( (u8*) ( & n ), n & 0xFFFFFFFF )
17:42 hecks =]
17:54 longerstaff13 joined #minetest-dev
18:03 Cybille ParaNOid AndroID 100% Relativ AND OR and dont forget XOR "- - = +" ASS>Chaos>Order>E=MC2>DisOrder>Chaos>ADD Att(ention) Deffizit DisOrder 100% Fix ParaNOia Traum>Att>Ahh Have/Prouve/Give
18:28 Cybille was kicked by rubenwardy: kick
18:34 pgimeno wait, isn't that endianness sensitive?
18:38 pgimeno maybe we want to keep support for this... https://www.amigans.net/modules/xforum/viewtopic.php?forum=25&amp;topic_id=8411&amp;order=
18:42 hecks i thought network is always big endian?
18:45 hecks better yet, what is the #define to check for this
18:45 pgimeno (u8*)(&n) is endianness-dependent isn't it?
18:46 pgimeno oh
18:46 pgimeno sorry, that's the buffer
18:47 pgimeno never mind, but it's a bit ugly to use n as buffer
18:47 hecks i just didn't feel like reinventing the wheel
18:48 hecks the compiler hates me if i also use n as the value param, so i had to make a dummy expression for that
18:52 pgimeno yeah, memcpy has restrict parameters, i.e. they must not overlap
19:17 hecks https://a.uguu.se/cCCQJpUtnnew_testnodes_generated.png at least it doesn't crash now...
19:31 hecks it sort of works now but
19:34 hecks this is really stupid, something is mangling the raw data but not the colorspec path
19:35 hecks https://a.uguu.se/epyLsMOpMpVb_generatedpng.png
19:40 hecks it's especially stupid because i'm only feeding the colorspec table to string.char
19:46 rubenwardy #10731 ready for review again
19:46 ShadowBot https://github.com/minetest/minetest/issues/10731 -- Add physics modifier API by rubenwardy
19:59 hecks https://a.uguu.se/v00EOXu4YMBC_mandel.png
20:01 rubenwardy nice
20:03 hecks half tempted to just ship with the colorspec version but it's maddening that raw data doesn't work
20:14 hecks i think string.char is broken in some way
20:18 hecks https://paste.uguu.se/?ae58393e9b79a119#23VC2vdcxsLPNoMsxhAi7SQbfViYJrWwDcoub9jY5ToA
20:18 hecks why does this assert fail?
20:20 hecks i guess it doesn't really matter if it's lua's fault
20:31 MTDiscord <Benrob0329> My first question would be: What's the output of both functions?
20:46 v-rob joined #minetest-dev
20:50 rubenwardy updated #10876
20:50 ShadowBot https://github.com/minetest/minetest/issues/10876 -- ContentDB: Add reason to downloads by rubenwardy
20:50 rubenwardy opened #11484
20:50 ShadowBot https://github.com/minetest/minetest/issues/11484 -- ContentDB: Add support for package aliases / renaming by rubenwardy
20:55 hecks #11485
20:55 ShadowBot https://github.com/minetest/minetest/issues/11485 -- Add a simple PNG image encoder with lua API by hecktest
21:01 MTDiscord <GreenXenith> While youre at it would it be worth adding a reader?
21:04 hecks not really
21:05 hecks you always have the option of using libraries, i just made this so people wouldn't yell at me for deleting tga and ppm support
21:05 MTDiscord <GreenXenith> Why not? Having to roll a lua implementation seems odd if you already have the framework for representing images in lua
21:05 MTDiscord <GreenXenith> And we dont have the option of using libraries without using trusted mods
21:05 hecks decoding is a much taller order
21:06 hecks this encoder is minimal on purpose, it only does one bit depth and no predictors
21:06 hecks when you write a decoder, you have to support it all
21:06 celeron55_ it's actually something that has been asked before, someone wanted to read some heightmaps from image files on the server for map generation
21:06 MTDiscord <GreenXenith> Meh, guess ill have to live with my lua implementation
21:06 hecks it's not difficult to read a tga or dib in lua
21:08 hecks i think writing images is something that's gonna happen way more often than reading them
21:10 celeron55_ the way to do it would be to link the server to libpng but and expose it to lua, but i agree it seems like something almost nobody needs and also like something that can be done anyway when actually needed
21:10 celeron55_ -but
21:10 celeron55_ s/anyway/in other ways/
22:44 v-rob joined #minetest-dev
22:55 behalebabo joined #minetest-dev
23:25 Pexin speaking of heightmaps, is there already an out-of-engine heightmap importer of some kind? i had a 1/4 finished implementation in python, but dropped it
23:26 MTDiscord <Jonathon> doesnt gael de salley mapen have this?
23:28 MTDiscord <Jonathon> https://github.com/Gael-de-Sailly/mapgen_rivers refering to this, it seems i recalled in correctly
23:29 Pexin it wouldnt import an entire map of course, more like a 512^2 mapblock area
23:34 Pexin Jonathon: that one sounds slick though
23:53 AliasAlreadyTake joined #minetest-dev

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