Coordinates in online games (big landscapes)

Started by
20 comments, last by Kylotan 16 years, 1 month ago
I'm interested what coordinate systems are used in modern online games (WoW, LineAge2, SecondLife etc). I'm not interested in how objects are processed... I want to understand what technique those games use: 1. A big world where every position is a float vector. But if the object has coords like (50000, 50000) I lose accuracy (objects begin to jump). 2. A big world with the fixed point (4-byte integer), where I have an accuracy 1mm. 3. A big world where everything is splitted by locations. I don't get it: a. Maybe the server sends all the bounding locations and their coords, and then every position looks like (unsigned short location, float x, float y, float z), where x, y, z is in "location's" space. b. Or maybe server transform every position to every client to it's location frame... So I need your help - what techniques are being used in online games, and I need to now which one uses what (like "Wow uses the following technique") - because I listed the techniques I know...
VATCHENKO.COM
Advertisement
I don't know what techniques those games use - I assume method 3 or something similar - but perhaps the following article will give you some ideas: The Continuous World of Dungeon Siege.
Create-ivity - a game development blog Mouseover for more information.
Well in the case of wow your position should be in the houndreds at most, everything is split into preloaded zones.

Beyond that, i got no help to offer.
Dungeon Siege is not a MMOG, so I think it uses the different techniques.
VATCHENKO.COM
Its not an MMOPG but it was one of the first games to have a large seamless world. You can move from the starting area to the end without a single loading screen, therefore they had a big problem of accuracy. I suggest you read the article, it's probably the best ive read with regards to your problem.
Your 2. and 3. are both viable solutions. The sector approach does however have a couple of disadvantages though:

- by definition of course it means having to divide your world up somehow into arbitrary zones
- depending on how you do this, some operations become more difficult, for example calculating the distance between objects in different sectors, adding offsets onto positions that move to another sector, and so on

I like the simplicity and predictability of using fixed point integers. Tom Forsyth discusses this in his blog too.
And if third one, then 3A or 3B?
VATCHENKO.COM
Well the sector approach is a pretty common one since you usually have some kind of spatial hierarchy so it seems logical to use the same thing for positioning. As Tom mentions in his blog it causes problems with long distances, instead of just having a single number with precision errors you have multiple numbers with the same errors multiplied together and the end result is cumulative error, it gets bad.

We have an octree like system for world sectors to simplify loading parts of the world as the player moves. Since it already exists my friend wanted to use it for world positioning (rendering/physics/ai/etc use their own hierarchies anyways, I don't like scene graphs). The way I see it is to use fixed precision for world positions and convert to relative (camera/area) for rendering/audio/physics as needed. With 0.1mm precision it's still far more than we're ever going to need (~3.4e+24km^2).
----There he goes. One of God's own prototypes. Some kind of high powered mutantnever even considered for mass production. Too weird to live, and too rare to die.
You don't mention using double precision floats... what hardware are you targetting?
Double precission = double headache. What means targetting? I'm asking about popular games like WoW, LineAge...
VATCHENKO.COM

This topic is closed to new replies.

Advertisement