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 / Random planes (one solution)

Author
Message
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 2nd Dec 2003 21:44
For the life of me, I can not find the original thread. [Yes, I used the search button.] But, enough of that.

Someone asked if there was a random plain command. Their goal was to create an endless rocky tunnel. The answer was no, but I suggested that you make random planes by creating a mesh inside of a memblock and then creating an object from it.

At that time, I did not have any code to show off. Attached is a simple program that will demostrate the essentials for making a nigh infinite number of rocky faces. If you hold down the space bar, you'll see that it can pump out a fair amount of random tiles per second. I hope that this is adequate for a streaming tunnel effect.
--
TAZ
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 2nd Dec 2003 21:47 Edited at: 2nd Dec 2003 21:48
One note, I was not clever enough nor did I have the time to calculate normals. If someone else can figure out the math for doing that, then this code might be worthy of the code snippets section.
--
TAZ

Login to post a reply

Server time is: 2026-07-26 20:16:28
Your offset time is: 2026-07-26 20:16:28