Advertisement

Which the best algorithm for a MMORPG?

Started by April 09, 2004 02:03 AM
0 comments, last by Napalm 20 years, 10 months ago
Which the best algorithm for a MMORPG? Would I like to know which the best logic of transfer of data it would be among client/server, in the case of the updatings of the user''s position? Would the customer send a package for the server to each 33 ms? Which would the best logic be finally?
Programming is my life!
MMORPGS for the most part are state machines. The user requests to perform some action and that request is sent to the server. The server validates the request and sends back a response and the client acts on it. Therefore network messages only need to be sent when something happens. Did the user click a door, sit down, cast a spell, start attacking, loot a monster, destroy an item, etc..

Most of these messages will need to be sent to the server with some sort of guaranteed delivery, but they dont have to be. If theyre not and a packet is dropped it just means the user has to repeat the action. Can be annoying for some actions, less for others. It''s prolly something you''ll have to get a feel for and how it affects gameplay.

The exception to this is player movement. Movement is somewhat of a mix of both a state machine and just a timed interval of updates. If the player is standing still you can probablly send updates every second or two just to keep data flowing and can double as a keepalive packet in the case of UDP (which most games use). However, once the player presses forward and starts moving, a packet should be generated reflecting this change and fired off to the server. As long as the user keeps pressing forward you can fall back to the updates happening every 1-2 seconds, but the moment the player changes direction or stops, fire off another update.

With MMORPG''s the amount of users connected is generally quite large, so sending data only when you need to will save bandwith all around. This equates to lower operating costs which is good for your bottom line.


Hope this helps.

-=[ Megahertz ]=-
-=[Megahertz]=-

This topic is closed to new replies.

Advertisement