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 2023-02-06 00:00:00Z and 2023-02-07 00:00:00Z
Avatar
There was a discussion about 0.7 lately… why was it even made?
Avatar
chillerdragon BOT 2023-02-06 08:00:04Z
Good catch pro! Yea sure I will :) (@Robyt3)
@ChillerDragon I commented on https://github.com/teeworlds/teeworlds/pull/3194. Can you also port this PR to ddnet after making the change?
10:15
idk how good it is tho
Avatar
Bro if these images are really from ai it's completely insane
Avatar
My question would be if these are human guided. AI with a humam filter can actually generate incredible art
Avatar
After the last ddnet pull I am receiving during cmake build /server/src/game/server/gamecontext.cpp: In member function ‘OnClientConnected’: /server/src/game/server/gamecontext.cpp:1544:100: warning: ‘operator delete’ called on unallocated object ‘gs_PoolDataCPlayer’ [-Wfree-nonheap-object] 1544 | m_apPlayers[ClientID] = new(ClientID) CPlayer(this, NextUniqueClientID, ClientID, StartTeam); | ^ /server/src/game/server/player.cpp:18:1: note: declared here 18 | MACRO_ALLOC_POOL_ID_IMPL(CPlayer, MAX_CLIENTS) | ^ any idea how to fix? (edited)
Avatar
Sounds like fails to see the overloaded delete operator. Maybe a false positive
12:11
What is your GCC version?
Avatar
Avatar
Jupstar ✪
What is your GCC version?
gcc version 11.3.0
Avatar
Mh Debian seems to only have 10 or 12
Avatar
Its compiled on Ubuntu
14:07
Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
Avatar
@Jupstar ✪ I want to continue with twgpu (once I stitched together a demo reader with libtw2) and some things are still a mystery to me in particular: how do you work around not having array texture bindings in the web? Array textures just seem so damn comfy. I would like to use them for tilemaps and in the future skins of tees. do you do a draw call for each skin/tee? Currently I hack around using array textures for tilemaps by using those 3D textures, but that will fall apart once I introduce mipmaps, since 3D/cube textures also collapse on the z axis in mip maps
14:16
do I need to create textures atlases? they seem annoying to work with
14:17
-> texture atlases also sound like they will be really annoying to create mip maps for, if that is even a thing, I'll have a look
14:18
yeah okay its possible with spacing but it still sounds weird to work with
Avatar
Avatar
Patiga
@Jupstar ✪ I want to continue with twgpu (once I stitched together a demo reader with libtw2) and some things are still a mystery to me in particular: how do you work around not having array texture bindings in the web? Array textures just seem so damn comfy. I would like to use them for tilemaps and in the future skins of tees. do you do a draw call for each skin/tee? Currently I hack around using array textures for tilemaps by using those 3D textures, but that will fall apart once I introduce mipmaps, since 3D/cube textures also collapse on the z axis in mip maps
There are no texture arrays? Use them for tile rendering.. Emscripten is gles3 compatible and they managed to make it work(as e.g. the webclient works) Is that a wgpu limitation or actual webgl limitation? For skins I split them on the cpu BCS gl1.x
14:39
Generally I have to say I am not really a fan of texture atlasses. They don't improve performance, they might make files a bit smaller and reduce io a bit. But they also make customization much harder I don't think u can easily mix them with skins anyway. Body is bigger than feet etc. I'd suggest for skin rendering split them or use integer sampling in shader. Or you need to render many tees at once on the GPU and want to put skins as whole in a texture atlasses? else I don't see a real use case? Also different sized skins make this harder again. Updating the texture can be costly as it is one chunk of memory. For tile maps they are a perfect fit tho^^
Avatar
ah, would you suggest a draw call for each tee? the transformations of the body parts is probably better calculated on the cpu, right?
Avatar
Avatar
Patiga
ah, would you suggest a draw call for each tee? the transformations of the body parts is probably better calculated on the cpu, right?
Well if cpu isn't a hard limit that is probably easier. If™️ we have skins similar to 0.7 u might have to do it anyway. But since u target gles3 u can defs simply use integer sampling
14:43
In glsl
Avatar
do you mean with integer sampling that I sample for an integer type instead of a float?
Avatar
Yeah basically u sample the texels itself
Avatar
isn't float better to get the interpolation?
Avatar
Yeah it's harder . But floats have a disadvantage as u not know the mipmap and even if u know. U won't get clamped edges
14:49
Then u have texture bleeding
Avatar
Avatar
Jupstar ✪
Well if cpu isn't a hard limit that is probably easier. If™️ we have skins similar to 0.7 u might have to do it anyway. But since u target gles3 u can defs simply use integer sampling
hm true one draw call for each tee probably results in easier code. one of my problems is that I still have zero clue which operations are expensive to which degree. I assumed that one draw call for all tees would just be much much more efficient and cleaner. for 0.7 skins it would be possible to create a texture array for each body part I suppose
Avatar
I thought glsl offers good functions. I can't find them rn tho.
Avatar
Avatar
Jupstar ✪
Then u have texture bleeding
okay I guess I'll just not even start with texture atlases as they will probably cause more harm than good
Avatar
Avatar
Jupstar ✪
I thought glsl offers good functions. I can't find them rn tho.
so far all my shaders are in wgsl, although wgpu also has optional support for spirv and glsl
Avatar
Avatar
Patiga
hm true one draw call for each tee probably results in easier code. one of my problems is that I still have zero clue which operations are expensive to which degree. I assumed that one draw call for all tees would just be much much more efficient and cleaner. for 0.7 skins it would be possible to create a texture array for each body part I suppose
Problem is. U somehow have to tell the GPU which tee uses which skins. And this requires either building up some buffer/CMD every frame. A draw call might carry extra dependencies about which sampler to use. But in the end it's probs not too much difference
14:52
Smaller textures also might be more cache friendly
14:53
I'd say if u don't create too many calls a draw call is very cheap
14:53
A draw call without state change is basically free
Avatar
oh interesting
14:54
"lifehack: get more fps by always using the same skin as your race partner"
14:55
you should add that to the gfx troubleshooting guide xd
Avatar
Avatar
Patiga
so far all my shaders are in wgsl, although wgpu also has optional support for spirv and glsl
Yeah. Interesting would be if there would already be finished shaders for such stuff. Custom sampling. But i guess not many ppl want this
Avatar
Avatar
Patiga
"lifehack: get more fps by always using the same skin as your race partner"
Yeah. It already uses the same vertices tho. Depending on how clever the driver is. The GPU keeps them in a fast cache
14:56
Esp. Since it's only very few vertices
Avatar
Avatar
Jupstar ✪
Yeah. Interesting would be if there would already be finished shaders for such stuff. Custom sampling. But i guess not many ppl want this
if you mean clamp modes and sampling type, those are all properties of the sampler, only partly defined in the shader?
14:58
I really need to figure out if texture arrays are a thing in the web, I'll have a look
Avatar
Avatar
Patiga
if you mean clamp modes and sampling type, those are all properties of the sampler, only partly defined in the shader?
In the end a sampler is also just a higher level component to help u out with this stuff
14:58
U could use a uniform buffer and do all stuff your own
Avatar
oh wow, so the sampler maps pretty directly to shader code? I had no idea
Avatar
It could be possible GPUs have extra instructions to do it faster
15:01
But considering how fast cuda cores are for many things. U could probs do stuff like this your own too
Avatar
Avatar
Patiga
I really need to figure out if texture arrays are a thing in the web, I'll have a look
They are
15:02
The webgl2 limits mention max texture array layers
Avatar
hrmpf yes also found it
15:06
I guess I'll open an wgpu issue, if its not too complicated I might try to implement it myself
Avatar
Only problem is probably that they have many backends don't they?^^
Avatar
Webgl shading language follows gles3. So you could fetch single texels
Avatar
Avatar
Patiga
wdym?
Don't they support dx11 on breakup
15:08
Desktop
Avatar
but wgpu won't allow me to create array texture sampler on webgl2
Avatar
I mean since u said, if it's easy to implement^^
15:11
they do group the backends into different support levels
Avatar
Avatar
Patiga
but wgpu won't allow me to create array texture sampler on webgl2
Is the only problem the sampler?
15:11
In their dev docs they mention texture arrays
Avatar
the texture binding as well
Avatar
I mean in ogl u bind a sampler to a texture slot
15:13
So only the texture has to support it
15:13
The sampler only does thing like interpolation
15:13
Ddnet VK code only uses like 9 samplers total
👍 1
15:13
They are used for all textures
15:14
In the shader u call texture with a vec3 iirc
Avatar
wait I am confused.
15:16
in wgpu, a bind group consists of binding resources (https://docs.rs/wgpu/latest/wgpu/enum.BindingResource.html). only TextureViewArray requires the feature enabled. but since textures can be array by themselves, you only need a BindingResource::Texture
15:16
aaaaaaaah
15:16
I think I always missed that difference
15:16
so it is already supported by wgpu
15:17
sendhelp
Avatar
Yeah sounds reasonable
Avatar
I guess TextureViewArray would be easier to work with, since then we would have individual allocations and don't have to update the entire thing
15:19
but it also just sounds fine with Textures that are arrays themselves
Avatar
Avatar
Patiga
I guess TextureViewArray would be easier to work with, since then we would have individual allocations and don't have to update the entire thing
Mh does it work like that?
Avatar
is there such a concept in graphics as a growable buffer/texture abstraction? ^^ like double or smth the size of the array whenever we reach the limit and leave the unused stuff uninitialised
Avatar
Spec only guarantees like 16 texture bindings
Avatar
the way I understand it is that it is one binding consisting of references to the different textures
Avatar
Avatar
Patiga
is there such a concept in graphics as a growable buffer/texture abstraction? ^^ like double or smth the size of the array whenever we reach the limit and leave the unused stuff uninitialised
Not really. GPU copying is probably not the fastest. The memory is very specialized on fast reading of large chunks
Avatar
Avatar
Patiga
the way I understand it is that it is one binding consisting of references to the different textures
That would be surprising
15:23
From the name it sounds like it's the texture view for a texture array
15:23
Every texture has a texture view
15:23
In case the internal image is compressed or stuff like that
Avatar
that is what threw me off every time
Avatar
From VK point of view at least
Avatar
TextureViewArray(&'a [&'a TextureView]), indicates however that we can use texture views from different textures
Avatar
Yeah true
Avatar
but its so very confusing, you might be right and my previous understand might be correct
Avatar
Why not call Ur array of texture view then xd
Avatar
Avatar
Patiga
but its so very confusing, you might be right and my previous understand might be correct
It's confusing. And to me the only logical explanation is that they wanted to abstract away multi texture bindings
15:26
But it has a completely different max limit per shader stage
15:26
Better be careful with it
Avatar
https://docs.rs/wgpu/latest/wgpu/enum.BindingType.html when we define the layout, there are no array variants, the texture is described by https://docs.rs/wgpu/latest/wgpu/enum.TextureViewDimension.html this does indicate that we need BindingResource::ViewArray
15:26
aaaarg
Avatar
Avatar
Patiga
https://docs.rs/wgpu/latest/wgpu/enum.BindingType.html when we define the layout, there are no array variants, the texture is described by https://docs.rs/wgpu/latest/wgpu/enum.TextureViewDimension.html this does indicate that we need BindingResource::ViewArray
Usually there is simply a depth Attribute
15:28
Is there none for texture views
15:28
Array layer referring to webgpu
15:30
Are they simply missing access functionality?
15:30
okay I'll open up an issue directly coz this is getting too weird
Avatar
But what exactly is the problem
15:31
U have textures that have a layer count and a texture view that allows to say what layers you want to view
15:31
That's all you need
15:32
One texture 2d array has one texture view
15:32
The texture view is simply a pre defined memory pointer
15:33
so a texture_view_array is simply an entirely different thing where you can throw together any kinds of texture views from different textures together
Avatar
Yes
15:34
I think this is simply multi texturing
15:34
The name is just bad
Avatar
#![deny(clippy::missing_const_for_fn)] add this on ur main module and rust will tell u to add const to functions that can have it, pretty pog
Avatar
but then how do you define the layout, when the BindingType doesn't differentiate between texture2darray and textureviewarray
Avatar
U use a single texture view
15:35
There is nothing like a viewarray
15:36
A texture view is the same for all possible textures
15:36
It already defines what of the texture u want to view
15:36
The view array they have in the enum struct is just a variant for multi texturing
15:37
It had nothing to do with the texture type
Avatar
ah you are right, the arrays are one layer above the BindingType https://docs.rs/wgpu/latest/wgpu/struct.BindGroupLayoutEntry.html#structfield.count
15:37
okay now everything seems to make sense, thank you :)
15:38
I guess the only problem with using a texture2darray is that every layer must have the same size
15:39
but I heard you have a strong opinion on skin size maximums, so I guess I can just scale them to the same size and it'll be just fine
15:40
ah that is if I use texture2darrays for the skins, but it does sound better to me rn
15:40
I'll see when I get there
Avatar
Avatar
Patiga
ah that is if I use texture2darrays for the skins, but it does sound better to me rn
If you want to do it in one draw call. How do u solve the transparency problem
Avatar
which one would that be? getting the limbs of the tees in the correct drawing ordeR?
Avatar
Yeah drawing order and blending
Avatar
#![forbid(unsafe_code)] #![deny(warnings)] #![deny(clippy::missing_const_for_fn)] #![deny(clippy::nursery)] #![deny(clippy::pedantic)] i added this on a project and fixed everything
15:52
im a madman
15:52
embrace idiomatic
15:52
BASEDDEPT
Avatar
@Jupstar ✪ do vertex buffers loop around if the index exceeds the buffer length?
Avatar
Avatar
Ryozuki
#![forbid(unsafe_code)] #![deny(warnings)] #![deny(clippy::missing_const_for_fn)] #![deny(clippy::nursery)] #![deny(clippy::pedantic)] i added this on a project and fixed everything
No unsafe is hard
Avatar
depends on what u do
Avatar
Avatar
Patiga
@Jupstar ✪ do vertex buffers loop around if the index exceeds the buffer length?
I doubt xd
Avatar
Avatar
Ryozuki
depends on what u do
Vulkan
15:55
What else
Avatar
well then yes
15:55
my project doesnt interact with ffi or drivers
15:55
xd
Avatar
Ez
Avatar
redox os should become popular
15:56
since the kernel is rust
15:56
rustlib is rust
Avatar
Nah
15:56
Micro kernels suck
15:57
@Jupstar ✪ using unsafe is not something inherently bad
15:57
if u gotta use it u gotta use it
15:57
just add a safety comment
15:57
actually there is a lint to require u adding a safety comment
Avatar
Depends
Avatar
Avatar
Jupstar ✪
Micro kernels suck
Can the version of opengl affect the quality of the game?
Avatar
Avatar
Deleted User
Can the version of opengl affect the quality of the game?
Yes
15:58
Gl1 ugly
Avatar
after all unsafe is there cuz the borrow checker is not perfect
15:58
but better than nothing
Avatar
Avatar
Jupstar ✪
Gl1 ugly
open gl 1.x? (edited)
15:58
or 1.0
Avatar
Avatar
Deleted User
open gl 1.x? (edited)
Yes and 2.0
Avatar
1.x
Avatar
just use vulkan
Avatar
3.0 is the first good one
Avatar
directx is ugly too
👍 1
15:59
like microsoft
Avatar
Avatar
Ryozuki
after all unsafe is there cuz the borrow checker is not perfect
I've missed feelings about this
Avatar
well its also cuz the borrow checker cant ensure safety of ffi
16:00
and native
Avatar
Avatar
Jupstar ✪
3.0 is the first good one
If I had a vulkan would the pixels be less visible when zoomed in?
Avatar
but the good thing about unsafe is safety encapsulation
Avatar
Sure u know where the bad memory access is. But if that results in having to resign every higher level stuff, then this unsafe was a design problem and not only unsafe.. kinda extrem case. But yeah
Avatar
Avatar
Deleted User
If I had a vulkan would the pixels be less visible when zoomed in?
? Xd
16:01
Is your monitor broken?
Avatar
Avatar
Deleted User
If I had a vulkan would the pixels be less visible when zoomed in?
vulkan does not provide higher-quality textures, those come from the maps/skins
Avatar
Avatar
Jupstar ✪
Is your monitor broken?
no
16:02
quality strange
Avatar
Avatar
Patiga
vulkan does not provide higher-quality textures, those come from the maps/skins
ok
Avatar
Show screenshots
16:03
And show what is wrong
Avatar
1 sec
Avatar
@Jupstar ✪ it looked better in my head, one draw call for each tee does look cleaner to implement, off the top of my hat, I'd say
  • a texture2darray with all skins pngs
  • a constant vertex array with the vertices for the different limbs, including position, uv
  • a tee-specifc vertex array with the step size { vertices of each limb }, which has the tranformation matrices for each limb, and maybe we also include the skin index here
