Jump to content
  • Advertisement
Sign in to follow this  
Anton Vatchenko

Coordinates in online games (big landscapes)

This topic is 3865 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 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...

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!