how do you make a games speed not rely on fps?

Nyap

HTML Noob
OP
Banned
Joined
Jan 13, 2016
Messages
971
Trophies
0
Age
55
Location
That Chaos Site
XP
528
Country
so if you did this (pseudocode)
Code:
int main()
{
    while (inGame)
    {
        render stuff etc
    }
}
the game would be blazing fast at 200fps and slow-motion in 20fps. How do modern games remedy this?
 
Last edited by Nyap,

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,615
Trophies
3
Age
30
Location
I forgot
Website
pocket.likeits
XP
19,765
Country
United States
Most modern games use what's basically called a time step. Instead of having things like physics or game speed run based on the amount of frames someone's hardware can render, they use equations to limit actions performed in the game to a specific interval. This allows the game to run at whatever fps hardware can handle while keeping things like physics or in-game speed at a stable speed instead of increasing/decreasing. I suggest googling around about it for more in-depth information.

That's usually the preferred way of doing things in modern games, however there are some that instead will just limit the amount of FPS a game can render instead. Fallout 4 is one of the most recent examples I can think of, Bethesda made the game's speed tied to framerate and just capped the framerate. If you do a little modding and unlock the framerate to, say, 144fps, in-game actions would happen twice as fast; you run faster, objects fall quicker, etc.
 
  • Like
Reactions: Nyap

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    @K3Nv3, Anything from a Trump supporter is pretty BAD.
  • K3Nv3 @ K3Nv3:
    Nah that's close minded thinking the song In general is bad
  • BigOnYa @ BigOnYa:
    Switch 2 price leak- $449 base unit, $499 Mariokart bundle. https://thedirect.com/article/switch-2-price-leak-higher-expected-nintendo-console
    +1
  • K3Nv3 @ K3Nv3:
    "So if the person who told me June release is all but confirmed to be correct, then that could mean the pricing they gave me of $449/$499 USD might also be correct. Think the $50 extra is a Mario Kart Bundle."
  • K3Nv3 @ K3Nv3:
    Yeah I doubt it releases In june
  • BigOnYa @ BigOnYa:
    Who knows, that's still almost 6 months from now
  • K3Nv3 @ K3Nv3:
    It would make more sense for them to announce price in March Maybe display specs release more features then have sales go live during holidays
    +1
  • K3Nv3 @ K3Nv3:
    Og switch did go on sale in March so it's a possibility it may come earlier
    +1
  • BigOnYa @ BigOnYa:
    Switch 1 was released on March 3, edit yea you beat me to it
  • BigOnYa @ BigOnYa:
    But $450 for LCD seems steep, then next year be the OLED for what? $500-550
  • K3Nv3 @ K3Nv3:
    Lol the modder got arrested thread FU Nintendo evil bastards - can't wait for that new switch tho
  • K3Nv3 @ K3Nv3:
    So annoying people do that this sucks so bad but I'm gonna keep giving them money type of nonsense
    +1
  • BigOnYa @ BigOnYa:
    Yea there a member here, I won't mention name but he in every post trashes Nintendy and he lists his consoles in footer, all Nintendy consoles and a pc.
  • K3Nv3 @ K3Nv3:
    Didn't know Nintendo made Android devices
  • K3Nv3 @ K3Nv3:
    Sounds like that one guy that bought a bunch of 360 consoles and hardly makes a profit on them
    +1
  • BigOnYa @ BigOnYa:
    Lol, I only have bout 5 or 6 of them left, I stopped buying/ modding/ selling them temp. Got tired of it and been busy doing other shit here lately.
  • K3Nv3 @ K3Nv3:
    I'm bored of buying electronics so I've been using it on myself to get fixed up may actually look into better furniture this summer
    +1
  • T @ Texasauras:
    help i have marlboro codes
  • T @ Texasauras:
    did anyone get prismatic
    evolutions
  • T @ Texasauras:
    where is everyone
  • BigOnYa @ BigOnYa:
    Zzzzzz sleeping
  • T @ Texasauras:
    BRO IS ANYONE ON NO PIXEL GTA 5/6
  • T @ Texasauras:
    BRO, DID ANYONE GET LOCKED UP, I GOT YOU ON YOUR BAIL BOND hahahaha
  • T @ Texasauras:
    GBATEMP NEEDS THEIR OWN DISCORD
    T @ Texasauras: GBATEMP NEEDS THEIR OWN DISCORD