30 FPS?

Started by teengamer, February 12, 2015, 08:58:30 AM

Previous topic - Next topic

teengamer

Is there a reason the game runs at 30 FPS over 60? I'm 98% sure it's not a unity engine holding it back. I mean I realize it doesn't really need 60, but if my computer can handle it, why not?

miquelfire

I think it was a side effect of working with AIR/SWF for so long. When you use the 2X button, it should run at 60 FPS.

Grayzzur

It's locked to 30 FPS because the engine basically calculates all the moves (creeper, weapons, unit movement, etc.) for each tick, and each tick is 1/30th of a second.

2x/3x/4x mode just calculate multiple ticks and display once, so you'd still be locked to 30 FPS, but have 120 ticks occur in that time.
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker

Karsten75

Quote from: teengamer on February 12, 2015, 08:58:30 AM
Is there a reason the game runs at 30 FPS over 60? I'm 98% sure it's not a unity engine holding it back. I mean I realize it doesn't really need 60, but if my computer can handle it, why not?

Turn the question around. Is there a reason to run at a different rate?

Michionlion

I don't notice the fps as much on CW as on any other game - I can't play a first person shooter with less than 60, but with CW it is hard to tell the difference.  It does seem weird that it would be limited, though.  The rendering and calculation should have been disconnected, if possible.
"Remember kids, the only difference between science and messing around is writing it down."
                                                                                                                         - Adam Savage

My website
My CW1, and CW2 maps!

teknotiss

i think it's not weird if you wanted to make a game that would definitely run on older and less powerful machines  :)
"Is God willing to prevent evil, but not able? Then he is not omnipotent.... Is he able, but not willing? Then he is malevolent.... Is he both able and willing? Then whence cometh evil?.... Is he neither able nor willing? Then why call him God?" --- Epicurus

Grayzzur

If I recall from previous posts about design, the game is supposed to run at a set rate per tick regardless of how good your computer is. If you're playing on ancient hardware or a top-of-the-line box, exactly the same amount of stuff happens during each game tick.

If your computer can't run fast enough, the game slows down slower than 30FPS, so that everything that needs to get done is still done on each tick.

If your computer is a beast, the game does what it needs to do, posts the frame, and then waits for the rest of the 1/30th of a second to go by before starting the next  frame. There's no need for the framerate to be faster. At 60FPS, the way the game is set up, you'd just get the same exact frame twice in a row.

Now, perhaps you want the game to run at a true 60FPS if you're on 2X speed and your computer is fast, instead of calculating 2 ticks and displaying 1 frame? Seems reasonable. However, the programming behind the scenes to make that change... and do it the current way on slower computers... becomes more difficult, and ultimately doesn't add anything to the game as a whole.

It makes sense NOT to disconnect the rendering and calculations on a game like this.
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker

Michionlion

Interpolation, Grayzzur.  It makes things beautiful, if done right.
"Remember kids, the only difference between science and messing around is writing it down."
                                                                                                                         - Adam Savage

My website
My CW1, and CW2 maps!

teengamer

Quote from: Karsten75 on February 12, 2015, 02:10:43 PM
Quote from: teengamer on February 12, 2015, 08:58:30 AM
Is there a reason the game runs at 30 FPS over 60? I'm 98% sure it's not a unity engine holding it back. I mean I realize it doesn't really need 60, but if my computer can handle it, why not?

Turn the question around. Is there a reason to run at a different rate?

60 FPS is the default refresh rate of monitors, so any faster and you won't notice it. 60 FPS is just more fluid is all, although with CW3 I don't notice it really, I was just curious.