Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Understanding game tickrate

tickrate frame rate fps

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 AngelOnFira

AngelOnFira

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 April 2014 - 03:46 AM

I have recently been learning about how multiplayer games work over lan and internet. So far, from what I have gathered, it all revolves around tickrate. In fps like counter strike, the tickrate of a server can be as high as 120 times a second, to ensure that the bullets all hit their mark properly. Then with online games where it is not essential to have that many checks a second, you may have as little as 20 ticks per second. Then there is the client. They will have a lower tickrate as to ensure that the server isn't getting too much information. So I have a few questions about this.

 

  1. I know that there will be different computer speeds. Faster computer will be able to go through the game loop faster, giving them more frames per second. So if the frame rate is increased, the tickrate would have its own timer on when to send each second, as to limit the amount of times someones character would move forwards. If there were no limit, faster computers would have faster moving characters than slower computers. But what about the other way? If there is a slow computer, would I just have the send timer checking if it needs to send movement info more frequently then the game world updates? So that even if the game is laggy, its still sending the information it needs to each second, which doesn't slow a players movement down.
  2. Next, if the players fps is really fast, would I just look at how fast it is and cut down their movement every frame to be proportional to how far it can go in a second? Or how would it scale with a higher frame rate? Because obviously something has to happen to the character each frame, or whats the point of having a higher frame rate?

These are all of the questions I can think of at the moment, but I'm sure that I have more. I know I may have not explained some of the parts in the best manner, so if you need clarification I would be glad to help. Any answer what so ever would be appreciated! Thanks!



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 24 April 2014 - 07:26 PM

Welcome aboard AngelOfFire,

 

Some nickname you picked! Got any flaming sword I should know of?

 

About the question, having tickrate means all the computers work the same (unless O.S or hardware says otherwise) . Actions (such as input and display) takes place on ticks, and you are not likely to notice 200fps because your eyes work at (if I remember right) 24fps, and with the input, the game will allow just what is allowed in between tickrates.



#3 AngelOnFira

AngelOnFira

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 26 April 2014 - 10:31 AM

Haha, no flaming swords... yet

 

So all of the clients will have the same tickrate, and updating input display and networking all take place on one tick? If so then what is happening on the extra frames where a tick does not occur? And what if there is a computer with graphics lag and it does not even have enough frames to equal the amount of ticks?



#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 26 April 2014 - 11:15 AM

Well, it would be iddle an you will not notice it.

Remember, if the tick goes faster  than your eye (24fps) you won't notice, either its work, or its iddleness.

 

In the past, in the times where games run on a wide range of CPU speed (from XT to 486) what the games use to have was a CPU-rate factor, which basically worked by measuring the CPU's speed at the start and the game, and setting a delay factor (or even a graphic quality restriction, as in textures in the background) so the game would run at the same speed in a turtle XP with CGI or in a 486 with a fast video card.

 

Now you know it as a tick, and it's not in a CPU but in a server, and it does the same, equalizes all the connections (all the hardware in the past) so they all run the same way, game-wise (because graphic-wise, sound-wise, they run as good as they can taking advantage of the machines hardware).

 

It would be good for you to experience this by going to some big cyber-cofee, with a lot of teenagers playing the same game in different machines. Stand behind them, and see how it goes ;)






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download