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
483
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,575
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,208
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
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @ZeroT21, Exactly. They're only good if you're willing to practice soldering, not for the long run.
  • ZeroT21 @ ZeroT21:
    i only use 'em to fix my own home appliances or personal projects/mods
    +1
  • SylverReZ @ SylverReZ:
    Home appliances would be a soldering gun, including plumbing. Normal soldering irons are for hobbyist projects/modchip installs.
  • ZeroT21 @ ZeroT21:
    though i've heard plenty of people getting wrecked trying to ''fix'' their microwave
  • SylverReZ @ SylverReZ:
    @ZeroT21, Did somebody tell them to put something metal in there?
  • ZeroT21 @ ZeroT21:
    I'm wondering what's so hard about it
  • SylverReZ @ SylverReZ:
    🍆 <== This?
  • ZeroT21 @ ZeroT21:
    having bigger nuts than brains is genetic probably
    +1
  • SylverReZ @ SylverReZ:
    That's what they tried to tell you.
  • SylverReZ @ SylverReZ:
    Hypothetically.
  • ZeroT21 @ ZeroT21:
    People won't believe me anyways untill shit happens. Youtube teaches everything they say... so ima just sit back and enjoy the mayhem
    +1
  • SylverReZ @ SylverReZ:
    If brain small, does that mean bigger balls? :unsure:
  • ZeroT21 @ ZeroT21:
    no ,they have bigger balls
    +1
  • ZeroT21 @ ZeroT21:
    we can't possibly insinuate they have small brains, be modest and just tell 'em they have big balls so they feel better bout 'emselfs
    +1
  • SylverReZ @ SylverReZ:
    @ZeroT21, True lol.
  • BakerMan @ BakerMan:
    chat is this real?
  • K3Nv2 @ K3Nv2:
    Chat is Ai
  • ZeroT21 @ ZeroT21:
    big balls are REAL
  • ZeroT21 @ ZeroT21:
    AI has balls too

    :rofl2:
  • NinStar @ NinStar:
    Chat, is @HiradeGirl real?
    NinStar @ NinStar: Chat, is @HiradeGirl real?