Borders

Posted on:September 03 2016

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.





Comments:


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


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


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
Quote
2016-09-05 08:24:00


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
Quote
2016-09-06 13:04:00


Add comment:


Posted by:


Enter the missing letter in: "?nternational"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons