[ENet-discuss] fps networking

Jacky J flamuss at gmail.com
Fri Mar 14 14:18:06 PDT 2008


I'm having a hard time getting my head around some concepts used in 
first person shooter style games, namely sending user input.  I 
understand pretty much everything else: client side prediction, object 
replication, etc.

So here are my questions and thoughts:

1. The client continuously sends its input to the server.  This is a 
packet that might have a bit field for each button or key. For example 
WASD might take 4 bits, and another few for jump or fire.
So how often do i send these packets? Is it on a timer or do i send it 
as much as the clients presses those buttons?

2.  My biggest concern: What if the client is bogged down to 5 fps, 
meaning in the best case, the server is receiving those inputs every 200 
ms.  Surely the server needs to update the client based on the client's 
own framerate, because if you're moving the player 1 unit per input, the 
player will move a lot slower if it's updating less per unit time.

My initial thought was to send some sort of lastsendtime to scale the 
player's input, but then it seems like you could cheat and just send 
really large values to make it seem like you're running at a low fps.

What all should i be sending to the server, and what actions should the 
server be taking based on those inputs?

I have a simple techdemo/game setup using enet called godmode.  
Everything is pretty much set up except for sending client inputs 
correctly.

http://code.google.com/p/godmode/

Thanks


More information about the ENet-discuss mailing list