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
Splashscreen / Input thread #354
Comments
The startup is about the same for me with a standard HDD. Does anyone have a situation where their startup is >=10 secs? SplashscreenIMHO splashes are horrible and I turn them off for as many things as I can 💃 A "launcher" (with resolution + mod options) could perhaps do more than a splash screen? That could be useful in the future for 'organising pk3s' and other shenanigans that require a game restart with our current methods, but would require interfacing with a UI toolkit. Input thread(I'm assuming this is not necessary when we introduce a splash screen)
Advantages:
|
I don't like splashscreens either but a 10 second startup is too long (users will double click again or think the program crashed). As for input latency, we can have the input thread wake up as soon as the input is available so it will barely increase latency. Plus we are thinking of making a renderer hack to forward the latest mouse movement and change the camera accordingly. Also the input thread will avoid popups saying "it seems this program is hang, do you want to kill it?" |
To be clear: I'm getting about the same 6 seconds. I don't think many other people are slower, but I don't know. I have not tested on Windows for a while, for example. I'm still suspicious of the overhead needed to accomplish this. At 60hz (vsync'd) we have around 1000msec/60fps=16.7 msecs of latency maximum, and this already annoys many players. What do you think the total latency increase would be like (ballpark figure?) and would it be stable, or go 'in' and 'out' of phase depending on how the loops in different threads are interacting? |
1-2 msec max compared to now. |
here is a difff to include a splashscreen. |
@Kangz Could you give more details about the way the input thread should work ? |
https://gist.github.com/Kangz/69c63d045191e885dcda it is a bit rough, tell me if you need more details. |
There is currently a launcher, which is also a splash screen. I believe this would be enough to close this ticket. |
We don't need splash screen anymore indeed but we still need to have an input thread to prevent the window manager to tell the user “The application stopped responding” with a “Terminate” button while everything is fine and the user will just close the game believing it crashed while it is fine it's just computing stuff… |
Do this actually happen when starting game through the updated? |
It always happen whatever the way it is started. The only thing that is currently preventing the window manager to catch the freeze is when the startup is effectively quick, like using a fast computer, a fast file system, and having GLSL shaders already compiled. Loading nexe from dpk may also freeze the window (using DLL may then hides the problem). For GLSL shader compilation we can delay most of them at map load (where a meaningful message can be told to user to tell him to wait), but that's not fixing the underlying issue of freezing window. |
We may still want to close this issue and open another one because so many things have changed. Now, the freeze happens after the first frame is displayed, we may even display an engine logo before the freeze can happen in the same window that will be used (without the need for a splash screen). |
I don't think this has been resolved. There are two issues here,
I think I remember reading illwieckz talk about how Dæmon should show an "Unvanquished Development" logo on start :) |
Yes, I was just too lazy to look for the related issue to mention it: I already took care of clearing the window the sooner as possible: But the need for an input thread is still there, definitely. |
See also this PR to delay compilation of GLSL shaders that are not needed by the main menu: And also this PR to tell the user at map load (when it's easy to display things) the engine is compiling delayed GLSL shaders: All those PR are working around the “window freezing without feedback at startup” issue, though they fix others issues that's why they were implemented (primary purpose of those PR was not to work around the current issue). |
I would be in favor to close this report and open one more focused on the input thread, as imo the splashscreen thing is fixed. |
I get it with Ubuntu and GNOME every time. |
I'd be nice to have a splash screen while the game starts (6 sec on my SSD with hot OS cache). Also we will want inputs to be processed in parallel of the game to reduce latency and enable neat tricks. The two are linked since with SDL all the windowing function must be done in the main thread, including getting new events.
An idea of architecture it to have the game create a new "main2" thread as soon as it start. While the main2 thread does the actual initialization, the main thread shows a splash screen. When the game is ready to show the first frame, the splash screen is removed and the game window shown. In order to be able to use the SDL window functions from other threads, main can receive messages that contain callbacks to be executed. Basically main wakes up on every new message or each 10ms and process messages and SDL events (SDL events are put in a queue to be consumed by Com_Frame).
Kangz has a proof of concept implementation of the splash screen only.
Mentored projects on the Unv wiki
The text was updated successfully, but these errors were encountered: