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 Discussion / randomize matrix?

Author
Message
koolaid
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 1st Mar 2003 09:10
okay i know about the randomize matrix command but can i just have it randomize it one time every time i run the program it randomizes it again in a different way i dont want to manually fix the height of the matrix i want it to do it once and keep it like it is.is there a way to somehow randomize it but then stop it from doing it every time i run it.
darkCorridor
22
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 1st Mar 2003 12:00
height map?

[br]mikey
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 1st Mar 2003 15:44
Uhm do a randomize matrix, use get matrix height(x,y) to get the height of the matrix at a huge lot of places, put the data in an array and save the array. Then load the data and use for...next to set the height.

Whatever I did I didn't do it!
koolaid
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 1st Mar 2003 21:15
thanks alot but exactly how would you do that im still am kind of new to all this
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 1st Mar 2003 22:37
In the code snippets section there's a function for using a bitmap to set matrix heights. You could fill a bitmap with random colours and then use it as a heightmap.

Once I was but the learner,
now, I am the Master.
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 1st Mar 2003 22:38
Oh yeah, it's my function, I forgot to mention that.

Once I was but the learner,
now, I am the Master.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 6th Mar 2003 02:43
use this:



then do a reader for it

xxxpetratxxx
B. R. W
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 6th Mar 2003 02:51
Ive got the answer guys:

This reads the data:


And this writes it:


xxxpetratxxx
B. R. W

Login to post a reply

Server time is: 2025-08-08 20:40:18
Your offset time is: 2025-08-08 20:40:18