Borders

I originally wanted the game to have no borders, and an unlimited area to explore, but for technical reasons (floating point precision), I now limited it to an area of about 120 square kilometers (or 75 square miles). The border looks like this:

It is a bit abrupt, but the only way to keep the player from climbing over it. I think 120 kmē is still enough to play the game and have fun.

four comments, already:

Is it not possible to subdivide the map in areas, each with their own coordinates?
Lenx - 03 09 16 - 09:25

Yes, that would be possible, but I figured it would not worth the efford, since 120 km² probably is still enough.
niko - 03 09 16 - 09:41

yeees – the floating point problem.
Making the map bigger or even unlimited is quite an undertaking, but at least there is a “small” trick to keep the precision around the player – keep the camera at the center and shift everything around it. I am just trying to achive this with Irrlicht. There are two ways: shift the ‘root scene node’ (which in Irrlicht CAN be moved (in contrast to many other engines)) or create a special node which serves as the new ‘root scene node’ and which “counteracts” the camera movement. The camera of course has to be treated separatedly and i have not figured out how to do that. The engine ‘Ogre’ has a special flag for this feature.
AReichl () - 05 09 16 - 08:24

If you did it like Dungeon Siege you trade the precision problem for a whole bunch of new problems… :-)

Of course you could like use unsigned integer base coordinates (and anchor the various patches of landscape to some integer coordinate) and just wrap around the world when the unsigned integer wraps. If you would just use 16 bit coordinates and make the unit 1m that still gives you a (repeating) world of some 4000km², but then you can sure scale up – just walking 4 million km in a straight line at a rather quick 10 km/h provides for 45 years of exciting gameplay. ;-)
xaos - 06 09 16 - 13:04


Name:  
Remember personal info?
yes
no
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.