Jump to content
  • Advertisement
Sign in to follow this  
landlocked

Distributed MMO Advice

This topic is 2600 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

I'm wondering what an engine would look like that would act like Elder Scrolls IV: Oblivion but on a large scale. What I mean by that is how Oblivion had each NPC having their own routines and schedules but played out in a world with the scale of WoW or Everquest 1/2. The most efficient way I could think of doing this is by sharing the load between the game servers and the end machine client. What I mean by this is have the servers keep chugging away at events not handled by any client and having the client be responsible for handling its player's immediate surroundings. So, let's say my character is in a location. The game client on my machine would be responsible for handling npc AI processes and the server wouldn't have to worry about that section of the pie. Multiple clients with characters in the same area could simply trade game-state data with the server acting more or less performing check-sum validation to make sure things don't get muddled along the way. Once a character leaves a region the server picks up where the client left off. Everything would be kept in check and "kept sane" using state data to begin processes rather than each client and the servers having to keep processing things independently.

In my thinking this could solve several scalability issues while letting MMOs have more processing power being essential a single, albeit massive, distributed processing environment. To get this going the game servers would have be behemoths having to process everything until a critical mass of clients are consistently logged on to take enough load off the servers to be able to either re-purpose them or have them do other things yet-to-be-determined. Is this already an application design pattern seen in MMOs or no? Thoughts?

Share this post


Link to post
Share on other sites
Advertisement
Don't give your client's any responsibility. Just design your system so it can be extrapolated easily. That is if an AI has a routine defined by a state diagram you can extrapolate the state of an NPC to any time in the future.

If an NPC wakes up lets say and goes to the bar you know when the character wakes up and how long (given the pathfinding information) that it takes to get to the bar. You'd insert the NPC along their path (or their whole scheduled path) into a large region like a huge 3D grid. If a player views that region then you'd simply do a quick check to see where the NPC currently is by extrapolating along the schedule:

Bed -> 0 to 10 hours
Traveling To Bar -> 10 - 10.3 hours
Bar -> 10.3 - 23.7 hours
Traveling to Bed -> 23.7 - 24 hours

So a player that intersects the regions between the NPC's home and Bar at time T = 3 would get the response that there is no NPC in the area. However, if they intersected the region at 10.1 the NPC would spawn along their path of travel at time = (10.1 - 10.0) / (10.3 - 10.0) = 0.333 in the range (0, 1). The server would then begin simulating in real-time the NPC. If the player stops the player to communicate it might effect the schedule of the NPC. This could get very complicated.

A really complicated example is to give the AI a goal of "meet friend at the bar" and the AI only runs for real at certain times defined in a priority queue. You'd insert the next action the AI had to perform like "meet friend at bar" that executes a script when the NPC is in the bar. The script might be "If friend is at bar sit and drink for 0.3 hours" and then insert that action into the priority queue so the next decision can be made later. If the friend isn't at the bar it might decide to go to their friend's house to see if he's awake." :unsure: This priority queue based on time and inserting every AI's actions into it seems like a very scalable design. If an NPC is interrupted from an action it might remove its previous action from the priority queue. The whole system (while players aren't around) turns into checking if it's time to execute the action at the front of the priority queue.

Share this post


Link to post
Share on other sites
I second the urge not to give the clients any responsibility, otherwise you open a gaping security / cheating hole. However, it would be reasonable to design things such that AI can be offloaded to a dedicated AI server. That could help with the scaling once the world reaches a certain size.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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