how to build and store an unlimited map

Started by
8 comments, last by hkgeorge 20 years, 11 months ago
Hi everyone, would any one tell me how to build and store an unlimited map. I don''t mean those repeatable map. Thank you very much.
Advertisement
Try messing around with the infinity keyword.
1) Find out what you need to learn in order to do something.
2) Learn it.
3) Do it.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
You can''t store something that is unlimited as you''d need unlimited storage space. Perhaps you want to look into procedurally-generated terrain.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
Think he means linked lists. Or vectors.

.lick
void LoadMap(){    int i;    for(i=0;i<(INFINITE+1);i++)    {         //Post on gamedev and find out why         //this function hangs. Personally I think         //it''s a bug in W1nD0z3. Bill Gates is teh SUXX0RZ!    }    return;} 


Seriously though, you would have to generate the map randomly wouldn''t you?
Even something the size of a large planet is not "unlimited".

Kylotan had it right, I would think. The closest you''re going to get to unlimited is procedural.

But if I were you, I would just go for a system that would dynamically load in nodes or sections, blocks at a time. And make the world wrap-around.

One of my future goals is to make an RTS that uses a 3D globe for the terrain. Better try and make a simple 2D map first though, huh?

Take care.

Florida, USA
RTS Engine in Development
http://www.knology.net/~heaven/rts.htm
Jesus is LORD!
Florida, USA
Current Project
Jesus is LORD!
poke around flipcode, there''s an article there on algorithms for infinite spaces

George D. Filiotis

I am a signature virus. Please add me to your signature so that I may multiply.
Geordi
George D. Filiotis
You''re going to have to cut the map into sections and load/unload the sections as your player moves (or your mouse scrolls) around. I would suggest...

0 0 0
0 1 0
0 0 0

break up the sections and always load up 9 sections around your character (noted as 1 above)

Of course....Size limit = harddrive size
Last Half of Darkness Developerhttp://www.lasthalfofdarkness.com
There''s a way to generate un unlimited map.

Just generate it on the fly with a random seed, as long as you keep the same random seed you will be able to re-generate the same map again and again. Use that with the X.Y position added to the random seed and you can generate multiple map that can be linked easily ...

The bad part about that is the erratic map you will probably have..


Feel free to tell me if i''m wrong about, and WHY !
And please forget my bad english

This topic is closed to new replies.

Advertisement