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 / Mining Game Map Generator

Author
Message
Purplepickle
15
Years of Service
User Offline
Joined: 4th Jun 2011
Location: Between hopeless and needs improvement..
Posted: 13th Sep 2011 01:16
How would I make a large number set which I could use for the DATA command to generate a map?

Wait, what?
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 13th Sep 2011 03:33
Perhaps a multidimensional array would be best.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Purplepickle
15
Years of Service
User Offline
Joined: 4th Jun 2011
Location: Between hopeless and needs improvement..
Posted: 13th Sep 2011 22:25 Edited at: 13th Sep 2011 23:40
2d btw. Would I really have to do

For a large data set about 1000 to 2000 tiles large.

Wait, what?
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 14th Sep 2011 12:14
Good grief no! You put one rnd in a set of nested loops, and fill your array from there.

Purplepickle
15
Years of Service
User Offline
Joined: 4th Jun 2011
Location: Between hopeless and needs improvement..
Posted: 14th Sep 2011 23:05
So using a for loop?



Wait, what?
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 14th Sep 2011 23:14
As CumQuaT said, a multi-dimensional array might be good.

Lets say you just want 2000 random values...



Or, if you are making a map, like with x and y coordinates in a grid of 100 tiles wide by 100 tiles deep...



darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 16th Sep 2011 08:42
Hi Purplepickle,

Here is a random map generator example. I commented the code so you can understand it. Don't use data use something like this random map generator code.



darkvee

Login to post a reply

Server time is: 2026-07-10 17:19:04
Your offset time is: 2026-07-10 17:19:04