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.

Work in Progress / Fractal Terrain DLL

Author
Message
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 9th Mar 2007 22:33 Edited at: 10th Mar 2007 13:40
This is primarily a small project to help me get accustomed to basic c++ before i move onto more complex bits of it. Mnemonix is helping me convert my code to a usable DLL.

this is a DLL that generates fractal heightmaps using the "plasma" or "diamond-square" algorithm. needs to be placed in the compiler/plugins-user folder.

commands so far:
ft generate heightmap a,b,c,d,size
-> a,b,c and d are the height values of the 4 corners, which are used to generate the rest of the terrain
-> size must be a base 2 number, ie ...64,128,256...

ft get height(x,y)
-> returns height value at co-ordinates of the map.

ft set seed(float)
-> sets the initial variation limit between the max and min height values of the terrain. It is recommended that the value is approximately double that of the average height value of the 4 corners.

ft set fallout(float)
-> sets the rate at which the seed value is decreased per pass. recommend 0.3 to 0.5. anything over 1 will generate craaaazy results.

example code:


Next up will be a commands to set the spikiness of the terrain, otherwise known as the "h-constant", and also a smooth terrain function.

updates:
march 10th: added FT to start of each command to save confusion. Added commands "set fallout" and "set seed". Mnemonix fixed a potential memory leak issue.

http://notmybase.com
All my base are not belong to anyone.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Mar 2007 06:13
Very cool.


Good work.


Cheers,

-db


Enter my forums here.
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 10th Mar 2007 16:55
t`is very awesome. I poured my own leetness into this too, SO DOWNLOAD IT AND TRY IT

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 10th Mar 2007 17:39
Fractal terrain are multiple terrain parts aren't they?

If so,i can use this

El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 10th Mar 2007 21:35
Quote: "Fractal terrain are multiple terrain parts aren't they?"


are they?

http://notmybase.com
All my base are not belong to anyone.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 10th Mar 2007 21:40
Im not english,so i do not know the exact meaning of every word.

Sorry if its very obvious though.

El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 11th Mar 2007 22:26 Edited at: 12th Mar 2007 11:16
oh i see, well, for a tutorial on what fractal terrains really are:

http://www.gameprogrammer.com/fractal.html

ps: on the contrary, it isnt very obivous ^_^

http://notmybase.com
All my base are not belong to anyone.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 14th Mar 2007 09:23
@ El Gorf,

Excellent plugin - plans for additions?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 14th Mar 2007 19:28
yep, im just waiting for a moment when both mnemonix and I are free. you havent seen a sliver of what this plugin's gonna be capable of yet.

I still have lots to do such as support for multiple terrains, smoothing terrains, setting heights manually, making a repeating terrain, texture generation etc...

mnemonix is even urging me to go for generating the actual 3d model than have the coder do it all in dbp.

http://notmybase.com
All my base are not belong to anyone.
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 14th Mar 2007 19:39
El Goorf - This is a really cool tool. I used a variation of the diamond-sqaure algo in my terrain generation program. I am also working on programatic texturing, and I would be interested in sharing some thoughts on this matter.

I don't have a WIP for the project yet, but I will soon. Here is a url of my progress:

http://www.fantasymultimedia.com

Quit planning to make a game and make a game.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 14th Mar 2007 20:38
@ El Goorf,

Are we looking at some serious enhancement to Advanced Terrains? Perhaps a way of generating various levels of landscape ie. distant/map, closer, actual? larger areas?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Mar 2007 10:48
@ El Goorf - howzit going with this top dll?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 21st Mar 2007 22:46
gah! im so sorrrrrrrrrrrryyyyyyyyyyyy but i have like 50 million things to do

i'd almost forgotten about this tbh.

but never fear. it will be done!!!!!!!!

http://notmybase.com
All my base are not belong to anyone.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 24th Mar 2007 12:11 Edited at: 24th Mar 2007 12:12
@El Goorf,

Not much really, but created an .ini for for this DLL for the Editor\Keywords subfolder - saves you the effort

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 25th Mar 2007 19:17
wow thank you ^_^

http://notmybase.com
All my base are not belong to anyone.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Jun 2007 09:23
Has this been finished, or is it still being worked on?


Cheers,

-naota

El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 13th Sep 2007 17:23
hah crap.. i completely forgot about this. i stopped coding at the start of the summer holidays you see...

http://notmybase.com
All my base are not belong to anyone.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Sep 2007 08:22
Well if you won't continue working on it, will you release the source? (So others can continue the work)


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 24th Sep 2007 06:27
nope, sorry the source is on my pc at home, im at uni with my laptop. next time im home, if i rememer, i'll upload

http://notmybase.com
All my base are not belong to anyone.
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 24th Sep 2007 11:17 Edited at: 24th Sep 2007 12:24
Its awesome, for what this comment is worth
EDIT: I have your method in my tutorial
http://forum.thegamecreators.com/?m=forum_view&t=114275&b=7&p=0

El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 14th Nov 2007 14:31
awesome, glad to see a plugin i totally forgot i made is in a tutorial. im going home this weekend, ill set a reminder to grab the plugin code while im there

http://notmybase.com
All my base are not belong to anyone.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 18th Nov 2007 01:53 Edited at: 18th Nov 2007 01:54
For what it's worth, I had some spare time and made some help files in FrontPage. Just extract the contents of the ZIP into the "Dark Basic Professional/Help" folder. If you replace the existing "commands.htm" with the new one you can access the help files from the commands menu inside DarkBASIC.
Quote: " saves you the effort "


And I completely forgot to mention how nifty this is. It's like the randomize matrix command, except much, much more realistic .


"Fire is always at the top of the food chain, and it has a big appetite."

Attachments

Login to view attachments
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 18th Nov 2007 13:08
right, i just remembered at the last minute before leaving for manchester again, here it is:

http://notmybase.com
All my base are not belong to anyone.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-27 20:46:01
Your offset time is: 2024-11-27 20:46:01