My game lags on Steam.

Advanced game related topics
miso
Enthusiast
Enthusiast
Posts: 507
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: My game lags on Steam.

Post by miso »

What if :

Code: Select all

Repeat : WaitWindowEvent(1) : ForEver
Joubarbe
Enthusiast
Enthusiast
Posts: 725
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Re: My game lags on Steam.

Post 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! :)
miso
Enthusiast
Enthusiast
Posts: 507
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: My game lags on Steam.

Post 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?
User avatar
mk-soft
Always Here
Always Here
Posts: 6388
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: My game lags on Steam.

Post 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
    
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
miso
Enthusiast
Enthusiast
Posts: 507
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: My game lags on Steam.

Post by miso »

He uses canvas, I'm not particularly familiar with it. So no screen as far as I know.
Post Reply