Contrary to popular belief, if your program isn't animating fast enough, raising the fps won't make it magically faster.


FPS (frames per second) acts more like a governer - specifying the maximum frames per second allowable - anything over that, and it will wait. However, your machine may not be CAPABLE of such speeds. It sounds like your machine maxes out at 30.

Why do FPS at all? Well, if you were around "in the early days" before people started using things like frame rates, on the very early machines we'd program games, and not care about fps, because we were lucky it would animate at any speed at all. Invariably the animations were slower than we wanted. With any luck you'd get it to a playable speed. Et Voila! A usable game for the 8086! (or 8088)

Now you get your brand shiny new IBM Model 50 with its 80286 processor. You go to play your game - and it's unplayable! All the enemies and ships fly around at an incredible speed. They weren't programmed with any maximum, so they go as fast as they can.

The smart way around this is to write in a maximum frame rate for your game. Figure out how many updates you need a second for the best playability, then figure out what the interval is between updates, then see what time you start your update and do all your drawing. When you're done, see if it's time for the next update. On a slow machine it will - probably you're behind schedule. On a fast machine you wait, twiddling your little silicon thumbs until it's time for the next update. This way your game will always play no faster than programmed (say, 14 fps), no matter how fast a machine it's on. A truly slow machine will have to struggle to keep up, but if you put a frame-governed game from 1985 on one of today's new Vaio's, it will still play perfectly, speed-wise.

In fact, around the time that everyone was figuring this out (how to keep my game from playing too fast on the new machines?) I remember some computers that shipped actually had a "slow down" button on the front panel that would let them run at a slower processor speed to be compatible with all the games that didn't have frame rate governance. Yes, a button that actually made your computer run SLOWER.

Anyway, use FPS to find the maximum speed you're comfortable running your game at, understanding that it can't trump the maximum speed your game can render all the stuff at.

Otherwise to speed it up, pay attention to the size of the graphics, the KIND of the graphics (e.g.: 32-bit vs. 1-bit) and other things to keep the load down.

- Tab



At 11:58 PM 3/17/04, biju george wrote:


Hi,

I had created a dir movie in Dir Mx on Win 98.

 The stage has one sprite in channel 2 which is a
 rectangle filled with red color (any bitmap). I
 attach
 the following behaviour to the sprite:

 property p1
 on beginsprite me
 p1=sprite(me.spritenum)
 end

 on prepareframe me
   x=p1.loch
   x=x+1
   if x>800 then x=0
   p1.loch=x
 end

 When i rewid and play the movie no problem.(fps=15
 default).

 But when i opended the control panel and set fps to
 anything higher 30 or 200 etc... the sprite's
 movement  is not smooth. It jerks at random
 positions. Why?

Even puppettempoing results in same problem.

 Regards,
 Biju

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to