Still redrawing screen constantly although nothing changed?
Closed this issue · 5 comments
Is cboe still redrawing screen although nothing changed on the game screen?
Any turn-based game without continuously running onscreen animations, has 0 cpu consumption unless the player makes a move. (Such as original Blades of Exile code does.)
This could be nice on battery powered devices.
I don't think it is (at least when dialogs are open), which is why #208 is a problem.
Continuously redrawing the game is the only way to completely fix #208 as long as BoE uses floating windows for dialogs, and it's standard for modern games, but maybe if it's implemented it could be a togglable option?
I think a strong argument could be made that doing away
with floating windows for dialogs would be a good thing, though. JV's
newer games don't do it, for good reason, from a UX and portability perspective.
(at least when dialogs are open)
As I recall, the main loop doesn't even run while dialogs are open. The dialog has its own separate event loop.
I'm pretty sure both dialogs and the main application both redraw continuously.
I think a strong argument could be made that doing away
with floating windows for dialogs would be a good thing, though. JV's
newer games don't do it, for good reason, from a UX and portability perspective.
You're right that JV stopped doing it eventually, but I would like to maintain the original aesthetic of the game.
If it's easy (or becomes easy at a later date), we could perhaps offer a setting to stuff the dialogs into the main window. I would only offer that in the game though, not in either of the editors. It may not work, however, as I think some of the dialogs (choose spell? training?) are actually larger than the main window.
Thanks for the responses! In case anyone reading doesn't know, some background info:
The bug referenced is at root a legacy problem leftover from 1980s and 1990s workstations, which didn't have enough RAM for the windowing system to buffer all window contents of applications. When one application got overlapped by another window, then 'exposed', the application had to be notified to redraw itself.
Eventually we can expect all linux users will be using compositing Xorg or Wayland, which handles that problem.
Could you realistically envison someday having a display client (like, cough, a webbrowser) messaging the CBOE engine and say 'Hey, I'm ready to display what's happening, can you tell me what has changed in menus and game world?' - and then receiving the stuff to update on screen?
I'm making a single issue to track CPU-related concerns: #450
I do want to answer something from this discussion which never got addressed:
Could you realistically envison someday having a display client (like, cough, a webbrowser) messaging the CBOE engine and say 'Hey, I'm ready to display what's happening, can you tell me what has changed in menus and game world?' - and then receiving the stuff to update on screen?
I do think this is beyond the scope of cboe.