Questions tagged [fixed-timestep]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

Physics update frequency feasibility

I want to create an offline 2D platformer that is not very physics heavy. After a lot of consideration, I've decided to run most of the physics at a fixed rate of 480hz, and I'm not experiencing any ...
  • 3
1 vote
1 answer
53 views

Do we need an ackowledgment packet in deterministic TCP multiplayer game?

I am trying to implement a deterministic game after having read 1500 archers on a 28.8. The simulation uses fixed-point math and the client only sends commands to the server which sends back the ...
  • 133
0 votes
1 answer
99 views

How do i correctly interpolate between 2 positions recieved from server?

I am trying to implement interpolation in client side. I store Vector2 position data recieved from server in a list and try to interpolate (x,y) from previous position to next position as data comes. ...
1 vote
1 answer
429 views

How to make my Unity project deterministic for replays?

I am working on an arcade-style 2D shmup and recently started implementing a replay system that allows players to view their runs of the game. I use the technique of recording input each ...
  • 1,527
0 votes
0 answers
24 views

Sync issues with replaying movement

I am creating a networked game and having issues with keeping positions synced between multiple clients. Essentially what I have happening is one client's movement to replaying on another routed ...
  • 101
0 votes
2 answers
2k views

Time.fixedDeltaTime & Time.deltaTime in Unity

The old Unity 5.3 documentation said: Time.fixedDeltaTime The interval in seconds at which physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate) are performed. For reading the ...
  • 331
15 votes
3 answers
5k views

Fixed timestep game loop, why interpolation

This is a very standard way of doing a fixed timestep game loop, where you just accumulate time from the previous frame and consume it in discrete steps with the physics engine: ...
  • 163
0 votes
1 answer
484 views

Calculating framerate-independent values, for linear, quadratic, and exponential functions

There are a few similar posts, but they only deal with one of the three components I'm looking for, and none seem to handle the case of using a fixed step size (they're all about simulations which use ...
3 votes
2 answers
2k views

How do fixed-point physics (engines) work?

I would think there should be an abundance of excellent articles answering this question, but my searches have come up completely empty. I am developing an embedded graphics engine on a ...
0 votes
0 answers
98 views

Fixed timestep, how to determine how far back other clients are simulated

I'm working on networking code for a social MMO (very low-intensity compared to an FPS) and have a question about fixed timestep. This answer does a good job of explaining the forward-dating part of ...
  • 101
0 votes
0 answers
763 views

How to apply forces to rigidbody when Time.timeScale is changed?

My Task: I'm trying to replicate this virtual 3d creature evolution project. I'm using unity as my physics engine. Each limb part has a MonoBehaviour called an <...
  • 131
0 votes
1 answer
579 views

How often should I check for collisions in a Minecraft-like game?

I'm trying to build a game from scratch in Dart, similar to Minecraft. As far as I understood, there are two main functions in a general game loop: tick: a function that gets executed a fixed amount ...
  • 125
1 vote
0 answers
97 views

Game loop stutters

I have the following game loop: ...
  • 163
0 votes
1 answer
412 views

Interpolation of render with fixed physics update

In Fix Your Timestep, they briefly address the remainder time in relation to rendering. Saying that remainder can be used to generate an interpolated rendering. We can use this remainder value to ...
  • 103
2 votes
2 answers
1k views

How to handle player input with fixed rate variable fps time step?

I've made a system which uses the ideas from "Fix your Time Step" in order update physics. I'm having trouble finding standard methods for dealing with this when user input affects player movement ...
  • 1,713
0 votes
2 answers
301 views

Adding some new velocity to player in FixedUpdate. Should I use FixedDeltaTime or nothing?

I am trying to learn how to move objects in Unity without using the built in features like AddForce etc. Some tutorials on Unity website (and other places) is where I have got most of my 'knowledge' ...
4 votes
1 answer
455 views

Fixed Timestep with Interpolation | Blurry & Choppy

I've been implementing a game loop with a fixed timestep which uses interpolation as described in the (legendary as I have come to find out as it is referenced in almost every post I have read trying ...
  • 181
0 votes
0 answers
104 views

How Best to Implement Fixed Time Step for Gsync/Freesync Monitors?

I currently implement my game loop using a variable fixed timestep, i.e. dt = 1 / monitor_refresh_rate with vsync (or pseudo vysnc with delays where vsync is ...
1 vote
0 answers
66 views

Keeping simulations in sync over long periods of time

I'm working on a multiplayer game which involves a huge amount of predictable AI enemies, and a few other players. The enemies are the most important to be accurate, because the game involves pixel ...
  • 11
0 votes
1 answer
98 views

Logic at a low framerate with interpolated rendering at higher framerate

It takes too much processing power to do game logic on every rendered frame (60fps), so what if I made my game save frames? It would actually calculate important stuff 20 times a second, and the ...
  • 257
5 votes
1 answer
1k views

Render Stutter - OpenGL or loop timing?

For some time now i have no been able to pinpoint the nature of the rendering stutter shown above(by not clearing the screen, not using SwapBuffers and drawing only to the front buffer). See the big ...
user avatar
1 vote
1 answer
225 views

Fixed timestep on the server without hogging CPU?

It sounds backwards, but it's the situation I'm currently trying to solve on my dedicated server. Everything I've read about fixed timestep assumed it was on a client, where you're already running in ...
  • 574
1 vote
0 answers
338 views

How do games have low tick rates without causing input lag?

For example, Minecraft. It updates the gamestate at a rate of only 20/second. And from what I've read, these multiplayer games do the same with their network communication, sending updates at that ...
  • 574
2 votes
1 answer
1k views

Unity3d physics stability with low fixed timestep

I'm developing a vehicle simulator game for mobile platforms. This vehicle has some hydraulic arms. I use hinge joints and configurable joints. There can be collisions to walls etc. When I set a low ...
1 vote
1 answer
350 views

How do I make my game (without performance problems) not stutter?

I've made a game that has gameticks every 1/60 seconds. These gameticks take very little time to calculate (< 0.5 ms). The game is written in Javascript and uses requestAnimationFrame (rAF). rAF ...
1 vote
1 answer
871 views

Is Time.deltaTime different on various devices?

Can someone say what is wrong with my code. I have custom timer implemented like this: ...
1 vote
1 answer
434 views

Timestep with multithreading

There are several questions and articles which deal with timestep - for example: Should game logic update per second or per frame? https://gafferongames.com/post/fix_your_timestep/ Accounting for ...
2 votes
1 answer
351 views

How much do inconsistencies in update timing matter?

Yesterday I wrote my first game loop with fixed timesteps. It is supposed to run every 50 ms, however it runs at 50-53 ms. Does it matter? I'm guessing no, but I figured I would ask anyway. ...
3 votes
2 answers
4k views

Can I always assume that fixed time step in Unity is reliable?

I was thinking about games on low end machines or phones where the CPU would be limited. If I were to move all of my game logic into FixedUpdate() can I assume that ...
  • 3,611
86 votes
5 answers
20k views

What is the point of update independent rendering in a game loop?

There are dozens of articles, books and discussions out there on game loops. However, I pretty often come across something like this: ...
  • 833
3 votes
2 answers
2k views

Implementing "Fix Your Time Step"

So far I have this implementation of "FYTS". However I am facing several problems. ...
0 votes
1 answer
2k views

Box2d Fixed Timestep and Interpolation

I am using libGDX and I have problems implementing the box2d fixed timestep with interpolation. This is my code: ...
0 votes
0 answers
222 views

SFML game only runs smooth at high framerate (Windows 10)

I am trying to make my game smooth on low and high fps. Right now, it only runs smooth when I don't limit the framerate. If I run it at 60, then my sprite is noticeably "sluggish". I believe this ...
  • 191
5 votes
2 answers
1k views

Fixed timestep with interpolation & rounding draw positions: jerky animation when the character is not moving

I've implemented a deterministic, fixed timestep system from here: http://gafferongames.com/game-physics/fix-your-timestep/ Everything works fine, output is the same with each step but there's one ...
  • 2,522
1 vote
2 answers
357 views

Game loop with fixed timestep gives strange result

So I've read the famous article at http://www.koonsolo.com/news/dewitters-gameloop/comment-page-2/#comments which describes different methods of implementing a game loop. I've tried to implement the ...
  • 111
6 votes
2 answers
1k views

Is it safe to base a combo system in frames instead of time?

I'm building a prototype for a fighting game (not vs, something like Final Fight). I'm trying to define the data for the player combo tree and had a look around looking for inspiration and have seen ...
  • 1,075
0 votes
2 answers
100 views

Running subsystems at difference update intervals

I want to update the rendering at 60fps, but the logic at some lower rate, say 15Hz. But if an object only moves when the game logic updates, then it would appear to stutter badly especially for lower ...
5 votes
1 answer
571 views

Fixed Time Step Flutter

I've seen a lot of questions about this problem, but really no solution. Hopefully I can explain the issue well enough that I can get some sort of closure on this problem. I'm using a Fixed Time ...
1 vote
0 answers
84 views

Interpolate Entitiypositions received from Server

I want to Inter, or perhaps, extrapolate the positions of gameentities on the client. Those positions are received from the Server. The vague updaterate of the server makes it difficult to implement. ...
  • 153
2 votes
1 answer
415 views

Client and server loops don't match up

I'm trying to build a small networked game using WebGL and NodeJS. I have a basic client and server setup and I'm at the point where I'm trying to implement dead reckoning to simulate what happens on ...
0 votes
1 answer
75 views

Does fixed time step deltaTime get higher if the computer can't handle it?

If you use fixed time step and set it to for example 0.0166667 does it ever go up if the computer can't handle 60 updates/ticks per second?
user avatar
12 votes
4 answers
5k views

How often do big MMORPG update the physics? [closed]

As far as I understand, most big games use fixed timestep to have a stable simulation. Regarding the game server, which "frame rate" do they impose? Or said it another way, what fixed timestep do ...
  • 283
1 vote
2 answers
839 views

Using fixed timestep and interpolating states makes physics fall behind one frame. Does that affect responsiveness?

The title says it all, but let me build more into the question: I suppose everyone by now knows the Fix Your Timestep article, and its proposal to free your physics engine steps from your rendering ...
0 votes
0 answers
292 views

Why does physics interpolation give me periodic jumps/flickers?

I have seen this question but it didn't solve the problem. I have followed the same steps as in this article. What I notice in my Android game is that my interpolation alpha (or fraction or ...
  • 103
2 votes
1 answer
1k views

Problem with update/render in game loop (scrolling view, render interpolation)

I use SFML 2.2 and program a 2d prototype game (2d mario style where the camera follows the player). I am experiencing the buggy imagery during rendering, for example a chunk of vertex array blocks ...
  • 23
2 votes
4 answers
2k views

Android Game-Loop (rendering & logic removed, but still 'skipping frames')

Overview Guys really hoping for some help here. My game loop is based on code from Fix Your Timestep!. I've read the article more than a few times, but I can't quite work out what exactly is ...
  • 1,917
0 votes
3 answers
181 views

What is the best way to keep track of time in a game?

I'm getting to the part in development where I'm noticing that timing is going to be an issue. If I put my movement update in the same function where I draw the scene, then a low FPS means slower ...
0 votes
1 answer
2k views

Explain the difference between extrapolation and interpolation

http://www.unagames.com/blog/daniele/2010/06/fixed-time-step-implementation-box2d here there are two algorithms of smoothing in case of fixed time step physics simulation. I don't understand the ...
  • 1,327
0 votes
1 answer
450 views

Trying to understand the XNA fixed time step game loop logic

I came across the blog post Understanding GameTime, and after lots of reading on fixed time steps in game loops this is the approach I would like to take. In summary, this is the logic from the post: ...
user avatar
3 votes
1 answer
607 views

Fixed timestep and interpolation question

I'm following Glenn Fiedlers excellent Fix Your Timestep! tutorial to step my 2D game. The problem I'm facing is in the interpolation phase in the end. My game has a Tween-function which lets me ...
  • 148