What affects frame rate the most?

Started by Knox, Wed 30/09/2009 03:40:04

Previous topic - Next topic

Knox

Hi,

Im not the most computer-savvy guy, so be easy on me :)

On my computer, my most heavy area in my game (full screen gui animations 60 frames, etc) runs at about 54 fps. Ive tested this on another system and that same part runs at like 10 fps. They are both pretty modern computers, with the exception that the second one is a laptop with a crappier graphics card.

What will affect the frame rate more, the graphics card, the processor, or ram? Its more so I can gauge the minimum specs, etc...

Thanks in advance guys :)
--All that is necessary for evil to triumph is for good men to do nothing.

Gilbert

What mode is the game running at? D3D9 or DX5?

I'm not sure how the engine does the rendering with these modes, but if in D3D9 mode the engine relies on D3D to render individual elements on screen then the graphics card can make a HUGE difference in speed.

Knox

Yes, on that laptop is was in D3D9...I was just surprised of the difference in frame rate on 2 relatively "new" computers...that laptop has 3 gigs of ram and has a good processor...the graphics card is integrated though, but still...Ill try to get the full spces tomorrow and compare.

Ok so what you are saying is that in D3D it relies heavily on the card, so I might have to include the type of card in the minimum requirements.

Thanks for that info!


--All that is necessary for evil to triumph is for good men to do nothing.

Snake

It also depends on what resolution the game is running at. In 320x200 there's almost no slow-down, from what I've ever experienced anyway. Fullscreen animations wouldn't effect either unless the game is 640x400 and up.

Is it a constant animation? Anything have to do in REP_EXEC? Something that large that has to be constantly updated would cause slow-down for sure.
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Knox

its 1024 x 768, and the gui animation takes half the screen, 60 frames...and repeatably animates since its a view with a loop set to infinity... its a flag that waves in the wind integrated into the GUI...

Ill test the same thing but with less frames of animation in the loop (60 is nuts, but when I tested it on my computer it was running at 56 fps)...on the laptop: crawling at 10 fps!



--All that is necessary for evil to triumph is for good men to do nothing.

Snake

Quote from: general_knox on Wed 30/09/2009 20:27:31
its 1024 x 768, and the gui animation takes half the screen, 60 frames...and repeatably animates since its a view with a loop set to infinity... its a flag that waves in the wind integrated into the GUI...

Ill test the same thing but with less frames of animation in the loop (60 is nuts, but when I tested it on my computer it was running at 56 fps)...on the laptop: crawling at 10 fps!

Try setting the game's resolution to 320x200 in the setup file for sh*ts and giggles. 1024x768 is pretty huge to half a half-screen animation. No wonder you're only getting 56fps.
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Pumaman

A half-screen sized image will be 1024x384, which will be 1.5 MB at 32-bit.
If you have 60 frames, that's 94 MB of video memory that would be required on the graphics card.

If the laptop has a cheap 64 MB graphics card for example, then it won't have space to store all the frames so AGS will need to keep removing and reloading images into the video memory which is quite a slow thing to do.

The real question is, do you honestly need a 60-frame animation for that? :D

Knox

#7
Ha! Well I dont think so...it was more like "this looks good, lets try it out!"...and 56fps is good, so I was like, "Great, this works"...never tought of testing it out on a slower machine until recently. Doh!
I will see if I can chop it down to like 30 frames max (15 would be even better)...and Ill post what frame-rate I get on  the laptop.

Ive got another question:

What is "faster", displaying 30 png files with alpha in an animation, or 30 bmp files with a chosen color that acts as an alpha? On my harddrive, the bmp files are way heavier than the png's...so I started by default saving all my sprites as png's...but now Im thinking perhaps bmp's are displayed quicker than png's with alpha?

Ive tested by making the same animation with bmp vs png...and it "seems" that the bmp with a color chosen as the alpha had a better frame rate...however, each bmp is almost double the size in memory than the png's.
--All that is necessary for evil to triumph is for good men to do nothing.

Gilbert

After the images are imported as sprites they're saved in a native format by the editor (actually the sprites are just uncompressed by default and are simply RLE-compressed when the "compress sprite file" option is checked), so using PNGs will not make your game smaller and in fact it may make an even larger game file since the alpha channels have to be stored as well.

Knox

Ahh thats true...Im guessing when you use the "compress the sprite files option", it does a good job not destroying too much "quality"? Any tests done the compression of 32bit alpha sprites?

I just finished making a pass to change almost all my png files to bmp (with a 255 255 0 as the color for transparency). Ill test out this setup on a few computers and compare it to the png versions for frame rate...Ill try to post the results soon.
--All that is necessary for evil to triumph is for good men to do nothing.

Gilbert

The RLE compression is lossless. It won't impact on any tiny bit of quality of the sprites, well, unless there's an unseen bug that would mess stuff up.

RLE is one of the simplest schemes, so whether you can get good result depends on the "complexity" of the sprites. They compresses well especially when there are large area of contiguous regions of the same colour.

Knox

Ok, thanks for that info...Interesting.

Ive browsed the forums and Ive noticed some people saying they get 200 fps in their game...I though anything above 30fps was good (?).

What is an acceptable framerate to shoot for with an AGS game? I was thinking I would try to shoot for an average of 40-50 fps.

1024 x 768 of course :p
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk