Questions tagged [frame-rate]

The frequency which an imaging device produces unique consecutive images. It is most often expressed in frames per second (FPS).

The frequency which an imaging device produces unique consecutive images. It is most often expressed in frames per second (FPS).

213 questions
270
votes
11 answers

When should I use a fixed or variable time step?

Should a game loop be based on fixed or variable time steps? Is one always superior, or does the right choice vary by game? Variable time step Physics updates are passed a "time elapsed since last update" argument and are hence framerate-dependent.…
Nick Sonneveld
  • 2,849
  • 3
  • 19
  • 9
46
votes
8 answers

How'd they do it: Millions of tiles in Terraria

I've been working up a game engine similar to Terraria , mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one…
William
  • 2,724
  • 1
  • 23
  • 24
13
votes
5 answers

What are the benefits of capping frames per second? (If any)

I am working on a simple game in OpenGL, using SDL for display initialization and input, and it appears in terms of timing I have two options available to me. Number one being just sleeping for the optimalTimePerFrame - theTimeTakenToRender, when…
w4etwetewtwet
  • 1,047
  • 3
  • 10
  • 16
13
votes
2 answers

Movement appears to be frame rate dependent, despite use of Time.deltaTime

I have the following code to calculate the translation required to move a game object in Unity, which is called in LateUpdate . From what I understand, my use of Time.deltaTime should make the final translation frame rate independent (please note…
General Waters
  • 1,553
  • 2
  • 21
  • 30
12
votes
3 answers

Frame Independent Movement

I've read two other threads here on movement: Time based movement Vs Frame rate based movement? , and When should I use a fixed or variable time step? but I think I'm lacking a basic understanding of frame independent movement because I don't…
ShrimpCrackers
  • 514
  • 1
  • 4
  • 9
12
votes
5 answers

Working with lots of cubes. Improving performance?

Edit: To sum the question up, I have a voxel based world (Minecraft style (Thanks Communist Duck)) which is suffering from poor performance. I am not positive on the source but would like any possible advice on how to get rid of it. I am working on…
Joel
  • 1,517
  • 1
  • 12
  • 29
12
votes
2 answers

Will unlocking the framerate in XNA/MonoGame tell me how efficient my code is?

I have been unlocking the framerate in MonoGame via: this.graphics.SynchronizeWithVerticalRetrace = false; base.IsFixedTimeStep = false; And using it as a basis for how efficient I am updating and drawing in the game. At a resolution of 240 x 160…
test
  • 520
  • 5
  • 20
11
votes
6 answers

Make pygame's frame rate faster

By profiling my game, I see that the vast majority of the execution time of my hobby game is between the blit and the flip calls. Currently, it's only running at around 13fps. My video card is fairly decent, so my guess is that pygame is not using…
Smashery
  • 385
  • 2
  • 7
  • 14
11
votes
4 answers

Could frame interpolation like used by SmoothVideo Project be an option to increase the framerate of games without as big a performance hit?

The SmoothVideo Project uses frame interpolation to increase the fps of video from 24 to 60. The results are pretty impressive . I was wondering if this could be applied to, and whether it would look good in video games? It uses much less resources…
cybrbeast
  • 213
  • 2
  • 5
10
votes
4 answers

How to implement accurate frame-rate-independent physics?

So, I have been working on a project for a while now and recently stumbled across a problem: The common approach to frame-rate independent physics is to either use a fixed update interval (ie. Unity) or just multiply each physical change with delta.…
flotothemoon
  • 483
  • 2
  • 6
  • 21
9
votes
3 answers

Framerate is affecting speed of object

I'm experimenting with building a game engine from scratch in Java, and I have a couple questions. My main game loop looks like this: int FPS = 60; while(isRunning){ /* Current time, before frame update */ long time = System.currentTimeMillis();…
Carpetfizz
  • 336
  • 3
  • 10
9
votes
4 answers

What framerate should I aim for on a mobile phone?

The higher the framerate, the better the game looks, but the faster it drains the battery. What's a happy medium? (I'm making a relatively simple 2D game with sprites moving constantly. I want the movement to appear smooth but I know how irritating…
teedyay
  • 681
  • 2
  • 7
  • 7
9
votes
2 answers

Framerate limitation

The most successful competitive game engines like id Tech , GoldSrc , Source and such allow for framerate limitations. You can play with 30, with 60, with 99, with 72, with 68 etc. In short, you can cap it and control the cap. I was wondering, how…
tomsseisums
  • 3,366
  • 4
  • 32
  • 41
9
votes
1 answer

Separating logic/update from render/drawing code in a single thread using sleep

I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update/draw code to maximize performance without limiting the drawing rate and provide a constant logic update rate…
Osky
  • 193
  • 1
  • 5
8
votes
9 answers

Large FPS vs consistent FPS

When optimizing the frame rate of a game, when should I focus on a large FPS and when should I focus on a consistent frame rate. This is often a hotly contested issue, so please note I'm not asking which is better. What are the pros and cons of…
deft_code
  • 7,652
  • 5
  • 40
  • 55
1
2 3
…
14 15