a simple "hudmessage"

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: a simple "hudmessage"

Re: a simple "hudmessage"

by Marisa the Magician » Thu Mar 08, 2018 7:24 pm

I've opened a PR for PostUITick. Submission thread here.

The delay is completely gone when using it.

Re: a simple "hudmessage"

by Marisa the Magician » Wed Mar 07, 2018 3:39 pm

Unreal Engine 1 had something like that. It doesn't sound like a bad idea.

Re: a simple "hudmessage"

by Major Cooke » Wed Mar 07, 2018 12:33 pm

I can't help but wonder if adding a PostUITick would be too much.

Re: a simple "hudmessage"

by Marisa the Magician » Wed Mar 07, 2018 12:32 pm

UiTick happening right before P_Ticker is exactly why this 1 tic delay is a thing.

Re: a simple "hudmessage"

by ZZYZX » Wed Mar 07, 2018 4:55 am

IIRC I put UiTick somewhere as much "outside" as possible so that it always gets called (even when game state is not valid at all, this was a gross hack to provide custom game state, which I think doesn't work now due to absence of RenderOverlay without playsim). I believe that's why it has no specific relation to playsim callback ordering.
It's only certain that UiTick happens before rendering, that's it :P
https://github.com/coelckers/gzdoom/blo ... .cpp#L1222

I also think that Events system needs some update according to the scopes, so that we can make purely ui or purely play event handlers (to be able to handle e.g. ThingDied in a ui scope without transferring values around).

Re: a simple "hudmessage"

by Marisa the Magician » Wed Mar 07, 2018 4:14 am

Why not just make UiTick happen after the other tickers? That would remove the delay.

Re: a simple "hudmessage"

by _mental_ » Wed Mar 07, 2018 3:51 am

Many old things worked well: DOS, Windows XP, vanilla Doom... This doesn't make them right or future proof or bug free.

Yes, I'm not interested in so called time critical UI. But I'm fine if someone else will do it.
To me 'perfect tic-to-tic text rendering' is a nonsense and it only shows limitations somewhere else, i.e in other subsystems.

Re: a simple "hudmessage"

by ZZYZX » Wed Mar 07, 2018 3:40 am

_mental_ wrote:bla bla bla we don't need this
It would make sense. It would. But there's one major thing that pretty much breaks all the logic above: this is worse than ACS. ACS allows perfect tic-to-tic text rendering so that you can do animation by replacing HudMessage with the same ID.
ACS is ...how many years old again? And it works well there.

(side note, also networking related: I don't understand why we need to transfer any messages from Play to UI like this, UI should scan events and draw everything, not messages directly originating from actors...)

Re: a simple "hudmessage"

by Kotti » Wed Mar 07, 2018 2:45 am

Major Cooke wrote:I still think the function will be necessary. Otherwise, you're going to have people who will find it inconvenient like myself that they have to wait a tick in order to set up an appropriate system, and their time critical systems may not be all that flexible.
I think you still do not comprehend the ramifications here.
Imagine a system where server and client are two separate machines. In such a setup you cannot do any UI-related action in zero time. It will always have to go over the network. Yes, that means an inevitable one-tic delay. It will also mean an additional one-tic delay for all current ACS HUD scripting that happens immediately because it completely ignores the mere possibility of a client being separated from the server by a network boundary. In such a setup the machine on which the script runs won't serve the display on which you intend to show the message and it is a technical impossibility to have that happen 'immediately'.

Re: a simple "hudmessage"

by _mental_ » Wed Mar 07, 2018 2:26 am

You can choose only two features from three: 'Doom', 'UI', 'time critical systems' ;)

Seriously, I cannot comprehend your complains. Here is the example.
Triple buffering is used quite often nowadays. It introduces one frame lag on top of required double buffering.
Many games are locked to 30 fps. And we are talking about in-game rendering, not only UI.
This, however, didn't prevent selling millions of copies per title for tens of millions units of so called next gen consoles.
For some reason developers and players are OK with it.

Re: a simple "hudmessage"

by Major Cooke » Tue Mar 06, 2018 3:36 pm

I still think the function will be necessary. Otherwise, you're going to have people who will find it inconvenient like myself that they have to wait a tick in order to set up an appropriate system, and their time critical systems may not be all that flexible.

Re: a simple "hudmessage"

by Marisa the Magician » Tue Mar 06, 2018 9:42 am

Unless you're making each monster queue a message at once that shouldn't really matter. :P

By the way, I should probably remind Graf again that the ID and Layer parameters in the ZScript AttachMessage function declaration are missing.

Re: a simple "hudmessage"

by ZZYZX » Tue Mar 06, 2018 9:29 am

Major Cooke wrote:I am already imagining how on heavier handed mods, these zscript hud messages would be a contributing factor to massive slowdowns on slaughtermaps in particular.
:shock: why

Slaughtermaps lag because of constant sight checks and overcomplicated collision detection AFAIK. Let alone the fact that some monster logic is moved to ZScript, but that doesnt really contribute to lag, unless it's a 2004's PC.

Re: a simple "hudmessage"

by Major Cooke » Tue Mar 06, 2018 8:15 am

Because this is also adding on a ~28ms delay, I think it would be better if there was an internal function. I am already imagining how on heavier handed mods, these zscript hud messages would be a contributing factor to massive slowdowns on slaughtermaps in particular.

Re: a simple "hudmessage"

by Marisa the Magician » Tue Mar 06, 2018 7:24 am

Progress on my example message library is here.

Due to the nature of the message queue, there's a minuscule 1 tic (28ms) delay between a message being added and it drawing on the screen, since the adding is done in UiTick(), which happens before all play tickers.

Would anything break if, in G_Ticker, E_UiTick was called after the other tickers, rather than before? This is the only way I can think of to get rid of the delay.

Top