Author Topic: Sync speeds?  (Read 1883 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Sync speeds?
« on: November 05, 2010, 09:35:32 am »
Hello, what is the best way to synchronize speed of an application on 2 diferent computers.  When I use a while loop to do stuff like the movements, key reading, render, etc, it runs alot faster like almost a fast forward mode on my really good computer when compared to my older one.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Sync speeds?
« Reply #1 on: November 05, 2010, 07:59:44 pm »
Either base the advances in your game world on time or on ticks (which is nothing more than a simplified time based approach). I prefer ticks. The advanced example in the wiki should actually contain some rough code that shows the basics.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: Sync speeds?
« Reply #2 on: November 08, 2010, 10:00:58 am »
Thanks that worked.
« Last Edit: November 08, 2010, 10:34:00 am by Disastorm »