Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/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 2024-12-06 00:00 and 2024-12-07 00:00
Avatar
i have dummy connect added to my swap keybind so i can just swap and it connects
03:11
it does however spam console which is a bit annoying
Avatar
demos are not teeworlds datafiles right?
Avatar
GitHub BOT 2024-12-06 04:52
Graphic errors (asset loading errors) during init are not translated ever, due to them being localized before localization files are load. I can only find this happening with graphics_threaded.cpp, we could delay the localization but this just feels easier and doesn't seem to break things.

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit tes...
Avatar
GitHub BOT 2024-12-06 05:17

Checklist

  • [x] 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
  • [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
I did?
05:24
oh didnt... commit anything
Avatar
GitHub BOT 2024-12-06 05:26

Checklist

  • [x] 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
  • [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
05:41
probably... should be a timeout on that
Avatar
GitHub BOT 2024-12-06 05:44
submitted as draft because i'm under the impression that we either prefers to use single quote to make it work or this script shouldn't be touched. if that's not the case then tell me to undraft. also found a missing line in graphics_threaded.cpp that is using double quotes. test cases: https://regex101.com/r/c3IWM0/1

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration ...
Avatar
wait no fucking way Localize is preprocessed by a python script
05:45
😢
Avatar
it's been like that since teeworlds i think
Avatar
surely it can just be a plain function
Avatar
wdym
Avatar
maybe inline stuff to make it figure out a hash
Avatar
Localize is a function
Avatar
it gets replaced by python?
Avatar
no?
05:51
the script just pulls the string from the source code and put them in txt files
Avatar
ah okay thats fine
Avatar
at least question our code gen for network.py first
Avatar
i already did that
05:53
but tbf code gen is pretty common tho
Avatar
GitHub BOT 2024-12-06 05:59

Checklist

  • [x] Tested the change ingame
  • [x] 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
  • [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
how tf does std:vector::embrace_back crash
Avatar
you can make any memory access crash with enough effort.
Avatar
ah
06:19
some LoadPng is threaded and if the texture produces warnings the string vector can crash
06:19
probably race condition?
Avatar
GitHub BOT 2024-12-06 06:28
If CGraphics_Threaded::LoadPng produces a lot of errors, the game randomly crashes. Probably because m_vWarnings was accessed in both the main thread on init and some jobs in the browser. I found this by commenting out the condition guarding m_vWarnings.emplace_back(FormatPngliteIncompatibilityWarning(PngliteIncompatible, pFilename)); and m_vWarnings.emplace_back(FormatPngliteIncompatibilityWarning(PngliteIncompatible, pContextName)); However, if local assets & community icons...
Avatar
I couldn't comment on security implications of this because I'm not qualified, but I have a hunch that this is not good for security?
06:30
the threaded load for community icons are remote after all
06:31
greenthing
Avatar
nah, i'm not adding mutex myself, i'll probably mess it up somehow.
06:39
i should make lunch and do my own project probably
Avatar
GitHub BOT 2024-12-06 08:05
c79b032 load localization early - TsFreddie 1f1e9c0 Merge pull request #9349 from TsFreddie/early-localization - def-
08:08
i not sure for what u need turn off destructive but i always use it and sometimes i just by accident click that combo and not every time notice it and its annoying. For me better remove this hot-key, btw why i cant change hot-keys in editor.
Avatar
GitHub BOT 2024-12-06 08:15
ad8b230 Add death sounds/particles on spike in practice - SollyBunny 53afd11 Merge pull request #9353 from SollyBunny/practice_spikes_look_like_kill - def-
Avatar
@Solly
Avatar
afternoon
Avatar
Avatar
Solly
#!/bin/env python3 from random import random from time import sleep MSGCOUNTDOWN = "%ss untill randomize" MSGRANDOMIZE = "tunes randomized" DELTA = 5 # seconds between each random FIFOPATH = "./fifo.fifo" TUNES = { ("ground_control_speed", 4.00, 14.00), # Maximum running speed on the ground. (Higher values make the character move faster). ("ground_control_accel", 0.50, 4.00), # Acceleration on the ground. (Higher values make the character speed up faster). ("ground_friction", 0.30, 1.00), # Ground friction. (Higher values make the character stop faster). ("ground_jump_impulse", 8.00, 18.00), # Jump force from the ground. (Higher values make the character jump higher). ("air_jump_impulse", 6.00, 16.00), # Jump force in the air. (Applies to double jumps; higher values allow higher jumps). ("air_control_speed", 2.00, 9.00), # Maximum speed when moving in the air. (Higher values allow faster air movement). ("air_control_accel", 0.50, 3.00), # Acceleration in the air. (Higher values allow quicker changes in air movement). ("air_friction", 0.70, 1.10), # Air friction. (Higher values reduce the character's air speed more quickly). ("gravity", 0.30, 0.80), # Gravity strength. (Lower values make the character float longer; higher values make them fall faster). } def write(s): with open(FIFOPATH, "w") as fifo: fifo.write(s) print(s) sleep(1) while True: out = "broadcast %s\n" % MSGRANDOMIZE for name, min, max in TUNES: value = min + random() * (max - min) value = round(value, 2) out += "tune %s %s\n" % (name, value) write(out) if DELTA > 3: sleep(DELTA - 3) for i in range(3): write("broadcast " + MSGCOUNTDOWN % (3 - i)) sleep(1) else: sleep(DELTA) @Evelyn
You can write a script that just sends a broadcast every 3600 seconds that I specify
08:50
?
Avatar
edit it urself :D
Avatar
I won't be able to:(
Avatar
skill issue
08:51
ask chatgpt
Avatar
Avatar
Evelyn
#!/bin/env python3 from time import sleep MSGRANDOMIZE = "Подпишись на наш Telegram @serv! На 500 подписчиков будет крупный розыгрыш на слоунет. Также у нас дешевыйслоунет и слоунет!" DELTA = 3600 # интервал между сообщениями в секундах FIFOPATH = "./fifo.fifo" def write(s): with open(FIFOPATH, "w") as fifo: fifo.write(s) print(s) sleep(1) while True: write(f"broadcast {MSGRANDOMIZE}") sleep(DELTA) (edited)
My script no work
Avatar
Avatar
Solly
ask chatgpt
It does not give out correctly
Avatar
♂S1mple♂ 2024-12-06 08:57
Then learn the programming language and do it
08:57
Or at least pay someone to do this silly stuff
08:58
Weird how long chiller was doing this for free
09:00
I would understand if you'd try to do something, ran into issue and specified it here, but asking debugging ai code or asking doing from scratch for free is just not polite
Avatar
this makes me so mad
Avatar
Avatar
TsFreddie
how tf does std:vector::embrace_back crash
welcome to c++
Avatar
Avatar
TsFreddie
I couldn't comment on security implications of this because I'm not qualified, but I have a hunch that this is not good for security?
Jupstar ✪ 2024-12-06 09:30
any bug like that is potentially a problem. an attacker just has to find a way to abuse it
Avatar
i wanted to fix it, but i'm bored
Avatar
Jupstar ✪ 2024-12-06 09:31
i just wait for ryo to pop up telling me it wouldn't have happened with rust
Avatar
Jupstar ✪ 2024-12-06 09:31
back when ryo had no gf, it took -15 seconds for him to say it
09:32
he basically spammed that the whole day and once someone opened an issue, he could say: SEE
Avatar
i'm still strugging with shader depth
🦈 1
09:32
Avatar
Jupstar ✪ 2024-12-06 09:32
what is your problem
09:34
isn't blender one of these mfckers that use z as up coordinate
Avatar
Avatar
Jupstar ✪
isn't blender one of these mfckers that use z as up coordinate
im sorry to inform you its not just "One of"
Avatar
Avatar
Jupstar ✪
isn't blender one of these mfckers that use z as up coordinate
not that z
Avatar
it was actually minecraft who lied
Avatar
Jupstar ✪ 2024-12-06 09:34
that should be illegal
Avatar
Avatar
Jupstar ✪
that should be illegal
i agree
Avatar
Avatar
TsFreddie
Click to see attachment 🖼️
Jupstar ✪ 2024-12-06 09:35
if you tell me what your problem is, i might be able to give you a gpt like answer that sounds good but does not help at all
Avatar
not if you use cryengine
09:35
09:35
the real illegal one is unreal
Avatar
hm, I'm left handed kek
Avatar
i was tought in school z up and it screwed with me
09:36
(im right handed btw)
Avatar
gotta use Unity, then
Avatar
Avatar
Solly
i was tought in school z up and it screwed with me
Jupstar ✪ 2024-12-06 09:36
no way
09:36
u american?
Avatar
bri'ish
Avatar
Jupstar ✪ 2024-12-06 09:36
or where do they teach you that
Avatar
a level further maths
Avatar
Avatar
Jupstar ✪
if you tell me what your problem is, i might be able to give you a gpt like answer that sounds good but does not help at all
i'm trying to get a screenspace depth value manually by transforming a vertex position from view space to clip space. but the result doesn't match godot's result of depth value
Avatar
Jupstar ✪ 2024-12-06 09:37
impressive
Avatar
Avatar
Jupstar ✪
impressive
i dropped it i just wanted to feel cool
Avatar
Avatar
Jupstar ✪
if you tell me what your problem is, i might be able to give you a gpt like answer that sounds good but does not help at all
the application problem is that i want to try to make a inverted hull outline to separate between objects somehow, i haven't math'ed that part out tho
09:39
otherwise it does this
09:39
tw tee has a leg
09:39
its not just disembodiedleggied feet confirmed (edited)
Avatar
Avatar
Solly
its not just disembodiedleggied feet confirmed (edited)
still is, it's just the hull clipping into the body
Avatar
Avatar
TsFreddie
i'm trying to get a screenspace depth value manually by transforming a vertex position from view space to clip space. but the result doesn't match godot's result of depth value
Jupstar ✪ 2024-12-06 09:40
do you have an output of the value itself to compare it against what godot's output or smth. sometimes they flip the coordinate systems
Avatar
Avatar
Jupstar ✪
do you have an output of the value itself to compare it against what godot's output or smth. sometimes they flip the coordinate systems
it's hard to check values for shader, i haven't dig through godot's code yet, so i should just do that
Avatar
what are you doing with the depth value
Avatar
Avatar
Jupstar ✪
back when ryo had no gf, it took -15 seconds for him to say it
good days
Avatar
Avatar
TsFreddie
the application problem is that i want to try to make a inverted hull outline to separate between objects somehow, i haven't math'ed that part out tho
Jupstar ✪ 2024-12-06 09:42
can't you do that with a stencil just as fine?
Avatar
Avatar
Jupstar ✪
can't you do that with a stencil just as fine?
godot doesn't have stencil yet
Avatar
Jupstar ✪ 2024-12-06 09:42
WAAT
Avatar
godot doesn't have Z offset either, which is pretty easy to do in unity lol
Avatar
wat
Avatar
Avatar
Jupstar ✪
can't you do that with a stencil just as fine?
well they do have stencils but only internally
Avatar
Implements godotengine/godot-proposals#4468 Exposes material render priority properties, to allow stacking sprites and labels with the pre-defined order and avoid z-fighting. Two labels with the di...
Avatar
sometimes there's some operation you need to do to linerize the depth
Avatar
cant u do it with this
09:44
render priority
Avatar
idk if that's relevent for you
Avatar
Jupstar ✪ 2024-12-06 09:45
Complete cel shader for Godot 4. Contribute to eldskald/godot4-cel-shader development by creating an account on GitHub.
09:45
hehehe
Avatar
Complete cel shader for Godot 4. Contribute to eldskald/godot4-cel-shader development by creating an account on GitHub.
Avatar
Avatar
Ryozuki
cant u do it with this
if i want to put the outline behind everything probably. currently i'm using depth so rendering order does not matter.
Avatar
that's just the hull with the grow width pre calculated in view space
09:48
same thing
Avatar
the thing you want doesn't really sound possible?
Avatar
it is in unity, i've done it
Avatar
how are you supposed to know if the outline is behind or in front of something in an order-indepedant way?
Avatar
depth comparison, i just need to shift depth a bit
Avatar
depth comparing what to what
Avatar
but godot doesn't let you do that, so i'm hard writing into depth manually
09:50
using a shifted depth value compared to the value in the depth buffer...
Avatar
but isn't there always going to be some depth where the clipping happens?
Avatar
yes, but i just need to shift it a little bit so it is not this blatant. justatest
Avatar
but if you offset it forward the ones that are behind stuff will be in front
Avatar
look, i've already done it in unity in a commercial product. i'll just try a bit more and if it doesn't work out i'll use post process or some other way.
Avatar
it will look like this?
Avatar
no
09:53
it will look like this
09:54
ignore the color
Avatar
ddnet 3d update?
Avatar
doesn't it require sorting to do it that way tho?
Avatar
Avatar
Sans
ddnet 3d update?
Ddnet 3d before GTA 6 gg
Avatar
Jupstar ✪ 2024-12-06 09:55
TEEWORLDS VR
Avatar
i'd be so down bad for 3D ddnet
Avatar
guys, 3d rendering stopped sorting opaque objects since like forever.
09:55
justatest
Avatar
Twinbop 3D boom
09:56
smh
Avatar
Avatar
TsFreddie
same thing
Jupstar ✪ 2024-12-06 09:58
so does it work already or what is this screenshot?
Avatar
Avatar
Jupstar ✪
so does it work already or what is this screenshot?
i moved the feet forward to show what i want
09:59
kek
Avatar
idk how you can use just the depth buffer and the depth of the outline hull to figure out the render order without sorting, it sounds impossible
Avatar
Jupstar ✪ 2024-12-06 10:00
i think he simply wants to create a second mesh moved a bit further into the back
10:00
or not?
10:00
xd
Avatar
he's doing that already, the issue is the second mesh clips into the other ones (edited)
Avatar
I am going to LOSE MY MIND
Avatar
Avatar
Jupstar ✪
i think he simply wants to create a second mesh moved a bit further into the back
kinda but in screen space
Avatar
I have been at this for FIVE HOURS
Avatar
hence shader
Avatar
I'm passing around a ([String], ((Int, Int), (Int, Int))) because I'm not allowed to have proper state
Avatar
what is the intended behavior when the foot is intersecting the tee body, will the outline render above or below the tee?
Avatar
You know it's bad when your data types look like lisp
Avatar
Avatar
TsFreddie
kinda but in screen space
Jupstar ✪ 2024-12-06 10:04
yes, then i'd expect an output like https://discord.com/channels/252358080522747904/293493549758939136/1314528918514171949 but if you don't get that, i assume you should compare if the screenspace coordinates are flipped again or smth. can't you like print the projection matrix and look if z is negative scaled or not
Avatar
Avatar
risu
I'm passing around a ([String], ((Int, Int), (Int, Int))) because I'm not allowed to have proper state
Thanks functional programming, very cool
Avatar
Avatar
Jupstar ✪
yes, then i'd expect an output like https://discord.com/channels/252358080522747904/293493549758939136/1314528918514171949 but if you don't get that, i assume you should compare if the screenspace coordinates are flipped again or smth. can't you like print the projection matrix and look if z is negative scaled or not
i can't print in godot shader
Avatar
Avatar
TsFreddie
i can't print in godot shader
Jupstar ✪ 2024-12-06 10:05
is there no renderdoc like debugger?
Avatar
Avatar
Learath2
Thanks functional programming, very cool
I mean, destructuring that mess would be really easy if I was allowed to use pattern matching, but then I'd be binding variables, and that's a no no around here
Avatar
the renderdoc-like debugger is renderdoc
Avatar
i actually never knew how to print shader stuff. i only used renderdoc as a profiler before
10:05
godot doesn't have built-in graphic debugger
Avatar
do any engines?
Avatar
Jupstar ✪ 2024-12-06 10:06
how can they have 3 quadrillion contributors but not have smth like this xd
Avatar
unity has a frame analyzer that shows you buffers in each draw call and the uniform values
Avatar
that's pretty basic
Avatar
but godot has none
Avatar
I don't know of any engines that do anything close to what renderdoc does, I think you just use renderdoc
Avatar
yes
Avatar
you can still do visual debugging by outputting colors
Avatar
i am doing that
Avatar
Avatar
TsFreddie
same thing
This is a weird artifact, how did this happen 😄
Avatar
Avatar
Learath2
This is a weird artifact, how did this happen 😄
what artifact
10:09
there is no artifacts, inverted hull just looks like that brownbear
Avatar
Ooooh, I see what's going on there
Avatar
Jupstar ✪ 2024-12-06 10:11
just emulate a stencil yourself
10:11
just rewrite godot at that point
Avatar
Avatar
Jupstar ✪
just emulate a stencil yourself
i think using stencil usually looks like this tho.
Avatar
So you are trying to fix this by messing with the depth buffer by hand?
Avatar
Avatar
Learath2
So you are trying to fix this by messing with the depth buffer by hand?
yep
Avatar
I guess that does sound doable, you should be able to just pull out the outline and render it in front of the tee closer to the camera
10:14
Though idk how you'd hide the pieces that are supposed to be behind the solid parts like that though
10:14
A curious problem, I wish you many luck
Avatar
Avatar
Learath2
Though idk how you'd hide the pieces that are supposed to be behind the solid parts like that though
i'm trying to shift depth towards object's local origin but without going over the hull growth length.
Avatar
Jupstar ✪ 2024-12-06 10:17
just fireup renderdoc already
Avatar
so origin in front = outline more likely in front
10:17
pepeW (edited)
Avatar
Avatar
Jupstar ✪
just fireup renderdoc already
i've done nothing in the past 10 minutes, i'm just here chatting
10:18
i will
10:18
catbite
Avatar
it is the shader yes
Avatar
Avatar
Evelyn
My script no work
Help
Avatar
Avatar
TsFreddie
it is the shader yes
Jupstar ✪ 2024-12-06 10:20
i already don't understand how e.g. ungrow works. is it used somewhere magically?
Avatar
no
10:21
it's just me trying stuff without deleting old stuff
10:21
the actual shader in that screenshot is like 4 lines
10:21
probably don't read into it too much
Avatar
Jupstar ✪ 2024-12-06 10:22
i honestly don't understand your shader at all xD
Avatar
if you are wondering, this is literally inverted hull
10:22
10:22
so this is the shader in that screenshot
10:22
wait, not that one
10:22
oops
Avatar
Jupstar ✪ 2024-12-06 10:22
but why is the projection matrix not fired in the vertex shader
Avatar
it was already done by godot, you just need to shift it
Avatar
Jupstar ✪ 2024-12-06 10:23
oh ok
10:25
i am surprised about the shader output tho
10:25
maybe your problem lies somewhere else xd
Avatar
And it's normal that my server doesn't show the path of the grenade projectile , there's just a shot and then a second later the arrival
Avatar
it's not really a problem
10:25
i'm just trying things
10:25
the clipping is expected for inverted hull method
10:25
pretty common
10:27
burh, i could just shift fragcoord.z, what am i doing
Avatar
Jupstar ✪ 2024-12-06 10:27
so 0.001 is still too big or what
Avatar
Avatar
TsFreddie
Click to see attachment 🖼️
Jupstar ✪ 2024-12-06 10:28
hot
Avatar
Jupstar ✪ 2024-12-06 10:36
@TsFreddie are the normals multiplied with the inv projection matrix btw? or how does that work
Avatar
NORMAL is in model space
Avatar
Jupstar ✪ 2024-12-06 10:37
would that need to be in screenspace too xd
10:37
wouldnt
Avatar
VERTEX is also in model space i think. it get's converted into view space later by godot
Avatar
Jupstar ✪ 2024-12-06 10:37
😮
Avatar
inout vec3 VERTEX Vertex in local coordinates.
10:38
Spatial shaders are used for shading 3D objects. They are the most complex type of shader Godot offers. Spatial shaders are highly configurable with different render modes and different rendering o...
10:38
it is in view space in frag
10:38
in vec3 VERTEX Vertex that comes from vertex function (default, in view space).
10:40
if you really don't want engine to do that, there's a flag for it skip_vertex_transform
Avatar
Jupstar ✪ 2024-12-06 10:40
It's really sad how the brain forgets about lots of stuff xd
10:40
i did all the 3d math once
Avatar
i don't actually do 3d math i think....
Avatar
Avatar
TsFreddie
if you really don't want engine to do that, there's a flag for it skip_vertex_transform
Jupstar ✪ 2024-12-06 10:41
turn this to true.. Then you can do all the math
10:41
ok u get all the matrices as globals
10:41
boring xd
Avatar
at this point is just what space it is in, what do i want to do to it. i don't calculate anything mentally anymore.
10:45
mat4 is for converting spaces, dot for checking direction differences, cross for getting an axis from two vectors, how they do it? no idea. what's the result? doesn't matter, i'll just plug them in and see. something doesn't look right? probably cuz i forgot a normalize somewhere.kek
Avatar
Avatar
TsFreddie
Click to see attachment 🖼️
WOOO Celebrate
Avatar
I CAN DO BETTER
Avatar
chillerdragon BOT 2024-12-06 11:16
I have the same problem!
Replying to @Solly i have dummy connect added to my swap keybind so i can just swap and it …
Avatar
im setting a uniform per model to tell them the body's center. so i can shift depth just in front of or behind the body's sphere
11:16
InsaneCat
Avatar
chillerdragon BOT 2024-12-06 11:18
The dummy debug print update is quite nice and useful. But having no way to turn off the intense spam of a shared connect/swap bind is horrible. @Solly I was thinking of adding a connect_dummy_if_not_connected custom command to my client to solve it,
Avatar
aRe YoU ScArEd Of PRing CoFiG?
Avatar
chillerdragon BOT 2024-12-06 11:18
I have the same issue for binding the exec command that also prints to the console. So I can not use it for some common binds
Avatar
Skibidisigma 2024-12-06 11:26
How to speed up the level completion timer?
Avatar
can anyone answer me where located enums like "PLAYERFLAG_PLAYING" i found it only in build folder in generated folder.
Avatar
Jupstar ✪ 2024-12-06 12:00
some python scripts
12:01
search for PLAYING maybe
Avatar
hm, okay
Avatar
Should be in network.py
12:05
yep, datasrc/network.py:L7 PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]
Avatar
dont we have 6 flags now
12:06
nouis
12:07
insert fitting insult for my boss here - brb 3hours, i actually need to do shit
Avatar
Avatar
meloƞ
dont we have 6 flags now
probably is getting reverted
Avatar
yes please. kek - dont want to hate on your work but playerflags are so damn precious
Avatar
tatar was thinking on some other ways to fix that coordinate switch
Avatar
Avatar
TsFreddie
probably is getting reverted
We have 6 now?
Avatar
Avatar
Learath2
We have 6 now?
i used one
Avatar
What for?
Avatar
Avatar
Learath2
yep, datasrc/network.py:L7 PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]
thanks
Avatar
Avatar
Learath2
What for?
#9318
Avatar
Fixes #8810. Also prevents character flashing when switching to free view, especially in high ping servers. Added a new PLAYERFLAG_SPEC_CAM to hint server which camera type the client is currently ...
Avatar
Avatar
meloƞ
yes please. kek - dont want to hate on your work but playerflags are so damn precious
it's crazy that i didn't think of that
Avatar
tbf if they are so valuable we'd have invented a way to add more of them
Avatar
Avatar
Learath2
tbf if they are so valuable we'd have invented a way to add more of them
there is a server to client only EXPLAYERFLAGS
Avatar
they are pretty much useless given we didn't use one in almost a decade 😄
Avatar
i only used it cuz it is just tied to the input which is kinda needed for that fix
Avatar
I remember investigating this one in the past and just deciding it was too much hassle to fix properly
12:18
But IMO the proper way is to use an input flag, the entire issue is because spec state is not properly tied to input state
Avatar
i thought playerflag is a inputflag
Avatar
yes
12:19
I just didn't use the correct terminology
Avatar
i think the point is that we don't want to use it InsaneCat
Avatar
Do we really not want to use it? We control both the client and the server nowadays, we can just bump up the size of the playerflags somehow, I'm pretty certain
12:22
In the olden days it was a huge issue because we didn't control the client
Avatar
Skibidisigma 2024-12-06 12:22
How to speed up the level completion timer?
Avatar
i think people are trying to find a better use for it before we commit to using up another bit
12:22
also it messes up bot detection for now
Avatar
eh, bots who used playerflags for secret communication are a veeery 0.5 thing
Avatar
Avatar
Skibidisigma
How to speed up the level completion timer?
Skibidisigma 2024-12-06 12:22
Hey
Avatar
Avatar
Skibidisigma
How to speed up the level completion timer?
Play faster? I don't understand what you want
Avatar
Avatar
Learath2
Play faster? I don't understand what you want
Skibidisigma 2024-12-06 12:23
I wanna to make timer go faster
Avatar
Avatar
Learath2
eh, bots who used playerflags for secret communication are a veeery 0.5 thing
funny thing is that with that pr noby servers straight up bans you. although i'm sure they can just fix it on their end.
Avatar
Avatar
Skibidisigma
I wanna to make timer go faster
You can't without some very complex modification of the client and the server
Avatar
Avatar
Learath2
You can't without some very complex modification of the client and the server
Skibidisigma 2024-12-06 12:24
I saw map which make timer go from 5 seconds to 20 mins
Avatar
Avatar
TsFreddie
i think people are trying to find a better use for it before we commit to using up another bit
Did Tater have any ideas on how he'd fix it without using up a flag?
Avatar
Avatar
Skibidisigma
I saw map which make timer go from 5 seconds to 20 mins
We have an "add time" tile you can use
12:25
It won't go faster but it will add some time to the timer
Avatar
Avatar
Learath2
Did Tater have any ideas on how he'd fix it without using up a flag?
we discussed a bit, i think there was a idea of sending a tick info along with the camera state using a netmessage
Avatar
Avatar
Learath2
We have an "add time" tile you can use
Skibidisigma 2024-12-06 12:25
Aaaa
12:25
Ok
Avatar
my thought is that might be network dependent, i believe netmessages are different packets?
Avatar
Avatar
TsFreddie
we discussed a bit, i think there was a idea of sending a tick info along with the camera state using a netmessage
Mhhhhhhhh, you hit the age old issue of snaps/inputs not being synchronized to netmessages at all
Avatar
there also might be a client side method hidden some where
Avatar
(The entire issue is this btw, the netmsg that puts the client into spec is not properly synchronized to the input/snaps)
Avatar
Avatar
Learath2
We have an "add time" tile you can use
Skibidisigma 2024-12-06 12:27
Then u need to configure both server and client? To make timer go faster
12:27
Recompile
Avatar
Avatar
Skibidisigma
Then u need to configure both server and client? To make timer go faster
Not just configure. You need to write a lot of code to modify that kind of stuff
Avatar
Avatar
Learath2
Not just configure. You need to write a lot of code to modify that kind of stuff
Skibidisigma 2024-12-06 12:28
Server and client?
Avatar
Avatar
Learath2
(The entire issue is this btw, the netmsg that puts the client into spec is not properly synchronized to the input/snaps)
oh also i think i had an idea of always using a single target space somehow
Avatar
Avatar
Skibidisigma
Server and client?
I think so, but I'm not sure, I didn't ever try it before
12:29
Server definitely
Avatar
like if your tee exists you always send the target relative to your tee.
12:30
oh nvm, there still will be a jump after unpause. (edited)
12:30
InsaneCat then ye, that's about what we've discussed
Avatar
Well I don't mind the playerflag, but if you do find a way to avoid it I guess that's fine too
12:31
Enjoy
Avatar
it won't be me finding it probably
12:31
kek
12:31
probably someone else finds it or just revert it and won't fix
Avatar
I would like to know how I can get the flag as in the gamemode ctf or as in the video, without changing the source code of the server and without installing other modifications for the server
Avatar
you can modify clients to render it
12:37
otherwise it is a server mod
12:37
no other way around it
Avatar
Thanks. I'll do it
Avatar
Avatar
Learath2
eh, bots who used playerflags for secret communication are a veeery 0.5 thing
and still noby fng bans any non standard flags client xd
14:05
k client used flags afair
Avatar
Avatar
Learath2
You don't have to. The OO lobby has poisoned your mind. Polymorphism isn't the only way to write code
but imagine yourself making all in one c based game engine, i don't really see any other way to write such a huge thibg without using oo
14:10
you will mimic them anyway, even if didn't want to do it
Avatar
I mean OOP mimics real life in a way, so you can say almost anything you do "mimics OOP" in a way
14:11
My issue is with polymorphism and inheritence, not stuff like methods
Avatar
Avatar
Learath2
My issue is with polymorphism and inheritence, not stuff like methods
as data structure you mean?
Avatar
Wym?
Avatar
I'm back to torturing myself and now I'm failing to write a foldr such that it terminates given an infinite list...
Avatar
Avatar
Learath2
My issue is with polymorphism and inheritence, not stuff like methods
can you expand this a bit? i can't get it right
Avatar
Avatar
zhn
can you expand this a bit? i can't get it right
I don't like inheritence and polymorphism. I don't want to see you inherit methods/fields from a child class. I don't want to see you calling virtual methods
Avatar
MilkeeyCat 2024-12-06 14:16
Today I unlocked a new crash error, bus error
Avatar
You can however have methods in your "class", you can have classes in classes. Those I don't mind
Avatar
Avatar
Learath2
I don't like inheritence and polymorphism. I don't want to see you inherit methods/fields from a child class. I don't want to see you calling virtual methods
how would you replace usage of polymorphism and inheritance?
Avatar
Avatar
Learath2
You can however have methods in your "class", you can have classes in classes. Those I don't mind
And for this you could just as well use structs and functions :)
Avatar
Avatar
zhn
how would you replace usage of polymorphism and inheritance?
Design your program such that neither is relevant
Avatar
Avatar
zhn
how would you replace usage of polymorphism and inheritance?
Well just don't use them? Idk how to explain something so natural to me
Avatar
Avatar
risu
Design your program such that neither is relevant
so we can rewrite teeworlds in c without it being spaghetti right justatest
Avatar
Entity component systems avoid inheritence e.g. If you want to look at an example
14:20
Another option is generics, I don't mind those
Avatar
Avatar
zhn
so we can rewrite teeworlds in c without it being spaghetti right justatest
Well, I'm not sure if we specifically could pull that off justatest
Avatar
yeah, i have seen generics impl in rust, cpp ecs are mostly inheritance or polymorphism based
14:21
and flecs c ecs just reimplements inheritance and polymorphism afair justatest
Avatar
Avatar
zhn
and flecs c ecs just reimplements inheritance and polymorphism afair justatest
this can be false tho
Avatar
It boils down to avoiding dynamic dispatch, you know every component attached to an entity at compile time (not always but imagine if you did for a second). This means you no longer need virtuals
14:23
And entities do not inherit fields from components, a character is not a physics object, it just contains a physics component. So no inheritence
14:24
dcb4034 Update Ukrainian l10n (18.8) - EGYT5453 a771b92 fix style - def- 3fb0e14 Merge pull request #9348 from EGYT5453/ua-18.8 - def-
Avatar
Avatar
Learath2
And entities do not inherit fields from components, a character is not a physics object, it just contains a physics component. So no inheritence
in my mind i have an example of teeworlda client components, i don't know how to em in a sane way without OO
14:32
compose em*
Avatar
Avatar
zhn
and flecs c ecs just reimplements inheritance and polymorphism afair justatest
checked flecs, looks like full powered runtime db written in c to use as ecs
Avatar
Avatar
zhn
in my mind i have an example of teeworlda client components, i don't know how to em in a sane way without OO
That's the easiest example to replace since we don't add components at runtime. Just don't have virtual calls and instead of looping through an array of components just call the methods of each
Avatar
Avatar
Learath2
Entity component systems avoid inheritence e.g. If you want to look at an example
everyone just says ecs for gamedevs nowadays, but generally don't understand the motivation of that for games. maybe in bevy i can see it or a few genres. but for general purpose i honestly like objects / scripts, i do agree inheritance is terrible tho, you can still do components just by doing objects in objects.
Avatar
Avatar
TsFreddie
everyone just says ecs for gamedevs nowadays, but generally don't understand the motivation of that for games. maybe in bevy i can see it or a few genres. but for general purpose i honestly like objects / scripts, i do agree inheritance is terrible tho, you can still do components just by doing objects in objects.
I don't do enough gamedev to have an opinion here. But if I were designing an engine today I'd probably have something like an ECS based on generics
14:40
342dfd8 Changes to mapping rules - murpii 7e91a5c Merge pull request #307 from murpii/pr-mapping-rules-changes - def-
Avatar
vibe ecs can be hella fast tho
Avatar
Another interesting way of doing it is the data oriented approach of a pipeline of transformers. This has the benefit of being very cpu friendly
Avatar
if you do memory layout correctly
Avatar
Avatar
Learath2
Another interesting way of doing it is the data oriented approach of a pipeline of transformers. This has the benefit of being very cpu friendly
never heard of transformers tbh
14:42
other than GPT
Avatar
It might be terminology I invented. The idea is that you have pure functions without side effects that you chain together
14:44
I guess you would usually still have something like an ECS with that approach too though
Avatar
i still don't understand lol
14:46
maybe you are just describing ECS being set up in a OOP language?
14:47
catxplosion unity ecs and some lua based framework does do call chains to setup the world. (edited)
Avatar
No I was more talking about what you hinted at with ecs being fast. One way to achieve that is to have components that you transform (tick) using a chain of pure functions
Avatar
ye, still not sure
14:49
i'm too game editor coded maybe
Avatar
Perhaps we just ended up talking about different things
Avatar
amogus also as i said before, game devs are kinda dumb
14:50
i do feel too far gone from actual programming concepts
Avatar
Doesn't Unity have an ECS nowadays btw?
Avatar
they do
14:51
maybe it is finished in unity 6
14:51
i doubt it tho
14:52
there are way too many stuff to move to the new system, and the default gameobject system does not talk to the ECS at all without a bridge
14:52
and the bridge is too complicated to setup
Avatar
I think I was intermixing two different things there that created a confusion. I was talking about one way to implement an ECS that is good for performance
Avatar
so you end up with ECS objects, ECS logics, ECS graphics but you transfer the data back to the GameObject world to do animation, 3D sounds and stuff
14:53
if you only use the ECS part in unity it is indeed blazingly fast
Avatar
Avatar
TsFreddie
so you end up with ECS objects, ECS logics, ECS graphics but you transfer the data back to the GameObject world to do animation, 3D sounds and stuff
That's interesting
Avatar
but it doesn't actually do much
14:53
you can make a flock simulation probably
14:54
but even importing mocap data or blending animation is a PITA to do
14:55
also you can forget all those plugins, not many of them are updated with ECS
Avatar
Jupstar ✪ 2024-12-06 14:55
ECS is fast if determinism isn't mandatory
14:55
then you can go multi threaded
Avatar
I wanna give up 😭
Avatar
it is still fast even if you don't do multithread
14:56
the cache alone can make it worth it for some type of game probably
Avatar
I have 3k of uber-spaghetti with extremely bad performance
Avatar
Avatar
Jupstar ✪
ECS is fast if determinism isn't mandatory
It's also fast single threaded. Chains of pure functions optimize very well. If you adopt a SOA layout it's extremely cache friendly and it even vectorizes well in some cases
Avatar
Jupstar ✪ 2024-12-06 14:56
I'd bet against it, but would be interesting
Avatar
justatest i mean unity ecs have demos comparing the two systems single-threaded
Avatar
Avatar
TsFreddie
justatest i mean unity ecs have demos comparing the two systems single-threaded
Jupstar ✪ 2024-12-06 14:57
and what do they show in that demo?
Avatar
idk
Avatar
@Learath2 Why is the tracer of projectiles of weapons not showing on my server
Avatar
Avatar
Jupstar ✪
I'd bet against it, but would be interesting
I'd be very surprised if it performs any worse than a regular inheritence based approach. They are both the equal amount of virtualization
Avatar
i don't care about ecs but they do have them
14:58
also probably not very much
Avatar
Avatar
Learath2
I'd be very surprised if it performs any worse than a regular inheritence based approach. They are both the equal amount of virtualization
Jupstar ✪ 2024-12-06 14:58
yes, i'd bet they are around equal
Avatar
Avatar
Evelyn
@Learath2 Why is the tracer of projectiles of weapons not showing on my server
I do not know
Avatar
Like I'm shooting a grenade , the animation of the shot goes through , but the projectile didn 't fly out , and when it reached the blocks , the animation of the explosion hits is played
Avatar
wait are you betting against single-threaded ecs in general or just the learath2 way of doing it.
Avatar
Avatar
TsFreddie
wait are you betting against single-threaded ecs in general or just the learath2 way of doing it.
Jupstar ✪ 2024-12-06 14:59
generally
Avatar
then ye, i think the whole point they are trying to sell with unity is cache friendlyness
Avatar
Jupstar ✪ 2024-12-06 14:59
single threaded for a deterministic game, e.g. no reorder of operations
Avatar
If you adopt an SOA layout there is no comparison. An ECS usually dusts naive inheritence (edited)
15:00
The massive structs we are looping through are awful for the cache. Everything is a miss
Avatar
for multithreading unity already have burst and jobsystem which are also data driven and you can call them in regular GameObjects.
15:01
so at least for Unity ECS, the main selling point is cache friendlyness not multithreading
15:01
justatest
15:01
i mean you can do multithreading with UnityECS super easily tho
Avatar
Avatar
TsFreddie
so at least for Unity ECS, the main selling point is cache friendlyness not multithreading
This is for almost all ECS. With the traditional approach it's rather hard to be cache friendly
Avatar
Avatar
Learath2
That's the easiest example to replace since we don't add components at runtime. Just don't have virtual calls and instead of looping through an array of components just call the methods of each
so we can't keep same locs without oo?
Avatar
HOLY HELL I did NOT know how bad this was so my first solution I guessed the compiler might optimize to something that works reasonably fast, it didn't so I wrote another solution that I guessed would be faster, it was, but still way slow so I checked how long the second solution takes to check a single case (of about 10k cases), it took 3 seconds (oh god) for fun I wanted to check how long my first solution would take... It still hasn't completed and has been running for 6 minutes over 6 minutes so far on a single case (edited)
Avatar
ye, so i thought the whole point of ECS is cache friendlyness and parallelism is just a side effect that it can do pretty easily.
Avatar
Avatar
zhn
so we can't keep same locs without oo?
You can but you need generics in that case
Avatar
I love writing code that will take thousands of years to finish...
Avatar
i thought you have an example of full replacement without adding code complexity or so
Avatar
bruh, i should stop chatting, i've been on this line for two hours now.
Avatar
I could probably replace the components vector as an example but it won't be merged, it'd be a bit of a waste of time
15:05
We also don't use boost so I need my own implementation of a generic container
Avatar
Huh, if I ran the second solution for about 15 hours it would actually complete
Avatar
Avatar
Learath2
I could probably replace the components vector as an example but it won't be merged, it'd be a bit of a waste of time
xddd, any major change ends up with this thought
Avatar
The first solution is still running, 9 minutes in, checking a single case
Avatar
Avatar
zhn
xddd, any major change ends up with this thought
I mean if there was any advantage to it it would be worth. My issues with dynamic dispatch is pretty much just a distaste in this case
Avatar
Avatar
TsFreddie
ye, so i thought the whole point of ECS is cache friendlyness and parallelism is just a side effect that it can do pretty easily.
any good code (with a few exceptions) has ability to be parallely executed as a side effect ig
Avatar
It will have 0 observable performance or code improvement
Avatar
Avatar
zhn
any good code (with a few exceptions) has ability to be parallely executed as a side effect ig
Jupstar ✪ 2024-12-06 15:07
why good?
15:07
It has a clear disadvantage
Avatar
Avatar
Jupstar ✪
why good?
xdddd
Avatar
Jupstar ✪ 2024-12-06 15:07
determinism
15:07
loss of
15:08
i'd limit multi threading to stuff that really doesnt matter.. e.g. particles or similar
Avatar
Avatar
Jupstar ✪
determinism
Well not always, there are cases where order really doesn't matter
Avatar
Avatar
Jupstar ✪
why good?
you asked this like, bad code can be paralleled too as a side effect
Avatar
Avatar
zhn
you asked this like, bad code can be paralleled too as a side effect
Jupstar ✪ 2024-12-06 15:09
i'd just claim this has nothing to do with ECS
Avatar
Avatar
Learath2
It will have 0 observable performance or code improvement
i thing it would make code look more direct after rework
Avatar
E.g. particles that don't interact with anything. You can simulate their animation component in parallel without any loss of determinism
Avatar
Avatar
Jupstar ✪
i'd just claim this has nothing to do with ECS
yeah, i didn't mention ecs in this statement
Avatar
Avatar
zhn
i thing it would make code look more direct after rework
at least*
Avatar
Jupstar ✪ 2024-12-06 15:09
ok then i further claim, writing in a ECS does not mean good code
Avatar
Avatar
zhn
i thing it would make code look more direct after rework
It would look pretty meh, C++ just looks prettier with inheritence and polymorphism
Avatar
Avatar
Jupstar ✪
ok then i further claim, writing in a ECS does not mean good code
Definitely not. You can write horseshit code in any paradigm
15:12
one good example of what is hard in ECS
15:14
raii is best 😬 strict hierarchies are best 😬
15:14
huge enjoyer
15:14
they play together greatly
Avatar
When would you want an entity to own another entity?
Avatar
Avatar
Learath2
When would you want an entity to own another entity?
Jupstar ✪ 2024-12-06 15:15
well i'd say ui is defs a good example
Avatar
I'm an enjoyer of mixing and matching stuff. I probably wouldn't implenent a UI with an entity component system
Avatar
Jupstar ✪ 2024-12-06 15:16
ig it also depends on what your goal is. e.g. if a character owns it's projectiles, then the projectile can be certain that the character exists too
Avatar
Avatar
Learath2
I'm an enjoyer of mixing and matching stuff. I probably wouldn't implenent a UI with an entity component system
Jupstar ✪ 2024-12-06 15:16
yes
15:16
as said, when a system like particles can be cleanly split
15:17
then you should use what gives most performance
15:17
if that is directly a ECS or smth smaller/similar is ofc fine
Avatar
So probably I would have all my entities in the gameworld have an ecs. I don't think it's a great fit outside of that
15:18
Maybe a very classic tree based approach for my UI
Avatar
Avatar
zhn
any good code (with a few exceptions) has ability to be parallely executed as a side effect ig
ill correct myself: any good code has more chances to be paralleled in comparison (with a few exceptions)
Avatar
Avatar
zhn
ill correct myself: any good code has more chances to be paralleled in comparison (with a few exceptions)
Jupstar ✪ 2024-12-06 15:19
you want to say teeworlds physics are not perfect? 😄
Avatar
One great part of a functional approach is that you have many opportunities to parallelize without thinking too much
Avatar
Jupstar ✪ 2024-12-06 15:19
yeah
15:19
keep components small
15:19
let them do what they are designed for
Avatar
Unix philosophy for gamedev wow
Avatar
Jupstar ✪ 2024-12-06 15:20
yes
Avatar
edict solved this by adding relations (afair xd)
Avatar
Jupstar ✪ 2024-12-06 15:20
+ the monolithic design of rust
Avatar
Avatar
Jupstar ✪
you want to say teeworlds physics are not perfect? 😄
yeah
Avatar
Avatar
zhn
yeah
Jupstar ✪ 2024-12-06 15:20
shots fired
Avatar
Ok, I have to go ship a feature or they will fire me from the job I want to quit
Avatar
Avatar
Learath2
Ok, I have to go ship a feature or they will fire me from the job I want to quit
Jupstar ✪ 2024-12-06 15:21
oh noo
Avatar
nice chat as always
Avatar
Avatar
Learath2
nice chat as always
no u
Avatar
Avatar
zhn
edict solved this by adding relations (afair xd)
Jupstar ✪ 2024-12-06 15:21
do you like to write ecs? i can just recommend you to try to write a teeworlds physics as ECS
15:22
i'm really interested in that
15:22
ofc it can break physics if you require to
Avatar
i'm so sleepy
Avatar
Jupstar ✪ 2024-12-06 15:22
bye
Avatar
but my adhd is holding me hostage
Avatar
Avatar
TsFreddie
but my adhd is holding me hostage
Jupstar ✪ 2024-12-06 15:23
does adhd mean you have hyper focus or no focus? or how does that work
Avatar
Avatar
Jupstar ✪
do you like to write ecs? i can just recommend you to try to write a teeworlds physics as ECS
thats literally what i was intended to do after messing with unifying 0.5 0.6 and 0.7 protocols
Avatar
Avatar
zhn
thats literally what i was intended to do after messing with unifying 0.5 0.6 and 0.7 protocols
Jupstar ✪ 2024-12-06 15:23
not after
15:23
not after
15:23
no
Avatar
but my approach ended up being a shit so im rewriting it in a thousand time
Avatar
Avatar
Jupstar ✪
not after
no, literally after xd
Avatar
Avatar
Jupstar ✪
does adhd mean you have hyper focus or no focus? or how does that work
both
Avatar
Avatar
zhn
no, literally after xd
Jupstar ✪ 2024-12-06 15:24
now
Avatar
Avatar
TsFreddie
both
Jupstar ✪ 2024-12-06 15:24
wow that works
Avatar
it just switches
Avatar
Avatar
Jupstar ✪
now
nah xd, i have to finish this semester
Avatar
just make your own game and sell them already
Avatar
ill have to get an akademischer Urlaub
15:26
otherwise
Avatar
Avatar
TsFreddie
just make your own game and sell them already
eh, if I'll quit uni, I'll end up being in army for one year
Avatar
Avatar
zhn
eh, if I'll quit uni, I'll end up being in army for one year
i mean after you got time. don't do ecs teeworlds
15:27
pepeW
Avatar
Avatar
TsFreddie
i mean after you got time. don't do ecs teeworlds
this is my gestalt
15:27
i need to finish any project i started as a teeworlds based
Avatar
let's count xd
15:29
xpanic, 2xp, teeworlds-base, teemars, ddnet-vanilla, rustee, multitee and teeworlds.ru
15:29
and all of them are unfinished xd
Avatar
d...damn
Avatar
imagine finishing something
Avatar
😩 3k of code from hell
Avatar
sleeping
Avatar
If you want a taste of my suffering
2 KB
15:53
won't even bother spoilering this one
15:54
though this time it might be warranted on the rounds of it being practically NSFW
15:56
I am so sick and tired of thinking of functions that return functions and take in functions returning tuples of tuples
Avatar
still doing aoc?
Avatar
Yeah... Took some breaks in between to be fair but yeah still far from finished
Avatar
you've been going at it the whole day i think?
15:59
at least my whole day i guess
15:59
which is not that long
Avatar
Like if you look at stepForwards above, the liftM2 (,) at the start of it coerces to the type (([String], ((Int, Int), (Int, Int))) -> [String]) -> (([String], ((Int, Int), (Int, Int))) -> ((Int, Int), (Int, Int))) -> (([String], ((Int, Int), (Int, Int))) -> ([String], ((Int, Int), (Int, Int))))
16:03
You can imagine how much time I'm spending on making all the types line up correctly
16:05
I checked that I typed that out right, and yeah, pasting it into the interpreter, liftM2 (,) is at least cabable of coercing to that monster of a type
16:07
And the problem with my current program is that it's copying massive amounts of state around, and to fix that I'd have to change what my functions pass around, and to fix that I'd have to make all the types line up all over again
16:07
I'm frankly not sure if I have the patience for that
16:10
atp I might have an easier time writing this in brainfuck
16:10
then at least I could have mutable state without a million extra steps
16:14
Okay to be fair that monstrosity of a type can be simplified to (State -> [String]) -> (State -> ((Int, Int), (Int, Int))) -> (State -> State), but the internal structure of State is still there for me to keep in mind
Avatar
Avatar
risu
though this time it might be warranted on the rounds of it being practically NSFW
arch1t3cht 2024-12-06 16:23
compose2 = (.) . (.)
yeah that's a little nsfw
poggers2 1
😃 1
16:24
I haven't read your full code but it looks like you may want to check out the state monad if you haven't already
Avatar
Avatar
arch1t3cht
I haven't read your full code but it looks like you may want to check out the state monad if you haven't already
Do I get a little sympathy or just told off for disgracing FP?
Avatar
arch1t3cht 2024-12-06 16:32
no you get lots of sympathy
Avatar
Avatar
arch1t3cht
I haven't read your full code but it looks like you may want to check out the state monad if you haven't already
arch1t3cht 2024-12-06 16:54
ok I read it and it wouldn't help that much
Avatar
Avatar
chillerdragon
The dummy debug print update is quite nice and useful. But having no way to turn off the intense spam of a shared connect/swap bind is horrible. @Solly I was thinking of adding a connect_dummy_if_not_connected custom command to my client to solve it,
@ChillerDragon there could be a general way to turn off all logs which would work for any command which may give unwanted output
Avatar
I found a surprising gap in free software. There is no free per-application bandwidth limiter on windows. NetLimiter is payware and that's the only option
18:15
The API is certainly there since NetLimiter can do it, curious why no one emulated it yet
18:21
nvm, I figured out why no one else is doing it, it's a kernel driver you need to code for it
18:21
so the api is not there
Avatar
Avatar
arch1t3cht
ok I read it and it wouldn't help that much
God bless your soul I don't even want to read it myself!
Avatar
Jupstar ✪ 2024-12-06 18:44
vanilla pros, can you see the problem of this screenshot?
18:45
suddendeath even applies to the player with score 0, but is that really fair? after all he could win even tho he was not in a winning position.
Avatar
alive turned into ae?
Avatar
Jupstar ✪ 2024-12-06 18:45
no xd i removed it for fun
Avatar
Avatar
Jupstar ✪
suddendeath even applies to the player with score 0, but is that really fair? after all he could win even tho he was not in a winning position.
Jupstar ✪ 2024-12-06 18:47
so the question arises whether to change that behavior or not. e.g. in melee only the affected characters respawn for a sudden death
Avatar
When spectating, why not have the mouse wheel control zoom by default? Just like the map editor. Anyone tried that? I enjoy the new click to spectate individual tees, too.
Avatar
conditional binds are hard
19:03
your client doesn't differentiate between being in spectator mode when you press the button, it's all unrelated
19:04
you can re-bind the keys every time you switch in and out of spectator mode but then the scroll wheel values would be overridden the first time you switch
19:04
not sane default behavior but i know lots of ppl with elaborate binds which do that kind of shit
19:05
i personally have scroll on zoom all the time and don't use it for weapons bcs it's kinda not reliable
Avatar
Avatar
Ewan
you can re-bind the keys every time you switch in and out of spectator mode but then the scroll wheel values would be overridden the first time you switch
/spec can also fail
19:05
leaving you with wrong binds
Avatar
yea u can also press the button not ingame and then ur binds are fucked
19:05
lots of ways for it to go wrong
19:07
i have a hard reset bind for all of my state dependent binds for that reason
Avatar
ditto
19:07
and have it run on join (<- illigel beyhaviour!!!)
19:09
ah
19:09
vscode cant figure out how to handle this diff
19:10
19:10
nor does git
Avatar
the power is in your hands
19:10
i might try git rm -d --cached ./ddnet-libs git submodule update (edited)
Avatar
i dont want to get submodules tho
Avatar
then that folder shouldnt exist
19:10
it's just a submodule
Avatar
it does exist rrn but its just empty
Avatar
سارق أزياء دويك فاشنستا 2024-12-06 19:11
guys
19:11
who ask
Avatar
who ask what
Avatar
سارق أزياء دويك فاشنستا 2024-12-06 19:11
stop cri
Avatar
one of ddnet community moment of all time
Avatar
no cry it's ok
Avatar
Avatar
Ewan
i personally have scroll on zoom all the time and don't use it for weapons bcs it's kinda not reliable
Same, highly recommend. Can also bind mouse wheel click to zoom reset
👍 1
Avatar
i have scrollwheel on +fire
19:15
its weird how often i just wana shoot people
Avatar
Avatar
Learath2
Do we really not want to use it? We control both the client and the server nowadays, we can just bump up the size of the playerflags somehow, I'm pretty certain
Our servers invalidate your input if the player flag is the wrong size, noby fng already kicks you if you use the nightly build
19:18
Ddnet has code to kick players who send the 7th flag, so future clients will need to check the server version
19:18
Its easier to just not use them for something unimportant
Avatar
Avatar
risu
Same, highly recommend. Can also bind mouse wheel click to zoom reset
deepfly 😈
Avatar
Avatar
Solly
i have scrollwheel on +fire
i have my horizontal scroll wheel on weapon switch and it pisses people off so much
19:19
bcs they all have game sound on so it's major earrape
19:19
ive like always played the game muted
Avatar
Avatar
Tater
Our servers invalidate your input if the player flag is the wrong size, noby fng already kicks you if you use the nightly build
We could stop doing these things though. These were ancient antibot measures that targeted a very specific client and it's weird advertising thing that showed other players of that client
Avatar
Avatar
Ewan
deepfly 😈
w = dummy hammer for me, but I guess I get the idea of being able to have both tees hammer with one button at any time
Avatar
Avatar
Learath2
We could stop doing these things though. These were ancient antibot measures that targeted a very specific client and it's weird advertising thing that showed other players of that client
There is an open PR, Heinrich denied it
Avatar
Hm, maybe I'm misremembering something, I'll check in with heinrich in the PR then
Avatar
Avatar
Ewan
ive like always played the game muted
I could never, I rely on sound effects for timing
Avatar
Avatar
Tater
There is an open PR, Heinrich denied it
Could you let me know the PR number?
Avatar
Remove the &quot;sneaky&quot; anti-bot code added in #1408. Closes #8939 Closes #8276 Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combinat...
Avatar
Oh this is a different one
19:28
We can move this to the antibot and get rid of it, the playerflag thing I think we can just stop doing
Avatar
Avatar
risu
w = dummy hammer for me, but I guess I get the idea of being able to have both tees hammer with one button at any time
qwerf = pistol hammer shotgun nade laser
Avatar
We should check in with @noby still but I'm not even sure these bots made it into 0.6 to begin with
Avatar
Avatar
risu
I could never, I rely on sound effects for timing
theres a reason im bad at the game
Avatar
Or if they did they immediately stopped sending any playerflag above the valid ones
Avatar
is there some reason we can't use the PLAYERFLAG_PLAYING flag for the spectate flag?
19:40
it's completely unused by the server atm
19:40
it also seems logical
Avatar
Avatar
Tater
it's completely unused by the server atm
If it is actually not used yet that might be an avenue
Avatar
literally the only thing it does is act as a boolean for the client for a single check 😂
19:43
there's 3 references in the entire codebase
19:43
the other 1 defines its existance
Avatar
Hm, we can move that functionality to an internal bool, then re-use the flag
19:45
I was going to suggest making the spec flag not exclusive to spectate because this issue seems like it could apply to other things
19:45
but this flag seems like it's supposed to be the generic version already
19:47
I think it should be fine without a server_cap as well right? because this already gets turned off when you're chatting or in the menus
Avatar
@Robyt3 I agree, dangerous commands should be registered with a new CFGFLAG_DANGEROUS. what about cmdflag_dangerous?
20:28
as CMDFLAG_PRACTICE and CMDFLAG_TEST exist
20:30
well CFGFLAG_CLIENT is used as a flag for commands aswell
20:30
/:
Avatar
Hmm, not sure why we use two different names. The others are already mixed I guess, e.g. CFGFLAG_SERVER is also used for commands. And config variables are considered commands internally. (edited)
Avatar
so... which one
Avatar
Maybe look at git blame if there was a particular reason for adding a separate CMDFLAG_ prefix, otherwise I would prefer the simplicity of having only one prefix CFGFLAG_.
20:32
20:32
):
20:35
20:35
ghasp it was you!!
20:35
(who moved the line down 1 so you got blamed)
20:38
Checklist 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 add...
20:39
¯\_(ツ)_/¯
Avatar
Seems fine to use CFGFLAG. I guess it would be cleaner to separate the command and config flags but then you'd have to avoid using the same bits in the flags, but that probably requires a discussion first
Avatar
x2 ¯\_(ツ)_/¯
20:46
well ive changed my pr (edited)
Avatar
Hmm, I think checking in CGameConsole::CInstance::ExecuteLine is brittle though. For example doesn't check for ; quit
20:48
Should probably be a property of the engine console that dangerous commands are enabled/disabled
20:49
So it can be checked for every command execution
Avatar
could have to add a flag to m_pGameConsole->m_pConsole->ExecuteLine(pLine); which says if dangerous commands are enabled/disabled
20:49
on by default (edited)
Avatar
You can register the console_allow_dangerous command in src/engine/shared/console.cpp instead
20:50
oh wait no
20:50
because i dont want to check for binds and scripts
Avatar
Hmm, then it doesn't really help for the intended use case
Avatar
its meant to stop you typing dangerous commands in console
Avatar
It doesn't really accomplish that. now the trolls will tell players "type echo;quit in F1" instead of "type quit in F1"
Avatar
that will be blocked by this
Avatar
Doesn't really look like it does, CGameConsole::CInstance::ExecuteLine doesn't parse commands yet, you can separate multiple commands with semicolon. echo;quit quits the client without confirmation (with your PR) (edited)
Avatar
Print(OUTPUT_LEVEL_STANDARD, "console", "Test commands aren't allowed, enable them with 'sv_test_cmds 1' in your initial config.");
20:59
in executelinestroked
Avatar
yeah, it would have to be checked there
Avatar
thats what im currently doing
21:03
well ive done and am fighting with rust bridge
21:03
void cxxbridge1$IConsole$ExecuteLine(::IConsole &self, ::StrRef *pStr, ::std::int32_t ClientId, bool InterpretSemicolons, bool AllowDangerous) noexcept { void (::IConsole::*ExecuteLine$)(::StrRef, ::std::int32_t, bool, bool) = &::IConsole::ExecuteLine; (self.*ExecuteLine$)(::std::move(*pStr), ClientId, InterpretSemicolons, AllowDangerous); }
21:03
scary
21:03
also uses different formatting rules?
Avatar
That's generated code, see console.rs
Avatar
Also, adding more arguments to this function isn't a good solution
Avatar
whats.... the alternative?
Avatar
Move all the dangerous command handling to the engine console, also force binds and config files to have the same handling
21:06
Or go back to the drawing board and think about alternative solutions to the issue altogether
Avatar
Avatar
Robyt3
Or go back to the drawing board and think about alternative solutions to the issue altogether
i like the allow_dangerous_commands
21:06
tis simple
Avatar
Avatar
Robyt3
Move all the dangerous command handling to the engine console, also force binds and config files to have the same handling
i dont want binds and config files to have same handling, otherwise it breaks existing config
Avatar
Avatar
Solly
i like the allow_dangerous_commands
yeah, it would still work with binds, but it would break existing binds
Avatar
you would have to toggle it on and off
21:07
which is a big menial so people would just turn it on in autoexec or something
21:07
which defeats the purpose
Avatar
#9056 is only about unbindall though. Alternatives that would make it less dangerous would already be enough, including removing it and changing how default binds work. Not really an easily solvable issue. The other dangerous commands aren't really problematic, they make you lose a run and then you know not to trust that person again. unbindall;quit immediately deletes all binds.
Avatar
Suggested by @sjrc6 on Discord: should we even have the unbindall command? It seems like a hazard when you can just open the cfg file and delete the binds yourself? unbindall is also always written...
Avatar
Avatar
Robyt3
#9056 is only about unbindall though. Alternatives that would make it less dangerous would already be enough, including removing it and changing how default binds work. Not really an easily solvable issue. The other dangerous commands aren't really problematic, they make you lose a run and then you know not to trust that person again. unbindall;quit immediately deletes all binds.
its also for downstream to prevent tater from naming things delete_all_bindwheel_binds to prevent people from running it by accident
Avatar
Avatar
Robyt3
#9056 is only about unbindall though. Alternatives that would make it less dangerous would already be enough, including removing it and changing how default binds work. Not really an easily solvable issue. The other dangerous commands aren't really problematic, they make you lose a run and then you know not to trust that person again. unbindall;quit immediately deletes all binds.
also i dont want unbindall to change, since i use it in my init script after testing random stuff
21:16
brbi need to do friend duties
Avatar
GitHub BOT 2024-12-06 21:25
The last console line was being clipped, which was noticeable because underscore characters were appearing thinner. Prevent warning due to background noise texture being converted to RGBA when launching.

