Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, 7th_zorro, alibaba), 913 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
maximum coordinate distance from center origin #350869
12/19/10 21:00
12/19/10 21:00
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
It seems that there is a hard maximum limit that a coordinate like camera position can be set. When i hit about +2097000 on an axis I get wrapped around to -2097000 ...then you cant go beyond that...

What is this behavior for? I think the user should be able to exceed this limit, even though there might be a floating point precision problem.

I am hitting this limit with my planet renderer and it is very annoying..I suppose there is a work around possible; just set the camera to be always at the origin and offset everything else.


Sphere Engine--the premier A6 graphics plugin.
Re: maximum coordinate distance from center origin [Re: Matt_Aufderheide] #350870
12/19/10 21:08
12/19/10 21:08
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
It could be the range of var, which I think is fixed point... And then, this behaviour is common. It is the same with char and int.

Re: maximum coordinate distance from center origin [Re: Slin] #350892
12/20/10 02:45
12/20/10 02:45
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
Yeah but the limit of var is something like 999999.999 +-

So why can it go higher?


Sphere Engine--the premier A6 graphics plugin.
Re: maximum coordinate distance from center origin [Re: Matt_Aufderheide] #350899
12/20/10 04:17
12/20/10 04:17
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
I had the same problem with my RPG and had to set up 3 different levels for it just because of that...I don't remember the exact range but it was similar.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: maximum coordinate distance from center origin [Re: Nowherebrain] #350919
12/20/10 10:53
12/20/10 10:53
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
var limit is 2^21 = 2097152. 1 bit sign, 21 bits for integer part, 10 bits for fractional part.

i don't know why the manual says 999999.999. there was some reason about it but i don't remember.

Re: maximum coordinate distance from center origin [Re: ventilator] #350920
12/20/10 11:13
12/20/10 11:13
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
oh ok that makes sense..

it would be nice if you could define position as a double.


Sphere Engine--the premier A6 graphics plugin.
Re: maximum coordinate distance from center origin [Re: Matt_Aufderheide] #350923
12/20/10 11:20
12/20/10 11:20
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
Originally Posted By: ventilator
i don't know why the manual says 999999.999. there was some reason about it but i don't remember.

Because it's "easier to memorize" - according to a footnote on this page: http://www.conitec.net/beta/aarray.htm.
I guess it was basically intended for beginners.

Re: maximum coordinate distance from center origin [Re: Matt_Aufderheide] #350977
12/20/10 18:28
12/20/10 18:28
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
especialy for newer games, I myself generate most things on the fly from text files and loading zones defined by a multidimensional array...I don't see why it is not a double...even if it were 9999999.999+- that would be better...


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1