Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3]
  ignore  |  Print  
  Game loops!  (Read 45332 times)
0 Members and 3 Guests are viewing this topic.
Offline _Scyth_

Senior Newbie





« Reply #60 - Posted 2013-01-09 18:22:22 »

What is the interpolation used for?
Online ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #61 - Posted 2013-01-09 22:34:28 »

Wut?

Offline Eli Delventhal
« League of Dukes »

JGO Kernel


Medals: 39
Projects: 12


Game Engineer


« Reply #62 - Posted 2013-01-11 20:35:07 »

Post that again when you're not the top of the page. Smiley

It's used for having fluidness beyond the speed of either your logic or frame updates. Generally, your FPS is going to be quite variable, so you need to calculate exactly how much you want to move things based on how fast or slow the last update was. In variable timestep, you need to interpolate the logic because it is able to run at any speed. In the case of a fixed timestep, you need to interpolate the drawing, because the logic is locked into a certain speed but the drawing is not.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Damocles
« Reply #63 - Posted 2013-02-26 16:52:19 »

Loops and Things:

https://www.youtube.com/watch?feature=player_embedded&v=v9funsyB-XM

Offline fictiongame

JGO Visitor




« Reply #64 - Posted 2013-05-20 00:48:50 »

Like the article and the thread very much, because this is what I have been looking for.
I am a newbie in game development.
From the beginning, I had questions about loop: I was wondering how accurate it would be, and what will happen if one loop is delayed, and how to synchronize between different computers.

Anyway, here is some of my questions:
(1) It seems sleep and timer is not recommended due to their low accuracy. But they do not cost CPU, right?
In "Fixed timestep" example code of the first post, it seems it uses while loop comparing the current time to the desired time point. It is time consuming, but it is claimed by OP that it is more accurate.

Is my above understanding correct?

(2) Regarding OP's "Fixed timestep",

Update is irrelated to the variable time. So what matters is the times of updates.
But render is designed to be dependent on lastUpdateTime.
I do not understand why. I mean, it seems not make sense here.

Thanks again for OP's article!
Pages: 1 2 [3]
  ignore  |  Print  
 
 

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (88 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.095 seconds with 21 queries.