Tooltips, windowed mode, slowdown

BlitzMax Forums/BlitzMax Beginners Area/Tooltips, windowed mode, slowdown

Pierrou(Posted 2012) [#1]
Hello

I'm about to finish a French reading game for children (MacOS and Windows). Almost everything is fine but I still have a few questions.

The game runs in windowed mode only (the window is more or less the size of the desktop). The game window is a graphics object, I'm not using MaxGui.

The animations are rather smooth, they look OK to me, except sometimes on Win XP, especially when a tooltip pops up on the taskbar. Then there is a massive slowdown which ends when the tooltip is closed.

No big issue but is there a simple way to avoid that?

Thanks in advance,


Midimaster(Posted 2012) [#2]
give windows a little bit of time to do his job! write a little DELAY command short after the FLIP 0 command in your main loop:
      ...
     Flip 0
     Delay 5
Until KeyHit(Key_Escape)


This gives the system 5 msec each loop to do windows jobs
It may be, that DELAY 1 or DELAY 2 is already successful.


Pierrou(Posted 2012) [#3]
Thanks for that quick and accurate answer!
I already had a delay 1 in my loop. I've tried delay 5 but in some cases the games slows down a lot : when the user scrolls the text up or down or when i use rotation. Anyway it's not a big problem since the game is not a shoot 'em up and since the user is supposed to sit in front of the computer with the child without swapping between tasks (the game is intended for speech and language therapists).