From: Cezary K. <ce...@cs...> - 2005-12-15 14:09:25
|
On Thursday 15 of December 2005 12:33, Pawel Parys wrote: > >> 3) Delay - on my slow computer the game works slower than on faster one. > >> There is only variable Helpers.delay which is constant, but possibly > >> there are less frames that it says. I'd like to check the real time > >> which passed from previous frame. > > > > Helpers.delay is a variable (not constant). > > a variable, but it doesn't change Yes, it is not changed by the system, but your game can change it. > Yes, but i wanted a feedback - how many fps there are. Then if there were > less fps that set in delay, I could increase the speed of objects, so that > it would move as fast as when there are exactly 1/delay fps. On the other hand, there exists a variable (also defined by the module helpers) fps. This variable is changed by mlgame (by the mainloop). The value is the amount of frames per second (and it is calculated from the difference between 2 consecutive draws. If delay is sufficient, it is 1/delay. If not, it shows real fps. It is available via the parser, For example Scorch is always showing it in the bottom right corner, you can also do something like this... |