Deleted
Deleted Member
Posts: 0
|
Frames
May 5, 2010 10:12:48 GMT -5
Post by Deleted on May 5, 2010 10:12:48 GMT -5
Hi, a must for anyone,
Why are the Frame rate not stable? There are huge differences here in my new game! Okay, my computer is a stone age apparatus of older geeneration. May be that this is main reason ? But I doubt it! Gives it any possibilities to change that ? How get I stable Frames ? That is the question! Normally are 60 Frames constant 60 Frames and not 45!
Thank you!
|
|
|
Frames
May 5, 2010 19:34:07 GMT -5
Post by Guilect on May 5, 2010 19:34:07 GMT -5
Hi peter,
Not sure if there is a single answer or an answer that you did not already know about. But here is a list of possibilities:
1.) There is too much demand from your program that the frame rate drops.
A.) For example having too many sprites or particles on the screen at one time.
B.) Math intensive calculations are being called which slow things down.
2.) Programmatic loops that tie up Windows and do not allow processes to run smoothly.
3.) Inefficient coding. Calling program lines or subroutines needlessly for example.
4.) Windows is doing something in the background, like down loading an update. Anti virus is performing a scan, etc.
Perhaps, if in the past you had a constant frame rate of 60, in this new program you are doing something a bit differently or your system is now a bit different.
Try running a 'old' game that worked constantly at 60 fps before. If it still runs smoothly, then it is something in your new program. If it too runs slower then it is something that is different with your PC.
[edit] There is a command in Brutus2D, Graphics.SetFPS. (peter probably knows it, but for those who are new...)
So,
Graphics.SetFPS 60
LIMITS the frame rate to a maximum of 60 frames per second. If your program is such that the frame rate could go faster this command limits it to 60. This is good so that your game does not run incredibly fast on a 4 GHz dual core PC and your game becomes unplayable.
However, .SetFPS does not MAKE the frame rate be 60 fps if the program does so much stuff that the PC that is running the program can only produce a frame rate of 45 fps.
[end edit]
Guilect
|
|
Deleted
Deleted Member
Posts: 0
|
Frames
May 6, 2010 7:35:34 GMT -5
Post by Deleted on May 6, 2010 7:35:34 GMT -5
Hi Guilect,
Reply in Showcase! best regards.
|
|