• Advertisement
  • entries
  • comments
  • views

Refresh rates

Sign in to follow this  


Right. Here is my opinion:

Using any kind of variable rate frame rate, it is IMPOSSIBLE to write a Mario-style 2D jumping scroller without

a) jump height varying with frame rate


b) graphics that jitter around on the screen

I defy anyone to give me a method that would work without either of those problems. I've tried every combination of variable rendering/variable physics, fixed physics/variable rendering and I've tried several clever tricks with interpolation and NOTHING WORKS PROPERLY.

So, I'm setting the monitor refresh rate to 60hz. I'm not just doing it blindly - I'm querying that the mode is supported with EnumAdapterModes() - but game will bomb if your monitor can't do 800x600x32x60hz.

If anyone reading this has a monitor that CAN'T do that mode, please let me know. I've never come across such a thing in the last ten years though.

Clearly if a PC is not fast enough to render my game at 60fps or higher, the gameplay will slow down but I don't really care.

So anyway, here's a screenshot of the very early stages of the new game:

The main character can jump, Mario style, around the level, which scrolls (obviously). The sky backdrop is quite nice - it is a 512x512 texture that wraps at all four sides and we've got a paralax effect as it scrolls at half the speed of the map.

It is quite subtle but adds a slight sense of depth.

Next up, character animations. Groan.


Here's the main character's running animation. Hope it works as never posted a GIF before:

Sign in to follow this  


Recommended Comments

I take it that this is a full-screen only game, then?

You could use a fixed time step and internally render at a very high rate (say, 120FPS) and drop frames as required, but that would (as you mentioned) leave a jitter if it didn't divide down cleanly (60, 40, 30 FPS). Motion blur would prevent animation from becoming jittery, but at higher resolutions this would be too slow.

Locking to a particular frame rate is probably the best bet. After all, that's what all the classic consoles had to do anyway... [smile]

EDIT: That wasn't there when I clicked before, I swear. Nice screenshot!

Share this comment

Link to comment
Cheers. Quite friendly-looking graphics, aren't they.

When I get the character animated, I'll see if I can figure out how to make a GIF with PSP Animator so I can post it.

Share this comment

Link to comment
Original post by EasilyConfused
I'll see if I can figure out how to make a GIF with PSP Animator so I can post it.
It seems you did. That's ace!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement