Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fixed-timestep]

The tag has no usage guidance.

1
vote
0answers
27 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 ...
0
votes
1answer
42 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 ...
2
votes
1answer
503 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 ...
1
vote
1answer
63 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 ...
0
votes
0answers
62 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 ...
0
votes
1answer
307 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
1answer
177 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
1answer
254 views

Is Time.deltaTime different on various devices?

Can someone say what is wrong with my code. I have custom timer implemented like this: ...
0
votes
0answers
75 views

Calculate TimeStep from FPS

If we collect fps of a game for each second of time stamp and collected them for n seconds therefore we have n number of fps values in our collection. Then we can get average fps from that collection, ...
1
vote
1answer
137 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
1answer
194 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. ...
0
votes
1answer
1k 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 ...
74
votes
5answers
11k 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: ...
1
vote
2answers
868 views

Implementing “Fix Your Time Step”

So far I have this implementation of "FYTS". However I am facing several problems. ...
0
votes
1answer
978 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
0answers
134 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 ...
5
votes
2answers
469 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 ...
1
vote
2answers
200 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 ...
6
votes
2answers
498 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 ...
0
votes
2answers
85 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 ...
6
votes
1answer
323 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
0answers
62 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. ...
2
votes
1answer
347 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
1answer
58 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?
12
votes
4answers
4k 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 ...
1
vote
2answers
331 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
0answers
217 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 ...
2
votes
1answer
866 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 ...
2
votes
4answers
1k 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 ...
0
votes
3answers
139 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
1answer
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 ...
0
votes
1answer
302 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: ...
3
votes
1answer
331 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 ...
3
votes
1answer
251 views

Game loop in Javascript

I've been into javascript game programming with html5 and canvas lately. So far I've only been able to implement a game loop with setInterval, but I'm aware this means using fixed timestep. I've ...
1
vote
3answers
180 views

Getting sprites to move exactly the same on different devices

Background When moving a sprite along the X axis, this is my code: ...
3
votes
1answer
1k views

Does client side prediction sync with the server in the past?

I've spent some time now messing around and just trying to learn dead reckoning and client side prediction for the fun of it. Most of what I do doesn't need it, so i've never had a need to go down ...
-1
votes
1answer
507 views

why are there draw rate and update rate in fixed time step game loop?

http://www.gameprogblog.com/generic-game-loop/ Java ...
2
votes
1answer
283 views

Calculate Distance Using Lifetime, Speed, and Time Between Ticks

I am trying to draw a line from the player to where he is facing, with the line being the distance his rockets will travel. I have ShipMissile.Speed, which is the number of pixels to move per tick, ...
1
vote
2answers
789 views

Smooth animation when using fixed time step

I'm trying to implement the game loop where the physics is independent from rendering but my animation isn't as smooth as I would like it to be and it seems to periodically jump. Here is my code: <...
2
votes
1answer
396 views

Implementing a time scale in game with fixed physics update

I'm currently putting together my game loop based on the "Fix Your Timestep" article at gafferongames.com. This is going fine, but I'm also trying to implement a 'time scale', i.e. a way to control ...
0
votes
2answers
235 views

Serious gameplay issue by spawning enemies according to elapsed time

EDIT: I have changed the title as I think that this is a general gamedevelopment question but, on a technical note, I am using Cocos2d v2.0 Some time ago I had asked a question on which was the most ...
6
votes
2answers
6k views

How to achieve smooth movement with a fixed timestep

Previously in the update method of my game I was using a variable time step which provided very smooth movement of a player sprite except when the frame rate would drop, even slightly. At that point I ...
-1
votes
1answer
333 views

Server fixed timestep not running at 30Hz but way way too fast [closed]

I'm trying to make my game's server thread run at a fixed 30Hz but can't figure out how. Basically, before I just had a stupid while(1) { //do everything as fast as you can} which means that for my ...
0
votes
2answers
573 views

What is XNA's GameTime used for?

I'm developing a game using fixed time step, and so far I haven't been using XNA's GameTime class in my code. What uses does the class have, and should I definitely use it in my game, or can I ignore ...
3
votes
3answers
938 views

How precise should timers in update loops be?

What is the suggestion of "enough precision" in a timer for a fixed game update loop? Currently I'm testing with this code, but it sometimes misses 1-2 updates @ 50hz. While at 30hz it seems to work ...
5
votes
2answers
482 views

What is the point in using real time?

I understand that using real time frame elapses (which should vary between 16-17ms on average) are provided by a lot of frameworks. GetTimeElapsedSinceLastFrame, ...
4
votes
3answers
994 views

Semi Fixed-timestep ported to javascript

In Gaffer's "Fix Your Timestep!" article, the author explains how to free your physics' loop from the paint one. Here is the final code, written in C: ...
1
vote
1answer
684 views

default xna 4.0 gametime don´t works well for 2D physics

I am developing a game using Visual Studio 2010 and XNA 4.0, after advancing to some extent with the project (a platform based 2d platformer msdn starter kit) I got to test it on different computers ...
7
votes
2answers
1k views

Mitigating the noticability of a frame drop in XNA

I have been having some minor frame drop issues in a 2D XNA game. To start with, I am a vsync'ed, mixed timestep. That is: ...
5
votes
4answers
3k views

Still confused about timesteps in XNA

I have been reading many different posts and articles about timesteps and while I now understand that fixed timesteps are generally considered superior, I'm having a bit of difficulty implementing one ...