Jump to content
  • Advertisement
Sollum

Competitive games and locked frame rates

Recommended Posts

Replying to the original post, because I think some aspects haven't been explored fully:

 

"Recently i've been watching a lot of material on fighting and other competitive games. [...] Games like Diablo 3 also have "Frame" counter. But how do they go about precision? How do they ensure that frame A is equal to frame B and C?"

There's a lot of difference between a competitive fighting game from the old Street Fighter tradition, and the wider world of action games like Diablo. With the former, frame durations are important as the hitboxes vary based on the animation frame and in those cases work can be done to keep the frame rate consistent. With the latter, times are what are important and it doesn't matter so much what happens on each frame or how long the frames are.

 

"I code games for Android and I switched to "time" based calculations instead of frame based long ago. "

Another problem that you have is Android is notoriously bad as a real-time operating system, so anything that relies on precise timing at low latencies - including frame-based fighting games - is likely to struggle.

 

"How do big developers ensure that no frame skips happen and 1 frame is always the same length? "

Firstly, they don't deploy their game on Android. :D

Secondly, it's relatively common to set your game to run at a constant 60 (or 30) frames per second, to write logic that assumes this, and to tweak the graphics settings and assets to ensure that this is what happens on the target hardware. For the most part, console game developers aren't worrying too much about the "fix your timestep" concept.

On PC-oriented titles, where there are a larger range of devices and performance, you do have to start thinking about making the simulation more deterministic, e.g. with fixed-rate physics/logic updates, and variable-rate rendering. That's been covered in the other posts in this thread. The key issue there is that gameplay proceeds in equal-sized chunks even if what is seen on screen is not. It also tends to rule out pixel-perfect sprite-based collisions. Luckily, most PC games don't want or need that capability.

Share this post


Link to post
Share on other sites
Advertisement

Thanks for all the replies!

On 4/12/2018 at 4:34 PM, Kylotan said:

...

Another problem that you have is Android is notoriously bad as a real-time operating system, so anything that relies on precise timing at low latencies - including frame-based fighting games - is likely to struggle.

...

Firstly, they don't deploy their game on Android. :D

...

I was guessing that might be the case, but was unwilling to admit :(
Garbage collection makes a lot of spikes for frame based games.

Thinking of switching to PC based game for next project. Android is a great platform plagued with a lot of money milking crap :(

LibGDX offers a nice solution to make projects for both Android and PC, tho i don't think its possible to create a descent action game due to nature of JVMs across the board.

Share this post


Link to post
Share on other sites

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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!