4 Replies - 739 Views - Last Post: 23 June 2014 - 12:44 PM Rate Topic: -----

#1 PocketCrafter7  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-June 14

Multiple Areas in MMORPG

Posted 22 June 2014 - 04:06 AM

This is kinda tough to explain. So, I will try my best.

A world has many areas like towns, villages, dungeons, grasslands and many other areas. If the player is in a dungeon, he doesn't need to update the entities of the town. I mean there is no point in doing so. The player only needs to update the entities of the areas in which he is. How would I do this ?

This is something I thought:
The server stores the player's in an ArrayList. So, I was thinking of making an ArrayList for all the areas and then players of the same area will share their data.

How would you guys go about doing this ?

Is This A Good Question/Topic? 0
  • +

Replies To: Multiple Areas in MMORPG

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8947
  • View blog
  • Posts: 33,544
  • Joined: 12-June 08

Re: Multiple Areas in MMORPG

Posted 22 June 2014 - 01:00 PM

Quote

If the player is in a dungeon, he doesn't need to update the entities of the town. I mean there is no point in doing so.

A few things.

- what are the town folk doing? Actions? Etc.
- dungeons - are they in instances or persistent across everyone?
- grasslands - random encounter instances, or persistent across ever user?

It's an MMO, right? Why wouldn't the rest of the game update when one player is not there? There would be multiple players in the game, so wouldn't they care to know the rest of the world is updating?

Updating actions doesn't mean rendering to a screen. The server can still track NPC actions without having to actually have them displayed.



Quote

The server stores the player's in an ArrayList. So, I was thinking of making an ArrayList for all the areas and then players of the same area will share their data.


Seems like a bad setup. You would need to think of this in a more OOP fashion.

The game world has a collection of objects for your 'areas'.
Areas have a collection of stats/objects in said areas. Time, NPCs, monsters, instances, etc.

When the game world time ticks it would call the 'update'.. which would then call the 'update' in each area object. Inside of each area object the update method would call update for all the objects/npcs/time/etc.
Was This Post Helpful? 0
  • +
  • -

#3 PocketCrafter7  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-June 14

Re: Multiple Areas in MMORPG

Posted 22 June 2014 - 02:58 PM

Quote

It's an MMO, right? Why wouldn't the rest of the game update when one player is not there? There would be multiple players in the game, so wouldn't they care to know the rest of the world is updating?


What I meant by this is that suppose I am in a dungeon. Then if I go to a city, I will get the latest data. There is no point in wasting the bandwidth on updating the things, you can't even see.

The server will update everything. But the client will only update stuff it needs to.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8947
  • View blog
  • Posts: 33,544
  • Joined: 12-June 08

Re: Multiple Areas in MMORPG

Posted 22 June 2014 - 03:15 PM

Well, yeah. That is typically how client/server games operate.
Was This Post Helpful? 0
  • +
  • -

#5 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 560
  • View blog
  • Posts: 1,263
  • Joined: 24-April 12

Re: Multiple Areas in MMORPG

Posted 23 June 2014 - 12:44 PM

If it's client/server, you obviously don't want to send anything over the wire that won't be used. And you probably don't want to send anything that will probably not be used in a timely fashion until you have to.

But for client/server, you want the client to mostly just be a display, like a web browser. Most MMORPGs seem to have all the graphics files pre-loaded on the client machine. So, you never transmit graphics or things that can be seen. You're just passing over various states and data about the things the player will likely interact with.

And you probably almost want no game logic in the client. That's just begging for hackers to hack the game. You have no control over it on the client, but you have complete control over it in a well designed server. It's impossible to get data from the server that you don't expose. For an extreme example, just pull the network cable out of the back of the server and then let's see someone hack it. But just a good firewall, proper security including OS patching, good programming practices, and control of the ports should make it an all but inpenatrable fortress.

Anyway, I'm thinking you shouldn't be sending any data other than exactly what the client needs to draw the current scene unless there's a very specific reason for it.

So, you definately don't want to be sending data about other zones that the player can't even interact with until they travel there.

The way I imagine an MMORPG is mostly the client sending requests to the server about how it wants to interact with the game world (ie. move forward at 30 degrees, cast a spell, look at inventory, send a chat message to another player, etc.) I imagine everything else happening server side. Then I imagine the server sending just enough data about how to draw the current scene (ie. new camera/player position after the move forward, what can be seen from the effects of the spell, chat message from another player, etc.)

So, I don't know if you want to even send over data for the entire zone unless its a small zone.

Most of the CPU, and especially GPU, intensive work in 3D MMORPGs is in the drawing to the screen. There's really no reason not to preload all that on the client so that the client takes the task of actually drawing the scene and the server merely sends data about the state of the scene.

Anyway, that's what I've noticed. When they do a game update they download all the new graphics and art files to the client and it takes like half an hour to boot up. Once they're on your computer though, the game runs fast.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1