davist1025 / WorldOfWarcraft2D

0 stars 0 forks source link

Determine zoning on the realmserver #2

Open davist1025 opened 1 week ago

davist1025 commented 1 week ago

There's some thought to this:

A "zone" is given a unique ID (i.e dun_morogh), and each zone contains different map files, which are each tied to a zone id. Since the player can't see in a 3-dimensional sense, keeping different sections of the zone separate and loaded on-demand is ok.

Since each map will exist at coordinates 0,0 and be a certain width and height, the server will have an easier time determining data per-map basis and the client will be less intensive.

A drawback to this method is that the server must allow the client to transition to the neighboring map(s) on/after any edge tile on the previous map to make this feel "open world." This means each map and corresponding surrounding map must contain transition objects for each and every edge tile.

davist1025 commented 1 week ago

A drawback to this method is that the server must allow the client to transition to the neighboring map(s) on/after any edge tile on the previous map to make this feel "open world." This means each map and corresponding surrounding map must contain transition objects for each and every edge tile.

Instead: the server could simply check the player's position against the boundaries of the map they're in. Say a player is at 25x25 and this is the very bottom-right hand corner of the map. If they move against the right edge of this tile, the server will transport them to the tile position equivalent on the next map. The only current issue with this 2nd method is that there's no way of knowing which map is directly beyond the previous one.