🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Quick question

Started by
0 comments, last by DarkMage139 23 years, 3 months ago
OK, I was just working on my game, and I suddenly started wondering about something. I have an input "handler". When the user hits the keyboard or uses the mouse, should I send the message to the client, the server, or something else? Thanks.
- DarkMage139
Advertisement
Presumably, the user *is* the client - so you don''t need to send the client a message.

Whether you send the server a message for every keystroke or not depends on your protocol. Usually the client sends a message to the server everytime a significant event occurs. The client also usually sends it''s idea of it''s position on a regular basis (piggybacked on a ''significant event'' message if possible).

A significant event would be something like "attack on" or "use skill" or "send tell to player X". It may or may not be something like "turn left".

-Mike
-Mike

This topic is closed to new replies.

Advertisement