Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Addict

Client movement help

This topic is 5157 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright I have my basis up for my network but I was wondering how I should go about sending client requests to the server. Should I send a packet with thier keyboard state every frame so that the server knows what the client is pressing for that frame, or should I cut it down a bit and send a queue of presses every so often? I know its bad to let the client dictate to the server its position and/or velocity, so what would be the best way to let the server know what a client is requesting? mmm...Coffee. Nectar of the Gods!

Share this post


Link to post
Share on other sites
Advertisement
Me, for exemple, to handle the player movement, I send a packet when the player press a movement key ( for exemple, one of the arrows key ), this packet contains the direction the player is going. Then, only when the player release the arrow key he pressed, I send another packet saying that the player has released the key

Share this post


Link to post
Share on other sites
Are you using TCP to make sure that the server gets these messages?

Since I'm doing UDP I would either need to set up an ack system so that I know that the server recieved the release/press command. It seems to me that it would be more beneficial to send the entire state of the inputs every 20ms to the server...

I can't be sure though and I'd like my design to be complete before I actually implement the final version...I already have a few prototypes that I'm not quite satisfied with

mmm...Coffee.
Nectar of the Gods!

[edited by - Addict on April 9, 2004 12:45:17 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!