Page 2 of 2

Re: My game lags on Steam.

Posted: Sun Nov 23, 2025 5:04 pm
by miso
What if :

Code: Select all

Repeat : WaitWindowEvent(1) : ForEver

Re: My game lags on Steam.

Posted: Sun Nov 23, 2025 5:58 pm
by Joubarbe
miso wrote: Sun Nov 23, 2025 5:04 pm What if :

Code: Select all

Repeat : WaitWindowEvent(1) : ForEver
I believed in that one for some reason, but no. :D

UPDATE: If anyone wants to help, please download the demo, and try 1/ via the steam launcher 2/ via RH.exe. The world generation ("Generate hope") should take about 4 seconds via Steam, and be instant via RH.exe. If not, please report! :)

Re: My game lags on Steam.

Posted: Sun Nov 23, 2025 6:05 pm
by miso
I was hoping too...
Still belive, that the steam launcher somehow affects the os events. (It's a guess, and may be wrong assumption.)

Edit: What if you iterate trough all of the pending events in a loop? Is it possible in your code?

Re: My game lags on Steam.

Posted: Sun Nov 23, 2025 6:30 pm
by mk-soft
Your event loop is wrong ...

If you use an OpenWindowedScreen, the event loop must look different.
See PB-Help

Code: Select all

...
Repeat
    ; It's very important to process all the events remaining in the queue at each frame
    ;
    Repeat
      Event = WindowEvent()
      
      Select Event 
        Case #PB_Event_Gadget
        
        Case #PB_Event_CloseWindow
           Break 2
      EndSelect
    Until Event = 0
    
    ...
Forever
    

Re: My game lags on Steam.

Posted: Sun Nov 23, 2025 6:33 pm
by miso
He uses canvas, I'm not particularly familiar with it. So no screen as far as I know.