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 2021-09-11 00:00:00Z and 2021-09-12 00:00:00Z
Avatar
chillerdragon BOT 2021-09-11 07:04:57Z
Are there magic comments to disable clang tidy? It throws an error and the suggested style improvement breaks my code ._.
Avatar
Avatar
fokkonaut
Click to see attachment πŸ–ΌοΈ
@noby might know why this happens from his antibot work where the position of the cursor would be important
Avatar
I dont think you understood it correctly, because this is not normal behaviour: Cursor works fine in zoom 10 and with dyncam, but what I did here is recalculating the cursor pos for zooming out
09:14
And when zooming out + dyncam, the calculation seems to be wrong which I dont understand
09:15
as soon as the dyncam distance gets triggered, the calculated mouse pos (the laser) will start to be further away from the tee than it should be
Avatar
Avatar
Learath2
@noby might know why this happens from his antibot work where the position of the cursor would be important
tbh im not sure and most of the work ive done lately has more to do with angle than cursor, i guess it has something to do with the reason that the max dyncam distance as sent to server ends up around 633 even though cl_dyncam_max_distance is set to 1000
Avatar
Oh, that sounds like it is the issue lol
09:18
Yea
09:18
or? idk, i will check at home
09:19
@Learath2 u didnt accept my invite to fddr btw, idk if that was wanted just wanted to remind
justatest 1
Avatar
ah, forgot about it, was logged out on the laptop
Avatar
is it expired?
Avatar
nah, I'll accept it in a couple mins
Avatar
Avatar
noby
tbh im not sure and most of the work ive done lately has more to do with angle than cursor, i guess it has something to do with the reason that the max dyncam distance as sent to server ends up around 633 even though cl_dyncam_max_distance is set to 1000
wait
09:21
this doesnt make sense
09:21
with dyncam I can go up to 1000 and that is also sent to the server
Avatar
I have 5 damn disks and it still doesn't feel enough :/
Avatar
Avatar
fokkonaut
with dyncam I can go up to 1000 and that is also sent to the server
i use it to place stuff etc, that is all working with 1000
Avatar
@fokkonaut is this laser thing on your repo yet or are you testing with it locally?
Avatar
Avatar
Learath2
I have 5 damn disks and it still doesn't feel enough :/
I have 2 and currently thats fully okay xD
09:23
But i dont bloat them tho
Avatar
I want more ssd storage, modern games are just too massive...
Avatar
Avatar
fokkonaut
with dyncam I can go up to 1000 and that is also sent to the server
no
09:24
i have a feature on the server that records max mouse distance
09:25
all dyn players with standard settings will max out around 632 or 633
09:25
its some combination of the follow factor + dead zone that causes it i guess but im not sure how it works
Avatar
I find it odd that you haven't figured it out yet πŸ˜›
Avatar
yeah i wanna know now lol im curoius
Avatar
Avatar
Learath2
@fokkonaut is this laser thing on your repo yet or are you testing with it locally?
@fokkonaut ^^
Avatar
float CameraMaxDistance = 200.0f; float FollowFactor = g_Config.m_ClMouseFollowfactor/100.0f; float MouseMax = min(CameraMaxDistance/FollowFactor + g_Config.m_ClMouseDeadzone, (float)g_Config.m_ClMouseMaxDistance); if(length(m_MousePos) > MouseMax) m_MousePos = normalize(m_MousePos)*MouseMax;
09:27
i guess this is why
Avatar
Ah, it's capped
Avatar
Avatar
Learath2
@fokkonaut is this laser thing on your repo yet or are you testing with it locally?
yea its there, its view_cursor cmd
09:27
But not the zoomed thing
09:28
Because i havent found a way to do it good yet, right now I am forcing players to zoom 10 whenever they do something with cursor, so it matches the clientside cursor
09:29
and it does really work @noby, I can place at a distance of 1000
09:29
maybe bcs u have 0 follow factor or smth
09:29
i have standard dyn settings
Avatar
I'll take a look at the cursor thing over lunch, maybe I can figure out how it's supposed to be
Avatar
and im talking about every dyn player ive seen with standard settings not just me
Avatar
I will test later, it really works for me xd
09:30
no*
09:30
I use ddnet
Avatar
test on fng, use dyncam, extend mouse max range, then type /mdump 1 in the chat, ull see the leftmost column is ur max recorded mouse distance
Avatar
i mean server-side is 0.7 and maybe there is no limit while 0.6 server-side had any
09:31
(idk tho)
Avatar
@noby portal max distance is 1000 too, and when I use dyncam it goes up to that range and works
Avatar
Avatar
gerdoe
i mean server-side is 0.7 and maybe there is no limit while 0.6 server-side had any
its clientside
Avatar
mouse distance isnt really capped by server other than integer limits
πŸ†— 1
09:32
(although maybe it should be(?))
Avatar
would make my job easier at least xd
Avatar
can we manipulate with player's cursor?
Avatar
Nope
Avatar
it can help to make mods kekw
09:33
like server-side map-picker
Avatar
Avatar
fokkonaut
@noby portal max distance is 1000 too, and when I use dyncam it goes up to that range and works
how does it get mouse distance
Avatar
distance(m_Pos, CursorPos)
Avatar
can i get player's mouse pos including zoom level?
Avatar
cursorpos = m_Pos + Target
Avatar
why not just length(cursorpos)
Avatar
Avatar
Anime.pdf
can i get player's mouse pos including zoom level?
only cursor pos
Avatar
Probably because i didnt know about it
Avatar
Avatar
gerdoe
only cursor pos
Avatar
Avatar
Anime.pdf
can i get player's mouse pos including zoom level?
i wish i could get other players zoom level xd
Avatar
You can
Avatar
not if they modify client or use old client
09:36
@Learath2 btw there is a bug in the calculation of NetworkClipped
09:36
it has to be ShowDistance.x / 2 aswell as ShowDistance.y / 2
Avatar
for zoomers?
09:37
ah
Avatar
Otherwise double area is sent
09:37
i added a 15*32 area as border on top, so that tees wont fly in
Avatar
Avatar
fokkonaut
Otherwise double area is sent
especially when zoomig out far, it sends a lot more
09:38
so showdistance.x / 2 + 14*32
09:38
15*
09:39
@noby try view_cursor on my server with mouse 1000
Avatar
Avatar
noby
float CameraMaxDistance = 200.0f; float FollowFactor = g_Config.m_ClMouseFollowfactor/100.0f; float MouseMax = min(CameraMaxDistance/FollowFactor + g_Config.m_ClMouseDeadzone, (float)g_Config.m_ClMouseMaxDistance); if(length(m_MousePos) > MouseMax) m_MousePos = normalize(m_MousePos)*MouseMax;
.
09:39
it will likely work with dyncam disabled
Avatar
I mean with dyncam
Avatar
Don't we have a transform for going from mouse pos to world pos btw?
Avatar
Avatar
noby
float CameraMaxDistance = 200.0f; float FollowFactor = g_Config.m_ClMouseFollowfactor/100.0f; float MouseMax = min(CameraMaxDistance/FollowFactor + g_Config.m_ClMouseDeadzone, (float)g_Config.m_ClMouseMaxDistance); if(length(m_MousePos) > MouseMax) m_MousePos = normalize(m_MousePos)*MouseMax;
I think i have deadzone and follow factor 0
Avatar
or are entities in screen coordinates?
Avatar
if u have deadzone and ff 0 then its not dyncam afaik
Avatar
wym?
09:41
I will see later
09:41
one hour i think
Avatar
these settings are what makes dyn dyny
Avatar
Avatar
Learath2
Don't we have a transform for going from mouse pos to world pos btw?
No
Avatar
Avatar
noby
these settings are what makes dyn dyny
I never understood them but also never investigated
Avatar
deadzone is like, the max distance at which u. can move ur cursor away from the center before it starts dyning followfactor im not exactly sure but has to do with the speed that it the screen follows ur cursor outside the deadzone
09:43
then my deadzone is probably 400
09:43
as my static mouse distance
Avatar
i believe how it works is that, if follow factor is 0 then it wont follow regardless and so deadzone doesnt matter
09:46
yes i just tested, with followfactor 0 it records distance correctly
Avatar
I did never see anyone complain that portal place position doesnt match up the cursor or that he wasnt able to place further away portals with dyncam, and thats what i find too, for me it seemed to work always
09:47
ah
09:47
nice
09:47
then thats it already
Avatar
when placing portals though, do you place them at exactly where the cursor is?
Avatar
And you use the exact same code for the portals and the view_cursor function?
Avatar
If portals are entities too that really doesn't make sense to me
Avatar
wait, dont misunderstand me, i am trying to add something new
09:48
that is not in yet
Avatar
Avatar
fokkonaut
Because i havent found a way to do it good yet, right now I am forcing players to zoom 10 whenever they do something with cursor, so it matches the clientside cursor
hm. does the formula work rn, or does it not?
Avatar
It works, but not for dyncam, as soon as the dyncam starts
09:49
wait
Avatar
Avatar
fokkonaut
I dont think you understood it correctly, because this is not normal behaviour: Cursor works fine in zoom 10 and with dyncam, but what I did here is recalculating the cursor pos for zooming out
.
Avatar
From what I see from the code zoom is not considered at all for now
Avatar
read these
Avatar
Avatar
Learath2
From what I see from the code zoom is not considered at all for now
No its not in yet as I said
09:49
Its only local right now because of that issue^
Avatar
Avatar
fokkonaut
as soon as the camera starts moving away from the tee, so the tee is not in the center anymore, the cursor position will start to be further away than the displayed clientside cursor
@heinrich5991
Avatar
Hm, so without the extended object reporting the screen bounds we don't have a way of figuring out the actual position of the cursor on the serverside? So odd that matricks left that out
Avatar
Avatar
fokkonaut
@heinrich5991
going further away from the tee with dyncam results in the cursor pos on the server being further away than the Client cursor
Avatar
hm? our current extended message only tells width/height of the screen
Avatar
Then even that isn't enough, how do you figure out what the zoom level is @fokkonaut ?
Avatar
and zoom doesn't exist in vanilla, so we should have the same information as in vanilla for figuring out the map cursor pos
Avatar
Avatar
Learath2
Then even that isn't enough, how do you figure out what the zoom level is @fokkonaut ?
I dont, I just use the Aspect (width/height), then use CalcScreenParams from the client with zoom = 1
09:52
as heinrich found out xd
09:53
Before, I tried to fetch zoom lvl by not using allow_zoom flag
Avatar
Avatar
fokkonaut
I dont, I just use the Aspect (width/height), then use CalcScreenParams from the client with zoom = 1
but this works better
Avatar
Without the zoom level you shouldn't be able to figure out the cursor pos from what I gather
Avatar
Then, to get the cursorpos in zoom i calculate it * showdistance and / default show distance, the one for zoom 1 where the cursor matches up the screen cursor
09:54
I will show you later
09:54
going to the barber now, dont worry it works xd
Avatar
I'm not worried about it working in your mod, I'm more annoyed that we don't have a proper mapping for it
Avatar
true
Avatar
um, seems bors died
10:17
uh, idk what to do with that, so I guess you still aren't getting your merge @fokkonaut πŸ˜›
10:58
rip
Avatar
who destroyed FPS graph <.<, why is it now on top, instead of the mid?
14:06
chillerdragon: https://github.com/ddnet/ddnet/pull/3988 is there a reason the fps graph doesnt respect lowest fps anymore? i think it's nicer to have a relative jitter, instead of 0-maxfps
Avatar
btw, can the fps graph be changed to logarithmic scale?
14:36
its not like the fps range is rly high
Avatar
maybe it's because I get skipped frames, but the max fps fluctuates a lot for me
Avatar
Max fps fluctuates??
Avatar
yes, every second or so there are a few spikes with 10k or 20k fps, while the average is much less
14:49
or, my gfx_refresh_rate is 400, so there shouldn't have been any spikes above that
Avatar
if u have a lag you might get higher fps for a very short time
14:50
it tries to stabilize at 400fps
Avatar
oh, so that after a long/slow frame it might skip the next one to stabilize?
Avatar
after a slow it will try to get 2 quick ones probably
14:52
do you also use cl_refresh_rate (edited)
Avatar
i'd suggest to not use it, use gfx_asyncrenderold 0, if you really want to limit your CPU
Avatar
hmm, increasing cl_refresh_rate above gfx_refresh_rate seemed to help
Avatar
gfx_asyncrender_old 0
14:53
it waits for the GPU
14:54
but both options can create input delay
14:54
but cl_refresh_rate is really destroying everything
14:54
atleast to me it feels very unsmooth
Avatar
ok, that made the fps graph a lot smoother
14:56
I guess the input delay will be lower if you increase gfx_refresh_rate?
14:57
but thanks, seemed to work
Avatar
yes should generally be lower the more fps you get with that option
Avatar
probs the only thing that could eliminate this problem more is to split the graphic stuff from simulation Then there are two threads that don't depend on each other(e.g. the visualition thread just uses the current state), while the simulation just calculates its stuff. RN when a new frame is about to happen the same thread that also is the simulation thread, prepares the gfx buffer, which obviously can take alot more CPU time, than just the simulation itself, especially when there is interaction with UI(which does all calculations on fly) and or does some more heavy math(e.g. most components update their stuff for rendering) That's probably the main reason cl_refresh_rate puts out so bad frametimes too much factors for randomness xd (edited)
Avatar
chillerdragon BOT 2021-09-11 17:14:08Z
@Deleted User: i have no opinions on the graph I just wanted to get the changes from upstream in
justatest 2
Avatar
so can you fix it?
20:08
atleast improve it, so it doesnt chill on the top of the graph all the time, e.g. calc a higher max
Avatar
chillerdragon BOT 2021-09-11 20:52:11Z
Oh Uhm sorry I don’t feel pro enough to mess with that code also do not know what bothers you. Can you do it .-. Im sorry I made it worse for you
Avatar
chillerdragon BOT 2021-09-11 22:16:59Z
ima_77ac66e.jpeg
22:17
after only using a non rooted iphone so far it feels so odd to use pacman on the phone and compile a tw client :D
Avatar
chillerdragon BOT 2021-09-11 23:13:43Z
meh
23:13
[2021-09-12 01:12:48][gfx]: unable to create OpenGL context: Could not create EGL context (call to eglCreateContext failed, reporting an error of EGL_BAD_MATCH)
Exported 175 message(s)