ID:266010
 
I'm currently working on a project and within said project entering a building requires the player to switch maps. (i.e. all the buildings are displayed by their outsides, to enter you must walk through the door which will cause you to teleport to the "inside" map.)

Will this cause a lot of lag for players in my game other than the one who is switching maps? Will it cause a lot of stress on the server?
No,no. I feel that you need some debriefing.

Lag: delays in information transmission

Why are there delays:

A. Naturally, you get some delay from using a high-level engine in itself.

B. Programming it poorly

So, unless you plan on using ripped/stolen code, or libraries/demos that you yourself have trouble understanding and are not of high quality, you won't have lag.

Remember, there is always more than 1 way to go about doing something. Think outside the box.
In response to OrangeWeapons
Thanks for the info!
In response to St Christophear
All maps are loaded when the world is created.
It's just a matter of changing the player's z location.
(Unless your using something like swapmaps, where your loading maps that aren't already included in the game.)
Still ..you should try to limit the numbers of mob`s witch enter in some maps (buildings) , not because of lag but because it may make them unable to move....
In response to RaZz84
RaZz84 wrote:
Still ..you should try to limit the numbers of mob`s witch enter in some maps (buildings) , not because of lag but because it may make them unable to move....

How so? I have never had this issue.
In response to DivineTraveller
Suppose you have 20 player mobs in a 10x10 room with a small 1 tile corridor .Now suppose some players want to get in while others want to get out ! They may get stuck :D whitch is quite hillarious !
Didn`t mean to say it will be a lag ; only annoyng !
In response to RaZz84
That's more of a design issue on the end of the programmer.
In response to DivineTraveller
Exactly ! But it depends of tastes too..I mean if you have a 5x5 room for shop .....you understand what the problems may be ! A simple search in the room contents and a maximum number allowed in the room can save him form a headache.
In response to RaZz84
Or you can do as divine said and be smart and not have your maps looking like this

00000 0 being walls
0#B#0 # being space
0###0 B being npc
0###0
00#00

and implement a "No density zone" where when you enter said shop you can pass through players ;)



In response to Midgetbuster
Heh...yeah:
"you can pass through players"
In the project i`m working that may lead to .....undesirable effects....on world map...So this may depend from project to project!
Else yeah . Or mybee adding to the same group (eg:weapondealer)

But we`re off topic now...

Guess it can cause some lag if , for example , you decide to use a for-loop to populate the new map - case in witch it`s better to use a if-count to progressively replace the map....
In response to RaZz84
In cases such as this, it may be more desirable to look up the mob.group variable, and set it upon entry of such buildings.