Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DB Pro Co-ordinate limit?

Author
Message
Braude Interactive
19
Years of Service
User Offline
Joined: 1st Aug 2006
Location: Sheffield, UK
Posted: 19th Oct 2011 19:05
Hey guys, it's been a while. Believe it or not, I'm using DBPro to make something for an engineering company. Makes a change for me from rubbish FPS games! My question:

Is there a co-ordinate limit in DBPro?

I'm making a program to check building positions, and it's checking drill locations over a very wide area, 79,300 DB units (which are metres in the real world). Now, in a range that's tight to the origin it works fine (10,0,10), but funny things start happening with drill locations at extreme distances (79300,102,77645).

I CAN post my source code if people are interested, but it's pretty confusing without loads of backstory. Basically, I'm just wondering whether anyone else has had strange results at extreme co-ordinates like me.

I can simply change the DB scale, so instead of one unit being one metre I can make it a smaller scale but I'm reluctant to go through and put a scale factor on all the loading in and saving points.
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 19th Oct 2011 19:53
There's no limit that i know of, however you can expect some inaccuracy at very high values. People tend to reset the positions at extreme values by moving the camera, ground, characters, whatever else to zero in a way that the user doesn't realize this ever happened.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Oct 2011 19:59
You have 7 significant digits of accuracy with floats, so at the extreme of 99,999 metres, you have 1 cm accuracy. The nearer to the origin you get, the more decimal places you get.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Oct 2011 02:47
You can use double floats for increased accuracy if that's possible in your implementation. You'll have to be carefull though as commands which take a float will automatically reduce the precision without warning you.

[b]
Braude Interactive
19
Years of Service
User Offline
Joined: 1st Aug 2006
Location: Sheffield, UK
Posted: 20th Oct 2011 12:23
Ah OK, I hadn't realised that was how it worked! I've never really delved into the accuracy side of things with DBPro before, it's quite interesting.

@ Quel: I've worked around it by making the user enter a value for the centre of each smaller worksite, where all the boreholes are clustered around a 100m area. This has solved the problem completely, so thank you. The program then just loads a different list for each worksite, which means everything in the project isn't displayed at once but it doesn't need to be.

Cheers guys!

Login to post a reply

Server time is: 2026-07-10 06:08:09
Your offset time is: 2026-07-10 06:08:09