Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2017-08-28 00:00:00Z and 2017-08-29 00:00:00Z
Avatar
<sctt_> @heinrich5991: i've finished map_image_replace tool, it works fine! :)
03:03
<sctt_> @heinrich5991: you think it's worth to make a PR on ddnet for this? maybe it's not so useful for you and you are not interested
03:03
<sctt_> @heinrich5991: let me know^^
Avatar
yes, make a pr
Avatar
<heinrich5991> sctt_: as deen said, make a PR, and if you're super awesome, also fix the map_resave tool :)
Avatar
<sctt_> guys before commiting map_image_replace tool i'd like to clean up the code a bit
16:45
<sctt_> but there is something i'm struggling with
16:47
<sctt_> currently i've copied and paste function LoadPNG into image_replace_image.cpp cause i wasn't able to include it from graphics_threaded.h
16:48
<sctt_> it's not a problem for me cause it works, but for an official commit i guess it's not that great
16:48
<sctt_> do you know if there is any better solution to integrate LoadPNG into a tool?
Avatar
where u buy ddnet servers?
17:04
i mean the provider
Avatar
<deen> @ezy which one specifically?
17:08
<deen> sctt_: move it to a separate header
17:08
<deen> include in both places
17:08
<deen> DDNet.tw, GER, USA: nfoservers
17:09
<deen> RUS: ihor.ru
17:09
<deen> Chile: zgh.cl
17:09
<deen> South Africa: clickworks.co.za
17:09
<deen> CAN: OVH
17:10
<deen> but they're just ~10 € virtual servers, nothing fancy
17:10
<sctt_> @deen: ok i will do that, but i'm not an expert of tw structure, can you tell me in which folder would you define that header and with which name?
17:10
<deen> and we used to jump isps pretty frequently due to ddos attacks, but not so much recently
Avatar
@deen y thats what i need ty
Avatar
<deen> sctt_: no idea :D
17:12
<deen> sctt_: but the tools link to game_shared and engine, so those are your options
17:13
<sctt_> @deen: can it be engine/shared/pngutils.h ?
17:15
<deen> ok i guess
17:15
<sctt_> ok :D
Avatar
Does anyone here have an idea why SDL2 (SDL however not) tries to disable compositing on kde (even most basic SDL2 programs only displaying an empty window) ?
Avatar
<heinrich5991> what is compositing?
Avatar
yes, that is exactly what I did too but now I wonder why SDL2 does this and SDL does not
Avatar
<deen> because compositing increases latency with an extra frame or two
19:07
<deen> SDL2 is frequently used for low latency applications like gaming
19:07
<deen> so disabling it is vital
19:07
<heinrich5991> what is compositing?
19:07
<deen> See people complaining about having 1 more frame of latency on Windows
19:07
<deen> with vsync for example, or some weird sdl2 behaviour
19:07
A compositing window manager, or compositor, is a window manager that provides applications with an off-screen buffer for each window. The window manager composites the window buffers into an image representing the screen and writes the result in...
Avatar
I see unfortunately it seems to break some things on kde, switching workspaces seems to freeze the game and results in timeouts for example. Not sure if this is an error of kde or SDL2.
Avatar
<sctt_> @heinrich55991 do you know if there is something special to do in ddnet to add a new .h?
19:16
<heinrich5991> add it to the cmakelists.txt, otherwise nothing
19:16
<sctt_> @heinrich55991 i've changed the MakeFile to add the new files
19:17
<sctt_> oh so i shouldnt touch the MakeFile
19:17
<heinrich5991> no
19:17
<heinrich5991> that is automatically generated
19:17
<sctt_> oh ok
19:17
<sctt_> i use make
19:17
<sctt_> is it allright?
19:17
<sctt_> i see you have bam and also other tools
19:18
<heinrich5991> yes, that is all
19:18
<heinrich5991> in fact, cmake will complain if you don't add it, and bam will pick it up automatically
19:18
<sctt_> i see
19:18
<sctt_> can i ask why you have two compilation tools? xD
19:20
<heinrich5991> because we're kind of in a transition
19:21
<heinrich5991> cmake isn't there yet
19:21
<sctt_> oh right that's what i thought
19:21
<sctt_> @heinrich5991 anyway i still have problems after modifying cmakelists.txt
19:22
<sctt_> i've got pnglite undefined references like this
19:22
<sctt_> pngutils.cpp:(.text+0x23): undefined reference to `png_init'
19:22
<sctt_> but in pngutils.cpp i've included
19:22
<sctt_> #include <engine/external/pnglite/pnglite.h>
19:23
<heinrich5991> sctt_: higlight me like this, with a colon instead of an @
19:23
<heinrich5991> I don't get highlighted by @s for some reason
19:24
<sctt_> heinrich5591: ok^^
19:24
<heinrich5991> ahh
19:25
<heinrich5991> you're misspelt my name :D
19:25
<heinrich5991> just type hein and press tab
19:25
<heinrich5991> the pnglite.h file just says "there is a function png_init, somewhere"
19:25
<sctt_> @heinrich5991 lol
19:26
<heinrich5991> but @ still doesn't seem to work ^^
19:26
<heinrich5991> you have to actually add the png_init function to your tool executable
19:27
<sctt_> heinrich5991: consider it is linking ddnet server
19:27
<sctt_> Linking CXX executable DDNet-Server
19:27
<heinrich5991> check line 836 of CMakeLists.tx
19:27
<heinrich5991> t
19:28
<heinrich5991> list(APPEND EXTRA_TOOL_SRC ${DEP_PNG})
19:28
<heinrich5991> that adds the png stuff to the TOOL if it matches the regex the line before
19:28
<heinrich5991> if(TOOL MATCHES "^(tileset_|dilate|map_extract$)")
19:29
<heinrich5991> you could add |your_tool_name there
19:29
<sctt_> i see
19:29
<sctt_> but how can i add it to the main binaries?
19:29
<sctt_> cause i've isolated LoadPNG also for graphic_trheated
19:30
<sctt_> in fact now it's failing when it tries to link DDnet-Server
19:30
<heinrich5991> hmm
19:31
<heinrich5991> not sure that we want a png library in the server
19:31
<heinrich5991> mh
19:31
<sctt_> yeah that's seem strange to me too
19:31
<sctt_> :/
19:31
<deen> @HMH update both?
19:31
<sctt_> only tools and src/engine/client/graphics_threaded.cpp includes that
19:33
<sctt_> [ 79%] Built target DDNet
19:33
<heinrich5991> sctt: dilate.cpp and tileset*.cpp also uses png stuff, btu without graphics_threaded
19:33
<heinrich5991> maybe you can pick up something from there?
19:33
<sctt_> thats what i did before
19:34
<sctt_> i copied and changed a bit LoadPNG function
19:34
<sctt_> but that deen suggested me
19:34
<sctt_> to create another .h file
19:34
<sctt_> and include that on both my tool and graphics_threaded
19:34
<deen> ah, so now the cpp has it too
19:34
<deen> that's wrong, my bad
19:34
<sctt_> so that's not possible? :(
19:34
<deen> you need to put the code somewhere else, so that it's not linked into the server
19:35
<sctt_> mmm
19:35
<deen> I guess there is nothing that's linked into client and tools, but not server
19:35
<heinrich5991> not sure if there's a good way to do this without creating a dependency nightmare
19:35
<sctt_> i see
19:35
<heinrich5991> also, the LoadPNG function doesn't really do a lot of work
19:35
<deen> well, you can make it an inline function in the header directly :D
19:35
<heinrich5991> argh
19:36
<heinrich5991> in dilate.cpp, there's a stripped down version of LoadPNG
19:36
<sctt_> you are the experts guys, thell me if it's better to just copy that function or try to include it somewhere
19:36
<heinrich5991> essentially:
19:36
<sctt_> oh
19:36
<heinrich5991> png_t png;
19:36
<heinrich5991> png_open_file(&png, filename);
19:37
<heinrich5991> if(png.color_type != PNG_TRUECOLOR_ALPHA) { /* abort */ }
19:37
<sctt_> yes i see
19:37
<heinrich5991> allocate, get_data, close_file
19:37
<sctt_> so i guess i'll stick with replicating part of the logic inside the tool itself
19:38
<sctt_> no .h
19:38
<heinrich5991> yeah :/
19:38
<heinrich5991> not the best solution, but I don't see a better one
19:38
<sctt_> yeah well we will live with that^^
Avatar
@deen nah, already running the latest
Avatar
<deen> then look for bug reports I guess
Avatar
<sctt_> heinrich5991: i've added map_replace_image tool, do you want to take a look? ^^
Exported 129 message(s)