Skip to content
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

Still redrawing screen constantly although nothing changed? #321

Closed
clort81 opened this issue Jan 22, 2023 · 5 comments
Closed

Still redrawing screen constantly although nothing changed? #321

clort81 opened this issue Jan 22, 2023 · 5 comments
Labels
enhancement game Affects the game, as opposed to the editors

Comments

@clort81
Copy link

clort81 commented Jan 22, 2023

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.

@CelticMinstrel CelticMinstrel added enhancement game Affects the game, as opposed to the editors labels Jan 22, 2023
@NQNStudios
Copy link
Collaborator

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?

@NQNStudios
Copy link
Collaborator

NQNStudios commented Jan 22, 2023

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.

@CelticMinstrel
Copy link
Member

(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.

@clort81
Copy link
Author

clort81 commented Jan 25, 2023

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?

@NQNStudios
Copy link
Collaborator

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.

@NQNStudios NQNStudios closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement game Affects the game, as opposed to the editors
Projects
None yet
Development

No branches or pull requests

3 participants