🎉 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!

Does online idle game support multiplay out there are using udp or tcp?

Started by
2 comments, last by resminar 4 years, 4 months ago

I have read many article about multiplay game, they alway said that using udp for something like movement, but what about in online idle game, does client,server always send player position,skill,… every movement through udp?

Advertisement

I don't understand what you mean by “online idle game”?

Do you mean games like “Farmville” and “Backyard Monsters” where the main game mechanic is “waiting for things to build/complete”?

If so, most of those games probably use HTTP, and just poll the state every once in a while. Maybe they use a websocket when the player is online, to be able to get faster notifications if something new happens. Most of those games have a very easy time predicting when the next thing will happen – they know that the player started the action at time X, and that the action takes Y time to complete, so they will simply show a progress bar that shows how much time is left until X+Y. You don't even need to check with the server when you do that.

In general, games that use UDP for movement, are games that have interactive, fast-paced, movement, where milliseconds matter. Those games download player parameters when you join a map, and then just get updates (delta) from the server when things change. Because UDP is lossy, games typically build some system where they send notifications (events) in each outgoing UDP packet, until a packet that contains those notifications/events is acknowledged from the other side.

enum Bool { True, False, FileNotFound };

hplus0603 said:

I don't understand what you mean by “online idle game”?

Do you mean games like “Farmville” and “Backyard Monsters” where the main game mechanic is “waiting for things to build/complete”?

If so, most of those games probably use HTTP, and just poll the state every once in a while. Maybe they use a websocket when the player is online, to be able to get faster notifications if something new happens. Most of those games have a very easy time predicting when the next thing will happen – they know that the player started the action at time X, and that the action takes Y time to complete, so they will simply show a progress bar that shows how much time is left until X+Y. You don't even need to check with the server when you do that.

In general, games that use UDP for movement, are games that have interactive, fast-paced, movement, where milliseconds matter. Those games download player parameters when you join a map, and then just get updates (delta) from the server when things change. Because UDP is lossy, games typically build some system where they send notifications (events) in each outgoing UDP packet, until a packet that contains those notifications/events is acknowledged from the other side.

Thank you for your information, It look like that above game was single play only, I mean that game type contain a lot of player in a map and the game character automatic play just like some android game: Idle poring, holy hunter

Something like this, a group of player party in field map:

This topic is closed to new replies.

Advertisement