-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch to SDL3 #2052
base: master
Are you sure you want to change the base?
switch to SDL3 #2052
Conversation
Mostly automatic conversion with renaming tools, network doesn't work.
SDL3_Net does not have UDP broadcast functionality.
9c32c93
to
9082d6a
Compare
I was wondering if SDL3 would still run on my machine, so I tried the latest Win-64 artifact as of now, and I'm glad to say that it does run. Now, I'm aware that this is a draft at the moment, but I'd like to report that I'm getting much lower FPS on that build, and trying to increase the resolution scale made the game crash. |
Impessive effort, thank you! Did you use one of the semi-automated migration tools announced here or did you go through this line by line? https://github.com/libsdl-org/SDL/blob/main/docs/README-migration.md Regarding SDL2_Net, do we know of any other widely used network abstraction library? SMFL, or would that be too much of a change? |
I added
Should work with d409b3e |
Doesn't this introduce a memory leak? |
I used python scripts, they just rename functions/headers.
SMFL is too big, we can replace the whole SDL with it. SDL_Net is a small wrapper around BSD Sockets/WinSock, I think we should rewrite it (and for Choco/Crispy too).
Possibly. I guess we need to bring back |
Without setting
At least with D3D11, I can change resolution properly. I also tried changing widescreen, and noticed that it messes with the mouse in menus; the rects seem to become misaligned. Performance comparisons, judging from some quick tests (640p, DRS and VSync off, otherwise default settings):
|
I tried D3D11 on the current Nugget master (I kept the Do note, however, that my laptop has both integrated and dedicated graphics, and it defaults to the former for Nugget; if I force using dedicated graphics, D3D11 starts out running at 60 FPS, but after a few seconds it suddenly lowers to ~15. Not sure what's going on there. For comparison, D3D runs better with integrated graphics, but when using dedicated graphics there's no sudden decrease in performance like with D3D11, or at least it doesn't happen as quickly. |
Sounds like overheating, replace the cooler (I did it on my old laptop, it's easy to find). Anyway, not much has changed in the SDL3 2D Render backend, it works the same. API improved with different VSync modes, |
According to Open Hardware Monitor, the CPU and GPU stay at around 60ºC and under 50ºC respectively (the TJ max for the CPU seems to be 90ºC). Toggling exclusive fullscreen in-game (which "restarts" the screen to some degree) repeats the process: smooth performance for a few seconds, then a slowdown. Knowing that said sudden slowdown certainly doesn't happen with other games, I'm pretty sure that there's something else going on. |
Is SDL3 stable yet? I havent seen anything adopt it And what does it improve in woof? |
Based on my limited testing, it works pretty stable. They say that Valve is using it.
Currently some code is mostly being removed, for example SDL3 introduces nanosecond timer/wait functions. There are also better video mode functions for adaptive VSync, exclusive full screen, etc. |
SDL3_Net doesn't have UDP broadcast mode, so we're still using SDL2_Net. It looks like we need to rewrite it.