Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Recently I programmed an L-system module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art just for fun and learn more.

Question: How should I approach the process of creating an artistic tree (2d perhaps with fixed camera/perspective) dynamically?

Ideally I would like to start with a plant (only a stem with a leaf) and grow it dynamically using some influence (input/user action) over its structure. These influences may result in different type of branching, curves in branches, its spread, location of fruits, color of flowers, etc. Want it to be really full of life/spirit. :)

Plants vs Zombies: Tree of wisdom It would be great to dynamically grow a similar tree, but with lot more variation and animations happening.

My Background: Programmer, have used few game engines (Ogre3d, cocos2d, unity). Haven't really programmed directly using openGL, trying to fix that :).

I am ready to spend considerable time, Please let me know about the APIs? and how would an expert like you would take on this problem?

Why 2D? I think it's easier to solve the problem only considering 2 dimensions.

Artistic inspirations:

Only the tree, with fruits and leaves, without the shrubs at the bottom

The large tree (visible branches, green leaves, flowers, fruits, etc) on the left, behind monkey.

PixelJunk's Eden (Art style inspiration).

Procedurally Generated Apple Tree using Fractals

Please let me know if it was easy for you to understand the question, I may elaborate further.

I hope a discussion of various approach would be helpful for everyone. You guys are awesome.

share|improve this question
2  
I may not have an answer for you, but I'd definitely like to see where this goes. Awesome concept! –  Bloodyaugust Mar 10 '11 at 5:15
    
Great question, I've been interested in L-Systems for a while but haven't done anything with that interest :) –  Luther Mar 10 '11 at 11:58
    
One more reference art. jinsonathemes.com/demo3/wp-content/uploads/2011/02/… –  lalan Mar 31 '11 at 23:58
    
+1 for mentioning plants vs zombies xD –  Stephen Sep 5 '13 at 20:57
1  
@Stephen just so you know this question is from 2011 and got necro'd to the top by the user asking the question editing out Student/ from Student/Programmer –  PeterT Sep 5 '13 at 21:21
show 1 more comment

3 Answers

Do take a look at ABOP (Algorithmic Beauty of Plants):

http://algorithmicbotany.org/papers/#abop

Its free online now, and has a very in-depth view of L-systems and plants.

share|improve this answer
1  
Yann, thanks for posting this link, it's helpful. –  lalan Mar 10 '11 at 18:26
add comment

Some ideas for your "game":

  • Promt the user for a name for his tree first. Use that name to generate a seed for the algorithm. So every name will have it's unique tree. The seed could also influence the type of foliage and fruit of the tree.
  • You could implement some sort of "tree tamagotchi" where the tree grows bigger and nicer the more the user cares about it (fertilize, water, etc.)
  • Create a highscore list of the highest trees. Another idea would be to show heights and names of other users next to your tree. So you can compare your tree height directly to other users. See this video as an example. The clouds indicate the height other users have accomplished.

There are lots of algorithms and papers for procedural tree generation out there (this thread might be interesting). A difficult task is to nicely blend the branches. 2D is definitely going to be easier in that regard, since you can solve that with alpha-blending.

Since you're experienced with Ogre3D, Unitiy and cocos2d you can go right ahead and implement that thing (no need to start learning OpenGL now IMHO). Personally I'd choose cocos2d and release for iPad and/or iPhone, so that everybody can carry his tree around with his mobile device.

share|improve this answer
1  
I'd by that game just to play with L-Systems in a social/competitive way. –  deft_code Mar 10 '11 at 15:44
    
and thanks for embedding urls. :) –  lalan Mar 10 '11 at 18:34
1  
Thanks for pointing me to gamedev thread.. Nice ideas, tamagotchi and goo-tower.. mobile application would be really cool. found a 3DS Max plugin video -- which is quite awesome link.. –  lalan Mar 10 '11 at 18:42
add comment

Context-Free and it's 3D counterpart StructureSynth could be an excellent basis or inspiration.

Examples:

enter image description here enter image description here enter image description here etc...

These days you could write an online visualiser in WebGL!

share|improve this answer
1  
It's a great project, thanks for sharing it. –  lalan Mar 16 '11 at 2:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.