Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 902 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
maximum map size (x,y,z values) #378064
07/19/11 15:02
07/19/11 15:02
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I have been experimenting a little with an idea I had but I would like to know the limits of the engine to implement it.

What I am doing is not loading any level. I just load a null one and randomly generate the surroundings of the player. as the player moves I remove the parts of the world he has left behind and randomly generate his new surroundings as he advances.

Initially this idea was only aimed at solving the problem of having a huge world that could not be loaded all at one time, but avoiding annoying load screens. Afterwards I added something else to that mix: randomly generated worlds.

Seeing how these two ideas worked so well together I realized the potencial behind this combination and the natural evolution of this seemed obvious to me: infinite worlds!

Memory is not an issue since I remove all the entities that are not within a certain range of the player when he moves.
The next problem I thought about was disk space, But with today's disk sizes and the little information I have to store it will take very long to become a real problem.

Then another problem came to my mind... The maximum size of the variable used for the engine's coordinate system.
So my question to you 3DGS gurus out there is: What is the limit of the coordinate system? (maximum value for x,y,z coordinates of an entity)


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: maximum map size (x,y,z values) [Re: Carlos3DGS] #378065
07/19/11 15:16
07/19/11 15:16
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
The coordinates are vars which range between ca. -1000000 to +1000000. In Lite-C it's seems to be rather -2000000 to +2000000, but apperently only 1 million is officially supported.

http://manual.conitec.net/aarray.htm

Re: maximum map size (x,y,z values) [Re: Lukas] #378070
07/19/11 15:43
07/19/11 15:43
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
OUCH! Well that is going to be a problem...
http://manual.conitec.net/aentity-x.htm

The first idea that comes to mind to solve that is having a second vector that represents sub-areas.

So when the player x exceeds 1000000 (of area 0,0,0) he is considered to be in the next area and x will be -1000000 (in area 1,0,0)

Not too sure, I'll have to think about it and see if I end up using a method like this, or come up with a better solution, or trash the infinite world idea if it is too problematic.
Any ideas are welcome!


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: maximum map size (x,y,z values) [Re: Carlos3DGS] #378072
07/19/11 15:55
07/19/11 15:55
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
For stuff like that you should use local coordinates (e.g. a camera-bound triad) and move the stuff around the camera, not vice versa as is usually done.

Re: maximum map size (x,y,z values) [Re: Joey] #378076
07/19/11 16:26
07/19/11 16:26
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I considered that aproach but it creates a new problem when i store the map entities' positions in the database (save game)...
What coordinate do I give them with your aproach?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: maximum map size (x,y,z values) [Re: Carlos3DGS] #378086
07/19/11 18:41
07/19/11 18:41
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
store them as double valued positions. you're of course keeping track of the camera's "real" position as a double vector, or, if you're really serious about it, a fixed point 64 bit variable - though, depending on the effort you want to undertake, there'll always be some kind of limit.

Re: maximum map size (x,y,z values) [Re: Joey] #378118
07/19/11 21:48
07/19/11 21:48
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
scale everthing down by 10% or 100, though may decrease precision of positions

Re: maximum map size (x,y,z values) [Re: MrGuest] #378121
07/19/11 22:04
07/19/11 22:04
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Storage space is not a problem, since we can always make a bigger hard-drive. Your biggest road-block when dealing with "infinite" worlds is the CPU itself, since you will get overflow errors when dealing with exceptionally large amounts of data. It will be up to you to devise a dynamic system that can slice up this data into consumable pieces for the CPU.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: maximum map size (x,y,z values) [Re: Redeemer] #378286
07/21/11 21:39
07/21/11 21:39
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
the world itself will be on the hard drive in a database. The only loaded parts are the surroundings of the player so cpu should not be an issue


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1

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