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.

Code Snippets / [DBP] - Dynamic tree generator

Author
Message
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 23rd Mar 2013 21:26 Edited at: 23rd Mar 2013 21:27
hey all, i found this small tutorial on 3dmax how to create trees using code, so i decided to make something simalar using darkbasic pro..

check this out:



note: it may take some time to load it, it has a lots of calculations on it.

to generate custom trees, here is the function:


tell me what you think




Advanced Updater for your games!

Attachments

Login to view attachments
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 24th Mar 2013 00:50
ok 1 update, so you wont wait that long, and actually see the progress behind the tree generation..



Advanced Updater for your games!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Mar 2013 05:05
I don't know about trees, but they make some cool alien underwater plants

"You're all wrong. You're all idiots." ~Fluffy Rabbit
noobnerd
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 25th Mar 2013 11:18
pretty cool they might need some texture/ leaves to look like trees though
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 26th Mar 2013 19:37
i made it so ppl will get their own ideas of generating stuff like those..
from this idea, you can go over generating random dungeons or whatever...

Advanced Updater for your games!
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 6th Apr 2013 23:00
Hi SergeyK,that must have been the same tutorial i read when i started this wip http://forum.thegamecreators.com/?m=forum_view&t=190210&b=8.The way its got the bends in the branches is identical to how mine started out
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 7th Apr 2013 09:39
yeah.. i guess we did used same tutorial

nice work man on your generator.. looks even far more invested than mine.

Advanced Updater for your games!
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 28th Apr 2013 23:29
@Sergey K

I like the code

out of my own curiosity I change the make

make object cube to
make object cylinder

the look is a bit more different but worth it

the spacing between the objects could be a bit more tighter

I'm looking for that part now

saving the completed tree can be saved that would speed up
loading them into a game level

just some things to think about

the other thought is real time tree growing but I know as
native code that would rile put a strain on the cpu and gpu
and slow things down

even as a dll it would still suck up a lot of time

to move side ways - is to move forward
Since a Strait line gets thin fast
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 29th Apr 2013 01:24
feel free to try anything you want with it
and the grap between the objects is "move object" command search for it.

post your results here and lets see how good it will look

Advanced Updater for your games!

Login to post a reply

Server time is: 2024-04-24 18:57:13
Your offset time is: 2024-04-24 18:57:13