Checklist

  • [X] 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 nul...
Avatar
ok. Did it fullfill my request or is my ai depressed?
21:28
wtf
Avatar
Avatar
Teero
ok. Did it fullfill my request or is my ai depressed?
Jupstar ✪ 2024-12-06 21:47
sounds like totally normal language to me
21:47
average offtopic conversation ig
Avatar
GitHub BOT 2024-12-06 22:07
41fee04 Fix clipping of last console line, save background noise as RGBA - Robyt3 d270af9 Merge pull request #9356 from Robyt3/Client-Console-Layout-Fixes - def-
Avatar
Avatar
Teero
ok. Did it fullfill my request or is my ai depressed?
Poor ai D:
Avatar
Hmm, even if I rewrite my thing to copy around less state to produce states faster and make them faster to compare, my loop checker is still super slow
22:44
takes 800ms to check if there's a repeat in a sequence of integers that repeats every 1'000'000 values
Avatar
Avatar
risu
takes 800ms to check if there's a repeat in a sequence of integers that repeats every 1'000'000 values
Jupstar ✪ 2024-12-06 22:47
watcha doin
Avatar
today's AoC... S T I L L
22:48
I mean, I don't need to check for repeats longer than a couple hundred, but even then, holy hell that's slow
Avatar
Jupstar ✪ 2024-12-06 22:48
what is the value range of the integers?
Avatar
Well the actual data I'll be checking is a bunch of tuples of small integers I'm using a hashset
Avatar
Jupstar ✪ 2024-12-06 22:52
how small xd
Avatar
Jupstar ✪ 2024-12-06 22:52
then use an array
22:52
and the integer value as index
22:53
then you can quickly count which integer was how often in your list
Avatar
< 200 still means an array of 40k-ish values since these are 2-tuples and this is cursed territory so I don't have mutable arrays
Avatar
Jupstar ✪ 2024-12-06 22:54
so the tupple is 200 or what
22:54
i dont get it xd
Avatar
I mean I don't have mutable hash sets either but those are smaller to make copies of
Avatar
Avatar
Jupstar ✪
so the tupple is 200 or what
The type I'm working with is probably going to be (Int, Int, Direction), where Direction is an enum of four possible values
22:57
Or more like ((Int, Int), Direction) because pepeW
Avatar
Jupstar ✪ 2024-12-06 23:00
i see, ig i wont understand it without seeing the task xd
23:00
but
23:00
it's 00:00:30
23:00
you lost
Avatar
Yeah I absolutely lost
Avatar
I rewrote the function to be much cleaner and simpler, got rid of a few extra steps, writing something that could almost be considered not jank... and it's a solid 1-2% slower
23:18
I love immutability
Exported 712 message(s)
Timezone: UTC+0