Avatar
Avatar
Ryozuki
but the good thing about unsafe is safety encapsulation
Besides ash requires unsafe for every VK call anyway. I indeed only had one use case yet for unsafe
16:06
And that was a performance reason
Avatar
Avatar
Jupstar ✪
Besides ash requires unsafe for every VK call anyway. I indeed only had one use case yet for unsafe
ye i think ash is the low level
16:06
what about vulkano
Avatar
I don't want to use it
Avatar
Avatar
Jupstar ✪
And that was a performance reason
thats a valid reason, provided u know its safe
Avatar
Learning yet another high level graphics api sucks xd
16:07
but ye ash is all unsafe cuz it has to be
16:07
its unsafe to call any vulkan api
Avatar
I created a ray tracer with vulkano for uni once, it was pleasant to work with iirc
Avatar
not with the ray-tracing extension tho
Avatar
i need to get into vulkan and graphics again
Avatar
Avatar
Jupstar ✪
Besides ash requires unsafe for every VK call anyway. I indeed only had one use case yet for unsafe
Avatar
its always kidna fun
Avatar
Avatar
Jupstar ✪
Besides ash requires unsafe for every VK call anyway. I indeed only had one use case yet for unsafe
why do i see these pixels?
Avatar
Avatar
Deleted User
Click to see attachment 🖼️
2nd screenshot? And which renderer there?
Avatar
Avatar
Jupstar ✪
2nd screenshot? And which renderer there?
1.5.0
16:09
opengl
Avatar
Are u that one guy again tw?
16:10
Btw
Avatar
Avatar
Jupstar ✪
Are u that one guy again tw?
yes
Avatar
Avatar
Deleted User
why do i see these pixels?
It resizes the body
Avatar
Avatar
Jupstar ✪
It resizes the body
If I had a modern graphics card with Vulkan would those pixels be less visible?
Avatar
BCS gl1 does not require to support non power of two textures
Avatar
Avatar
Deleted User
If I had a modern graphics card with Vulkan would those pixels be less visible?
Yes
Avatar
Avatar
Jupstar ✪
Yes
a. ok
Avatar
U can also try a higher resolution skin
Avatar
Avatar
Jupstar ✪
U can also try a higher resolution skin
My maximum resolution is 1366x768
Avatar
Avatar
Deleted User
My maximum resolution is 1366x768
Do u have a github account?
Avatar
Avatar
Jupstar ✪
Do u have a github account?
yes
Avatar
Avatar
Jupstar ✪
Do u have a github account?
nick eeetadam
Avatar
Avatar
Deleted User
yes
Contribute to ddnet/ddnet-data-svg development by creating an account on GitHub.
16:16
There u can download high res vanilla skins
Avatar
Avatar
Jupstar ✪
There u can download high res vanilla skins
ok
Avatar
Avatar
Jupstar ✪
There u can download high res vanilla skins
I downloaded what next?
Avatar
Avatar
Deleted User
I downloaded what next?
Unpack and put skins in skins directory
16:20
U can open it by clicking it in the tee settings
Avatar
@Jupstar ✪ i found a meme
16:43
Avatar
Avatar
heinrich5991
maybe you could add something in the character
where i will check when the player hook in character entity?
Avatar
no, do it in gamecore
16:52
but you can add a field to the character core
Avatar
@heinrich5991 how to check if player is authed in the gamecore?
Avatar
add a field to the character core
16:54
bool m_Authed
16:54
then set that flag from outside
Avatar
hmm
Avatar
from player e.g., or character.cpp
Avatar
i will try
Avatar
Avatar
Ryozuki
@Jupstar ✪ i found a meme
its sad
Avatar
@heinrich5991 it worked!! thanks, but i'm setting on tick, there an way to set only when authed state changes?
Avatar
I don't know how
17:06
setting it each tick is okayish
Avatar
yes, thank you
Avatar
after i've turn on vsync on my laptop by misstake i got blackscreen.. any help (edited)
Avatar
Avatar
itube
after i've turn on vsync on my laptop by misstake i got blackscreen.. any help (edited)
"gfx_vsync 0"
18:39
and also update your GPU driver
18:39
vsync shouldnt create black screens
Avatar
Avatar
Jupstar ✪
"gfx_vsync 0"
already did
18:39
still getting black screen
Avatar
Avatar
itube
already did
u did what i posted in the screenshot?
Avatar
not using steam (edited)
18:40
all drivers fine
Avatar
then add it to the end of ddnet_settings.cfg
Avatar
Avatar
itube
all drivers fine
yeah totally fine
18:41
but without " in the cfg file
18:42
well still blackscreen
Avatar
whats ur hardware and opearting system
18:42
i3 4gb ram (edited)
18:43
i mean it was working, then i press on it by misstake and it was already black xd
Avatar
try gfx_gl_major 2 gfx_gl_minor 0 gfx_backend opengl
Avatar
in ddnet_settings.cfg?
Avatar
yes
18:44
also try to click "restart" in windows shutdown context menu
18:44
that makes a clean restart without caches
Avatar
im using linux
Avatar
mh ok
18:45
that makes stuff easier
Avatar
veri good!
18:45
🙂
Avatar
Hello, does anyone know how to put an lib on ddnet?
Avatar
open a terminal in ddnet directory and type ./DDNet "gfx_backend opengl; gfx_gl_major 1"
Avatar
Avatar
newlesstee
Hello, does anyone know how to put an lib on ddnet?
its too hard to explain, best is your first try to understand c++ ecosystem and cmake
Avatar
when i save it and start the client from console the settings getting reseted
Avatar
Avatar
Jupstar ✪
open a terminal in ddnet directory and type ./DDNet "gfx_backend opengl; gfx_gl_major 1"
lemme try
Avatar
Avatar
Jupstar ✪
its too hard to explain, best is your first try to understand c++ ecosystem and cmake
Could you give me an example?
Avatar
Avatar
newlesstee
Could you give me an example?
see the cmake directory
18:46
there u see how SDL2 was added
18:47
or opus
Avatar
Avatar
Jupstar ✪
open a terminal in ddnet directory and type ./DDNet "gfx_backend opengl; gfx_gl_major 1"
well worked, also one question too. im only getting about 30fps ingame.. any idea what i could do?
Avatar
@Jupstar ✪ so much things
18:48
you mean this?
Avatar
Avatar
itube
well worked, also one question too. im only getting about 30fps ingame.. any idea what i could do?
well you only said i3 what i3? there are like 20 versions of i3s
Avatar
i just want to add D++
Avatar
Avatar
newlesstee
you mean this?
no
Avatar
Avatar
newlesstee
you mean this?
on what operating system are u?
Avatar
linux
18:49
this?
Avatar
Avatar
Jupstar ✪
well you only said i3 what i3? there are like 20 versions of i3s
i3 M 330 2.13GHz x 2
Avatar
uff thats old
18:50
i guess u have to live with 30fps turn on entities, lower resolution
18:50
search in arch wiki
18:51
they often give help for old hardware
Avatar
i guess if i get 60 im fine
18:51
xd
18:51
im playing on my pc
18:51
but also nice when i can chill in bed and play there
Avatar
Avatar
Jupstar ✪
search in arch wiki
can u give me a link
Avatar
google can give u a link
Avatar
i hate google
Avatar
thats your problem
Avatar
and google me
Avatar
@Jupstar ✪ wow, only switched from vulkan to opengl and now i have over 300 fps
18:59
XD
Avatar
ah then u probably have a software renderer installed
19:00
probably lavapipe
Avatar
Avatar
Jupstar ✪
try gfx_gl_major 2 gfx_gl_minor 0 gfx_backend opengl
but that also means u didnt do all these commands right
19:01
bcs as u see they clearly reset to opengl
Avatar
Avatar
Jupstar ✪
try gfx_gl_major 2 gfx_gl_minor 0 gfx_backend opengl
because the config reset when i start ddnet
19:06
well im fine, played a bit with the settings.. got about 800 fps now
Avatar
epic gamer moment
Avatar
Avatar
newlesstee
Hello, does anyone know how to put an lib on ddnet?
pls, help
Avatar
An operating system generator, based on NixOS, that, given a config, outputs a small (47 MB), read-only squashfs for a runit-based operating system, with support for iPXE and signed boot. - GitHub ...
19:38
@Jupstar ✪ lel
Avatar
Avatar
Ryozuki
@Jupstar ✪ lel
generate tw os out of it
Avatar
i installed nix on my debian vps
19:47
ill tinker with it
19:47
one of the great thinks about nix is it doesnt require nixos
19:47
and nix-shell is awesome
Avatar
Avatar
newlesstee
Hello, does anyone know how to put an lib on ddnet?
Can someone help?
Avatar
it's probably too hard to explain for me
Avatar
I just wanted to add DPP(D++ for discord web hooks) to DDNet
Avatar
do you only want to send web hooks?
21:00
webhooks are simple https requests
21:00
you can simply do them with the built-in https client
Avatar
can you give me an simple example? @heinrich5991
Avatar
what OS are you on?
Avatar
linux
Avatar
Avatar
newlesstee
Can someone help?
quick tldr, but dont ping or dm later to help u (i wont answer): you need to create a FindLibraryName.cmake under cmake/ and then look at how another lib is added, like miniupnp, and u should figure it out easily
21:03
u need to know cmake
Avatar
"easily"
21:04
I can't do it "easily" either
Avatar
well its easy for me
21:04
xd
Avatar
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Avatar
depends on the library
21:04
if ur findcmake doesnt work usually u need to add .so to the hint name
21:04
i spend 30 mins sometimes withh that
Avatar
do you have a test discord webhook @newlesstee?
Avatar
i have created an web hook
21:05
but i want to use, i find the D++ that can help me
21:05
but i dont know how to add in CMakeLists
Avatar
can you share the URL, but replace the secrets with something else
21:06
this is how i added libsodium
Avatar
now type something like this in a terminal curl https://discord.com/api/webhooks/10722288278472198/WJ_ttmFzObJUevzn9L-QxUMVeFt8Fp24wZIba --data '{"content":"test"}' -H 'Content-Type: application/json'
Avatar
i want to do this in the DDNet server
Avatar
u should be able
21:08
ddnet has http
Avatar
yes, I understand. do you understand the curl request?
Avatar
Avatar
heinrich5991
yes, I understand. do you understand the curl request?
yes
Avatar
I'm trying to show you that it's simple HTTPS requests, we can do DDNet server next
21:08
I see
21:11
and then pass that to Engine()->AddJob()
Avatar
@heinrich5991 how to pass the json as char?
Avatar
yes
21:12
"{\"content\":\"test\"}"
Avatar
@heinrich5991 how to pass the type of std::unique_ptr<CHttpRequest> in AddJob?
Avatar
you might be able to just pass it
Avatar
While I don't find this way of butting your head against C++ to learn it very efficient, you are probably looking for something along the lines of make_unique<CHttpRequest>
21:36
We have many examples of it in the code
Avatar
they already have std::unique_ptr<CHttpRequest>
Avatar
Or maybe just a HttpGet
Avatar
learning c++ the ddnet way
21:37
new book by learath
Avatar
but need std::shared_ptr<IJob>
21:37
but CHttpRequest is derived from IJob
Avatar
error: cannot convert ‘std::unique_ptr<CHttpRequest>’ to ‘std::shared_ptr<IJob>’
Avatar
try Engine()->AddJob(std::move(your_unique_ptr)) (edited)
Avatar
Avatar
Ryozuki
new book by learath
I would never suggest anyone in a million years to take this approach, C/C++ just aren't very suited to this. Though I know we disagree on this 😄
21:40
this is a opportunity for a shameless plug
21:40
maybe this helps
21:40
its not related to http tho
Avatar
I know I'm going the wrong way, but eventually I'll learn
21:41
Difficult things make me motivated
21:41
we got a future dev here
Avatar
This version of rustup fixes a warning incorrectly saying that signature verification failed for Rust releases. The warning was due to a dependency of Rustup including a time-based check preventing the use of SHA-1 from February 1st, 2023 onwards.
>
Unfortunately Rust's release signing key uses SHA-1 to sign its subkeys, which resulted in all signatures being marked as invalid. Rustup 1.25.2 temporarily fixes the problem by allowing again the use of SHA-1.
21:41
using SHA1…
Avatar
in 2015 many ppl used sha1
Avatar
Avatar
heinrich5991
try Engine()->AddJob(std::move(your_unique_ptr)) (edited)
Where is the Engine()? i only see in client side
Avatar
but ye shame
Avatar
Avatar
newlesstee
Where is the Engine()? i only see in client side
ignore the Engine part, just call AddJob as before
Avatar
Like in an ideal world just the signatures inline std::unique_ptr<CHttpRequest> HttpGet(...) and virtual void AddJob(std::shared_ptr<IJob>) should just take you on one detour to class CHttpRequest : public IJob at that point the whole api should be quite clear
Avatar
learath writing a bible
21:44
tor being rewritten in rust, something I can get behind 🙂
Avatar
That is only possible if you know the different smart pointer types
Avatar
i sent this some time ago
21:44
nekospin
Avatar
ryo always faster
21:44
on the rust hype train
Avatar
im the internet observer
Avatar
Avatar
heinrich5991
This version of rustup fixes a warning incorrectly saying that signature verification failed for Rust releases. The warning was due to a dependency of Rustup including a time-based check preventing the use of SHA-1 from February 1st, 2023 onwards.
>
Unfortunately Rust's release signing key uses SHA-1 to sign its subkeys, which resulted in all signatures being marked as invalid. Rustup 1.25.2 temporarily fixes the problem by allowing again the use of SHA-1.
So, how will the proper fix be I wonder? Maybe splitting the upgrade line in 2?
Avatar
Avatar
heinrich5991
ignore the Engine part, just call AddJob as before
AddJob isnt declared
Avatar
Avatar
newlesstee
error: cannot convert ‘std::unique_ptr<CHttpRequest>’ to ‘std::shared_ptr<IJob>’
how did you get this error?
21:45
what code did you write?
Avatar
do a git diff and show us xd
Avatar
c++ std::unique_ptr<CHttpRequest> pWebhook = HttpPostJson("https://discord.com/api/webhooks/10723566778798/WJ_ttmFbJUevzn9L-QxUMVeFt8FpwraxpfFSHlvJsXMwYba", "{\"content\": \"New player joined!\"}"); AddJob(std::move(pWebhook));
Avatar
in which function is this?
Avatar
DDRace.cpp (i dont know if i can change this file but i'm only testing)
21:50
void CGameControllerDDRace::OnPlayerConnect(CPlayer *pPlayer)
21:50
@heinrich5991
Avatar
Avatar
Learath2
So, how will the proper fix be I wonder? Maybe splitting the upgrade line in 2?
try GameServer()->Engine()->AddJob(…)
Avatar
I'm guessing you meant a different reply 😄
Avatar
i love you xD
21:51
thanks ❤️
Avatar
Avatar
Learath2
So, how will the proper fix be I wonder? Maybe splitting the upgrade line in 2?
what is "upgrade line"? depending on the signing situation it's a bit hard and you need to maintain two signing paths
21:52
but maybe it's easy and you can just upgrade everything to sha256
21:52
another question is why someone chose sha1 after 2015
21:52
it was known-broken well before that
Avatar
As in what we have with update2.ddnet.tw update3.ddnet.tw etc. Split the line into two, one where you can upgrade all the way up to the last version with a sha1 signature, have a version that supports both signatures there and then future versions only support sha256
Avatar
Can't change src/engine code? I tried to change some things and it didn't compile
Avatar
you can change src/engine code as well
Avatar
what function of str replace an character?
Avatar
do you want to escape something for JSON?
22:08
we got JsonEscape for that
Avatar
@heinrich5991 i want to replace this char: `
22:10
to \` (edited)
Avatar
you mean " to \"
22:11
?
Avatar
why?
Avatar
ah
22:12
\`
Avatar
yes
Avatar
but \ `
Avatar
but " is good too
Avatar
escaping ` doesn't seem to work in discord
22:13
just an test\ `
22:13
dont work 😳
Avatar
A restoration of John Regehrs famous quiz on integers in C
22:19
mandatory test for C/C++ developers
22:19
got three mistakes ^^
Avatar
Avatar
heinrich5991
escaping ` doesn't seem to work in discord
how to remove it from char?
Avatar
manually, go through the string
22:22
and copy it over to a new buffer
22:23
but skip the ` (edited)
Avatar
omg
22:23
there no method for this? I can create one and send in PR?
Avatar
yes, I think that would be fine
Avatar
hello anyone know how to fix drop fps ingame +lag" laptop i7 12gen 16ram but i lag to much ty/
Avatar

Checklist (Dont need)

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/dd...
Avatar
all correct but SCHAR_MAX == CHAR_MAX was luck xD
22:34
never heard of schar_max
22:35
guess signed char
Avatar
yup
22:35
I went into the quiz and thought I should be able to get all correct
Avatar
ok one false the last
22:35
xD
Avatar
but in some questions I forgot some rule of C ^^
22:36
like int promotion
Avatar
i mean like 90% of the questions are about that xD
Avatar
unsigned short multiply(unsigned short a, unsigned short b) { return a * b; }
Avatar
yeah tricky
22:37
we even had a bug in a pr like that in ddnet
Avatar
ah ^^
Avatar
ok deen has 1k prs xD
22:38
not going to find it
22:38
but it was smth in system.cpp
Avatar
did anyone suggested the ability to set a SRV record to get the port ? (edited)
Avatar
Avatar
heinrich5991
escaping ` doesn't seem to work in discord
discords markdown parser is a bit of a doozy
23:11
Error does not occur, thus it is indeed defined for all values of x
23:16
Oh I guess it's still not defined since you could accidentally shift into the sign bit 😛
23:18
I got 2 mistakes, that one and this one
23:22
I was sure that was guaranteed to be 0, too much time spent on x86-64 😄
Avatar
Avatar
Learath2
I was sure that was guaranteed to be 0, too much time spent on x86-64 😄
we had a similar case a few weeks ago in ddnet 😄
Avatar
Huh, how? We avoid unsigned like it's the plague for some reason 😛
Avatar
well long on x86 (and windows x64) is 32bit
Avatar
Oh, just that part, yeah, I thought we had a conversion issue
23:29
Did you know that shorts and ints actually have the same minimum range allowed by the standard?
23:30
So it is actually possible to have an implementation of C where sizeof(int) == sizeof(short)
Exported 485 message(s)