Guild icon
Teeworlds
discord.gg/teeworlds / general
Teeworlds Discord Server.
Between 2020-04-23 00:00:00Z and 2020-04-24 00:00:00Z
Avatar
why is dyncam even broken in 0.7
10:09
the cl_dynamic_camera just changes my mouse distance
10:09
doesnt do anything to the followfactor/deadzone
Avatar
+why does tw 0.7 always make my fans spin while giving lower fps
10:27
turning gfx_highdpi 0 increased the fps it shows by 2x but still its not good
Avatar
@noby there is more than one console command for dyncal
Avatar
ok which ones do i type to make it work
Avatar
@Dune i cant find commands for dynamic cam followfactor or dynamic cam deadzone to even make the toggle .cfg for it, and cl_dynamic_camera only toggles my mouse distance and not the other things
Avatar
@noby doesn't it work when you use the GUI?
Avatar
please try
11:21
Besides, you don't need to write any followfactor or deadzone in the toggle command
Avatar
the old way for making dyn toggle on clients that didnt support it
11:21
by making two cfgs
Avatar
Just bind key toggle cl_dynamic_camera 1 0 is enough
Avatar
yes tried and it only changes my mouse distance
Avatar
This was made easier in 0.7 ๐Ÿ™‚
11:21
reset your camera settings by activating dyncam in t he GUI
Avatar
@noby what fps values do you get in ddnet and 0.7? Do you use opengl 3 in ddnet?
Avatar
you can set dynamic camera-specific settings
11:22
when you change the followfactor etc it will not affect static, so it is easier to manage, and does not require two cfgs
Avatar
i use ddnet 10.6 because it gives me better fps so theres no opengl setting, after changing highdpi to 0 i get about the same fps (~350 in both) but 0.7 feels choppier for some reason
Avatar
Actually without limiting fps it is kinda normal that fans start spinning
Avatar
unless vsync right
Avatar
it doesnt in 0.6
11:23
@Dune thx,fixed it
11:23
(why tho? is support for custom deadzone not a thing anymore)
11:23
i dont use vsync
Avatar
it is @noby
11:23
when you change the followfactor etc it will not affect static, so it is easier to manage, and does not require two cfgs
11:23
got it
11:24
and i only ask about fps because .6 can run without fps cap and without making the fans spin
Avatar
Usually the game uses 100% on one core. This will already make the fans spin on most laptops. Additionally it will use some gpu. On a dedicated gpu. it's probably below 40% usage because the rendering code is rather inefficient and uses deprecated opengl stuff. On iGPUs the usage can still be over 80%. This can also make your fans spin. Asked you are getting the same fps in both cases it seems like the main loop is not running at full speed, so it does not use 100% of the core =\ might be some rate limiting in ddnet
Avatar
according to louis, no fanspin = dead macbook
Avatar
will the ratelimiting code be added to 0.7
Avatar
@noby does you ddnet client have gfx_threaded?
Avatar
it has vsync but its turned off on both
Avatar
What version of ddnet are you using?
Avatar
then turn it on and try again :0
Avatar
no i dont want to use vsync then i get 60 fps only
Avatar
in a 50 ticks/s game
11:50
I guess that is enougj
11:50
h
11:50
it doesnt work like that
11:50
there is interpolation that renders things between ticks
11:51
and having fps higher than the refresh rate of ur screen makes it feel smoother than fps that is exactly the same refresh rate as ur screen
11:51
because it makes it more likely that the game will have a new frame drawn everytime it goes to refresh
Avatar
did you even try vsync? this is vanilla, not ddnet. gotta live with tradeoffs.
Avatar
Vsync is horrible
Avatar
playing on a laptop
Avatar
60 fps without is way better
Avatar
60fps without vsync?
11:53
so general fps limiting?
Avatar
Even on a laptop I prefer 300+ fps with spinning fans
11:53
Yes.
Avatar
Trafalgar Law 2020-04-23 11:53:07Z
Who play with vsync
11:53
the fuck
Avatar
vsync is good for saving battery when u r not playing, not good for playing
Avatar
fanspin is for cooling the cpu
Avatar
@noby pretty sure I asked this before... What value does your cl_refresh_rate have?
Avatar
ru dumb xd
11:54
in 0.6 or 0.7?
Avatar
cl_refresh_rate 480 on 0.6
11:54
and gfx_refresh_rate 480
Avatar
0.7 does not have this
11:55
That's the reason why your fans don't spin in ddnet
11:55
Probably*
Avatar
It limits how often the main loop can run per second
Avatar
days without breaking the rules counter has been reset to 0.
11:55
ty noby...
Avatar
Actually it's unlimited by default in latest ddnet
Avatar
u are trolling, is that against the rules?
11:56
@redix makes sense ty i will try gfx_maxfps 480
Avatar
do you concider it toxic or aggressive?
Avatar
This will only limit fps. Not the game loop itself
11:57
That's why ddnet has two variables
Avatar
is there an equivalent in 0.7
11:58
i have gfx_refresh_rate 1
11:58
hmm
11:58
can i not ctrl-c from the console on 0.7 either
11:58
cl_cpu_throttle 1*
Avatar
Not really. Only cl_cpu_throttle
Avatar
watch the video.
Avatar
is it 0/1 or
11:59
why
Avatar
You can use 2 I guess
Avatar
fanspin :D
Avatar
what does the number do
Avatar
It will just wait 2 ms after each loop iteration
12:00
I'd say the ddnet approach is more flexible
Avatar
i think on 06 it figures out how many ms to wait every iteration no?
12:02
oh wow
12:02
changing it to 10 actualy helps
Avatar
maybe open an issue for like low energy/cpu/gpu/fps mode to run the game smoothly on like a "potato" that usually is not intended for playing games.
Avatar
Please i have a little problem : i can't run the 7.5 version teeworlds, same for 7.4 I have to play on the 7.3.1 version
12:03
someone know how to run the 7.5 on linux
Avatar
how do you run 0.7.3 on linux?
Avatar
except i dont have these problems on 0.6 so this is stupid again
Avatar
0.6 != 0.6 ddnet
Avatar
@Cap'tain roc where do you download it, whats your distro, what problem do you run into?
Avatar
(im playing in the official version)
Avatar
steam, website, linux repository/package manager? (edited)
Avatar
what about the two other questions? @Cap'tain roc oops (edited)
Avatar
i go in the folder and then i "try" to run "teeworlds" (the file)
Avatar
not fond of the linux installation process other than package manager. how do you run/install it (edited)
Avatar
and the file isn't runnable
Avatar
there are some known problem with nemo, the file manager
12:08
can you try starting it in command line?
12:08
right click, open in terminal, ./teeworlds
Avatar
that operating system/distro? (edited)
Avatar
but in 7.3.1 it's possible
Avatar
we'll get more info that way ๐Ÿ™‚
Avatar
(just i'm french so it's normal if i don't understand all things)
Avatar
we can understand you alright ๐Ÿ™‚
Avatar
are you on ubuntu :0?
Avatar
can you try what I proposed?
Avatar
yep
12:10
ubuntu
12:11
i have try on 7.5_64 and 7.5
Avatar
again, please try running in console
Avatar
do you have steam?
12:12
That mean there is no file or folder of this name
Avatar
where is your folder located?
Avatar
is the steam version on 7.5 ?
Avatar
yes, the steam version should be the latest
12:13
but you can also helo finding the problem
Avatar
@Cap'tain roc you have to cd in the right folder
Avatar
to be dixed
Avatar
steam won't change anything
Avatar
@Cap'tain roc go to teeworlds folder, right click, open command line
Avatar
i'm gonna try to make an account and download it in steam
Avatar
please try command line first
12:14
steam will get the same results
Avatar
i think on 06 it figures out how many ms to wait every iteration no?
@noby yes
Avatar
listen to Dune :0
Avatar
setting cpu throttle to 10 pretty much fixed it thx
12:14
but maybe would be cool if the ddnet approach to throttling was used
Avatar
okay i think i have find the problem
Avatar
code complexity vs 3 of 1000 people using it. could be documented somewhere.
12:16
what's the problem?
Avatar
do u have to add an unhelpful response to everything i write
Avatar
i was using file manager and not install it
Avatar
it's just thoughts, ddnet has done a lot of cool client side and server side stuff.
Avatar
extract
Avatar
@Cap'tain roc so it works now? ๐Ÿ™‚
Avatar
yep but idk i prefeer the right version
12:17
i haven't try i don't admin power X)
12:17
don't have
Avatar
this cool stuff can be oart of like zillywoods of f-client or gamer, not necessary vanilla.
Avatar
cl_cpu_throttle should work fine
12:18
there is no reason to offload anything like that on custom clients
Avatar
its literally just a different way of throttling, it is at max a couple lines of code longer
12:18
its not adding anything extra
Avatar
even tho a potato mode would be nice.
Avatar
A static delay per frame is probably not the best solution
Avatar
@Cap'tain roc huh, what?
Avatar
just slightly changing how throttle works
12:19
i guess cpu throttle is potato mode? idk
Avatar
@Dune why what
Avatar
it should be documented that its not a 0/1 thing
Avatar
the thought was more about Compaq ng the benefit, I don't know how much more complex that would become, if it's just a few lines, it seems worth it.
12:19
comparing
Avatar
@noby it's not?
Avatar
Actually a value of 10 also means 10ms more input delay
Avatar
i think its just storing the time of the last finished iteration and using that to calculate how long to wait before iterating again
12:20
instead of using a fixed delay @jxsl13
Avatar
the ddnet version also work it's seems
Avatar
@Dune no it isnt
12:20
bcs cpu throttle 1 makes my fans spin and 10 fixes it
Avatar
das d you try values in between?
12:21
did
Avatar
What about 5? 10 seems pretty high
Avatar
approximating the perfect number :0
Avatar
Even 2 should be about the same like 480 in ddnet =\
Avatar
no i didnt try
Avatar
looks like im gonna let developper debate about their game X)
Avatar
@Cap'tain roc what's the issue now?
Avatar
what fixed your problem, @Cap'tain roc
12:22
?
Avatar
unzipping
12:22
well.
Avatar
btw will the patch that learath found to fix resolution on osx be added?
Avatar
to SDL2, yeah
12:23
and when it's in SDL2, it'll be ported to Teeworlds
Avatar
it's a SDL bug
Avatar
no he just told me to change a couple lines in 0.7 code and i could change resolution
Avatar
ddnet version work if i use file manager
Avatar
why not make those changes in official version
Avatar
huuh @Learath2
12:24
@Cap'tain roc and teeworlds does not? even when you unzip?
Avatar
ddnet is 0.6. ddnet should also be in like a zip or tar archive
Avatar
@Dune it also breaks the fullscreen toggle
Avatar
we could do the patch and force people to restart on fullscreen toggle on osx
f3 1
Avatar
makes sense
Avatar
that doens't work when i unzip on the official version that was working on the 7.3.1 but it seems when i unzip on the ddnet version that works so ... I'm gonna use the DDnet version i think (edited)
Avatar
@Cap'tain roc what happens when you run ./teeworlds after unzipping
12:26
also, ddnet is a 0.6 modification, teeworlds 0.7 is a different game, a different set of servers
Avatar
then your problem is not fixed?
Avatar
without the point i guess @Dune ?
Avatar
well thats one way of fixing it
Avatar
with the point
Avatar
@Cap'tain roc no, with (edited)
12:26
in console
Avatar
ok
Avatar
in the teeworlds folder
Avatar
cd downloads/tw_folder/./teeworlds
Avatar
okay it workds @Dune but how i can be sure it's on 7.5
Avatar
press f1
12:28
too right corner
Avatar
on the start screen @Cap'tain roc
Avatar
it says the version on the bottom right
Avatar
okay thanks
12:29
@Dune it work i can play on the 7.5
12:29
thank you very much for help me
Avatar
well, that does not look like a long term solution.
12:29
going the console way every time
Avatar
don't worry
Avatar
@Dune are we okay with calling sdl functions from the main thread?
Avatar
@Learath2 no idea, ask oy
Avatar
you could try the steam version, if that helps.
Avatar
It's actually pretty unsupported to be calling all these functions from an auxiliary thread
Avatar
in order to avoid using the terminal every time.
Avatar
also another bug i get when in gfx highdpi 0
12:31
12:31
cant see the playerlist
12:31
or ip, or half the servers
Avatar
@jxsl13 i prefer lose some seconds to start the game that not being able to play the new version
Avatar
it affects the vote menu in a similar but opposite way
12:32
Avatar
thank you anyway @jxsl13
Avatar
how is this possible lol @Learath2
Avatar
Thanks for all of you to help me to run the game
Avatar
there is something with nemo and running executables iirc
12:33
I forgot what it was
12:33
or was it nautilus?
Avatar
dune help
Avatar
@Learath2 I think most functions are called from the main thread anyway
Avatar
@noby clipping is fucked for some reason. hard to troubleshoot this kind of stuff because it's hard to reproduce
Avatar
it happens everytime for me
12:35
i can try to find the lines that i changed
Avatar
ubuntu is nautilus
Avatar
A retro multiplayer shooter. Contribute to teeworlds/teeworlds development by creating an account on GitHub.
12:38
Cmd_VideoModes might also work in the main thread =\
12:40
[3:28 PM] Learath2: backend_sdl.cpp L703, put 702 703 704 in a block
12:40
this is the changes i made that fixed it
12:40
so that i can change resolution and use gfx_highdpi 0
Avatar
@noby clipping is fucked because the resolution change happens after we get the drawable size in Init
12:40
On older macOS that is, they implemented it in such a weird way
12:40
i have 10.13
Avatar
the correct way to do this is to instead handle the sdl event that tells us the resolution changed
12:41
it is part of my resizable teeworlds pr, but it won't work without an SDL patch
12:41
I think I have an idea to get it to work though, gimme like an hour and I should have something working
feelsamazingman 1
Avatar
noo, so close but it still needs the SDL patch
13:20
well it'd work in official releases and releases built on old macOS
13:36
sadly, the actual resizing part requires SDL 2.0.13
Avatar
atleast this way it doesn't require the patch that I couldn't get into sdl to begin with
13:41
(it also makes dbg_resizable work reliably, so maybe it doesn't even need to be a opt-in anymore)
13:41
should i test it
Avatar
well I'm scared it won't work
13:41
I don't remember if you were getting a SDL_WINDOWEVENT
13:41
give it a try anyway
13:42
you should be able to even resize the window as you are on 10.13
Avatar
is there an easy way to pull this commit
Avatar
do you have my repo added as a remote?
Avatar
can i just download as .zip
13:42
mm no ig
Avatar
you can just git fetch <myrepo> then git checkout <thiscommit>
13:43
git remote add learath2 https://github.com/Learath2/teeworlds.git
13:44
(idk if you can download specific commits as zip on github, that's why I suggested adding a remote)
Avatar
it looks like u should be able to but then it gives a 500 server error so im doing it the way u said
13:44
nobody1s-MacBook-Pro:teeworlds nobody1$ git fetch https://github.com/Learath2/teeworlds fatal: unable to access 'https://github.com/Learath2/teeworlds/': The requested URL returned error: 504 wtf xd
A retro multiplayer shooter. Contribute to Learath2/teeworlds development by creating an account on GitHub.
Avatar
nolol
13:45
you add the remote
Avatar
then you refer to it with it's name
13:45
git fetch learath2
Avatar
git remote add <name> <url> is the syntax
Avatar
still 504 error but i tried it again and it worked the second time lol
Avatar
maybe github is having some trouble?
13:47
ok compiling
13:48
?
13:48
did i do something wrong
Avatar
what is the value for gfx_highdpi?
13:49
bcs 1 lags me
Avatar
looks like it's 0 from the shitty corner rounding
13:49
hm can you change the resolution?
13:49
without closing the game
Avatar
gfx_screen_height 800
Avatar
not like that
13:49
from the menu
13:49
I didn't set up chains yet
13:49
apparently i can
Avatar
when you change the resolution it's all fine, right?
13:50
yeah
13:50
i have to change it in settings first but then it works and no cliping
Avatar
your computer is behaving VERYWEIRD
13:50
When we get the drawable size in Init, your opengl reports the highdpi resolution
13:51
but a couple ms later it starts reporting the correct resolution
13:51
is it because osx
Avatar
I have no idea what's wrong with it tbh, it could be some 10.13 issue
13:52
@noby I think I had an idea with watchpoints
Avatar
dk how to use it but i can try if u tell how
Avatar
@noby wanna try debugging this again?
Avatar
backend_sdl.cpp:L749 print *pScreenWidth and *pScreenHeight right after that
Avatar
[2020-04-23 08:55:17][client]: starting... 2560 1600 **
Avatar
What is your resolution set to?
13:56
and is highdpi 0?
Avatar
always highdpi 0, and its set to 800x600 on 0.7
13:57
on 0.6 i use 1024x768
13:57
and it makes the window the same size as 800x600 would be on 0.7 for some reason
Avatar
Okay, than for some reason opengl thinks highdpi is enabled at this point
Avatar
should it check the cfg
Avatar
2560x1600 is weird actually
13:58
what is your desktop resolution?
Avatar
it is my real screen resolution
13:58
2560x1600
Avatar
Ah, can you do that patch we did before?
13:58
to allow windows to be any size at start
Avatar
ye how again
13:59
#if defined(CONF_PLATFORM_MACOSX) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) SdlFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP; // always use "fake" fullscreen *pWindowWidth = *pDesktopWidth; *pWindowHeight = *pDesktopHeight; putting this in {} ?
Avatar
yes that
13:59
only whats inside the if defined though
Avatar
#if defined(CONF_PLATFORM_MACOSX) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) { SdlFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP; // always use "fake" fullscreen *pWindowWidth = *pDesktopWidth; *pWindowHeight = *pDesktopHeight; }
13:59
[2020-04-23 08:59:27][client]: starting... 2560 1600 **
Avatar
set your resolution as you want, then restart the client
Avatar
it restarts with the resolution i left it at but the clipping occurs again
Avatar
yeah but what does the console output say?
14:01
[2020-04-23 09:00:35][client]: starting... 2304 1440 **
14:01
lol wtf
Avatar
what did you set it to?
Avatar
gfx_screen_width 1152 gfx_screen_height 720
Avatar
2x, so opengl still thinks highdpi is enabled for a while
Avatar
I'm currently digging into cocoa documentation to see if there is a warning somewhere
Avatar
SDL isn't aware of this change in resolution happening, so it has to be happening inside apples opengl implementation
14:07
somewhere along the way opengl suddenly realises that we don't want highdpi
Avatar
tbf, I don't even know where to look for this
Avatar
@Learath2 the output from SDL_GL_GetDrawableSize is wrong at startup or what's the problem?
Avatar
yeah it's wrong
Avatar
actually it's called before the context is created
14:14
SDL_GL_GetDrawableSize(m_pWindow, pScreenWidth, pScreenHeight); // drawable size may differ in high dpi mode // create gl context m_GLContext = SDL_GL_CreateContext(m_pWindow);
14:14
not sure if it is related =\
Avatar
well CocoaGetDrawableSize doesn't use the context at all, but maybe the creating of the context is what makes osx realize that this isn't supposed to be a highdpi view
14:15
@noby can you try moving the GetDrawableSize below the creation of the context?
Avatar
Trafalgar Law 2020-04-23 14:15:54Z
is it possible to play teeworlds stretched?
Avatar
yeah, sure, not sure how well the ui would react though
Avatar
gogo 4:3 stretched like real cs pros
Avatar
SDL_GetWindowSize(m_pWindow, pWindowWidth, pWindowHeight); m_GLContext = SDL_GL_CreateContext(m_pWindow); SDL_GL_GetDrawableSize(m_pWindow, pScreenWidth, pScreenHeight); so like this?
Avatar
Trafalgar Law 2020-04-23 14:16:38Z
I wan't try it @heinrich5991 :_(
14:16
but its not working for me
Avatar
yeah, and move the debug message too, so we see if the resolution is fine
Avatar
I think tw adapts to the width/height of the window
14:17
not sure if you can stretch it
Avatar
printf("%d %d **\n", *pScreenWidth, *pScreenHeight); SDL_GL_GetDrawableSize(m_pWindow, pScreenWidth, pScreenHeight); // drawable size may differ in high dpi mode printf("%d %d **\n", *pScreenWidth, *pScreenHeight); -1 -1 1152 720
14:17
seems better
14:17
clipping goes away too :D
14:18
@noby so creating the context indeed is what makes macOS realize this isn't supposed to be a highdpi surface
14:18
so is that the fix?
14:18
just switching those two lines
Avatar
(yeah tw adapts to the height and width, so it won't stretch)
14:19
@noby yeah I think it is
Avatar
does it break anything on other OS
Avatar
can you just checkout master and check if just swapping those around helps?
Avatar
maybe we should tell the SDL people too so they can add a warning to the documentation of SDL_GL_GetDrawableSize
14:22
Teeworlds mobile edition?
14:22
and same problem as before now
14:22
cant change res
Avatar
good luck reading stuff
Avatar
[2020-04-23 09:22:05][client]: starting... 1280 800
Avatar
@noby yeah, that's expected, we can't remove that restriction without an sdl patch
14:22
I guess we can do what I suggested before
Avatar
don't allow toggling fullscreen in macOS without a restart
Avatar
until SDL 2.0.13 lands (edited)
14:23
@noby thanks for debugging it, I'll do both and make a pr you can test
14:24
cool ty
Avatar
@Learath2 can you imagine any reason, why SDL_GetNumDisplayModes and SDL_GetDisplayMode are in the rendering thread? Other functions like SDL_GetDisplayBounds are directly called from the main thread
Avatar
not at all, especially given they concern neither the context nor the window
Avatar
okay. it would probably be better to move them to the main thread then
Avatar
ะšั‚ะพ ั€ัƒััะบะธะน?
21:37
Who speak on russian?
Avatar
english only here
Exported 426 message(s)