Sunday, August 19, 2007

Tree scribble



I've been filling notebooks with extensive sketches of worlds built out of a single homegrown tree. Houses, monuments, clouds, vines and more, drooping, draping and bursting forth in a blossom of growth.

Last night I had a chance to jot down some of the graphics in Painter. My few hours of effort resulted in a basic tree trunk, some foliage and a little girl. Overall, I suspect this would be a pretty easy game concept to get up and running.

Further implementation thoughts
Harold stopped by last week and we brainstormed a little on the Tree Story idea.
  • Collision detection: The foliage uses 1/2 circles as a the collision detection zone instead of the typical rectangles you find in most platform games. This should give the worlds a bit more of an organic feel and results in some simple controls. For folks that have been playing with the Space Cute graphics, you may be able to reuse your existing collision detection systems.
  • Bundling to create platforms: By overlapping a few simple foliage brushes, you can create interesting and realistic trees.
  • Blurry parallax layer for depth: You can create a feeling of depth by putting blurred foliage on a parallax layer behind the main action. Scroll this layer at a slower pace than the main layer that the player is on and it will seem like the scene has perspective.
If anyone is interested in playing with some of the graphics, let me know and I can upload a few in a more reasonable form. Before implementing images, I'd recommend first creating two simple prototypes:
  • Movement prototype with primitive half circles for terrain and a blob for the player to test out movement and the 'fun factor' of the design.
  • Tree prototype: Use long rectangles and half circles to see if you can auto-generate interesting trees.
Hope you are well on this rainy Seattle sunday afternoon. :-) I think it is time for a bit of tea.

take care
Danc.

25 comments:

  1. That makes me think of Larry Niven's The Integral Trees - it probably would make a good setting for a game (well, they already stole the idea from Ringworld!)

    ReplyDelete
  2. This is great. I was playing with an idea for a plant-growth-based gameplay, although I'm still working on the goals that would be sought.

    ReplyDelete
  3. Danc - Good job, the tree has been well designed

    ReplyDelete
  4. one of my favorite programming books of all time i stumbled upon when i was a teen. it's called "the algorithmic beauty of plants" and it looks like its still in print ( searching for it also brought up several neat looking related sites ) -- at any rate: it has *lots* of workable methods for generating plants and trees.

    your idea sounds really neat by the way -- can't wait to see more of it.

    ReplyDelete
  5. sorry to post here but I would like to talk about some new developments that I think you may be interested in writing about.

    ReplyDelete
  6. Sigh, I wish i got the time to make a prototype out of this. Anyway here are some collision detection codes for a point and a circular sector, that I written during breakfast. Hope it will be of help.

    ReplyDelete
  7. Hey I tried e-mailing you but it bounced.

    I wanted to ask a question regarding assets similar to these:

    http://lostgarden.com/2006/07/more-free-game-graphics.html

    What kind of editing software would I need to compile digitally painted cel art into a map for a Flash-based client game? I may the interior tile set for the prototype, btw.

    ReplyDelete
  8. I'm trying to be able to build levels for a multi-player game I'm developing called Loot. Currently we're using Tile Studio, (http://tilestudio.sourceforge.net/) but I want to be able to have objects layered on top of tiles and do shadowing and so forth, such as in the prototype referred to in your post, but perhaps a bit more technically modern. My concern is finding a tool we can use that achieves these needs, to save development time otherwise spent on a custom editor.

    We will of course be using PNG format.

    ReplyDelete
  9. Hi Danc,

    I think I might be interested in playing with your tree graphics -- particularly the trunks and the foliage. The little girl is of course adorable. :)

    Are you interested in seeing a version with programmer art before you post the real stuff? If so, I think that would be fair motivation. :)

    --clint

    ReplyDelete
  10. Hi Clint!: Definitely post up the programmer art version! Those are great. I'll turn the art into something more consumable later this week for you. :-)

    Patrick: I'm not aware of such a tool that is focused specifically on tiles. There are a number of RPG editors about that are targeted at creating multi-layer tile graphics, but I'm not sure how friendly they are to folks who want to use their data in a custom engine.

    Danc.

    ReplyDelete
  11. Hi Danc,

    Okay, so I spent a couple of hours last night playing with the mounting capabilities of Torque, and came up with a cheesy 2d tree grower complete with nasty programmer art. :)

    Here's the download link, including source as well as Mac/Windows builds:
    MiracleGrow_2007_08_28.zip

    Click on the leaves to sprout from that node, and it will recursively grow down from there to make the lower trunks grow as well. It's not quite as extreme as the Totoro video, but I tried to go for a similar growing effect.

    I put in a dynamic camera that I hacked in from one of my other projects -- it has some glitches, but it was really added like in the last 5 or 10 minutes of slapping this together.

    Here are a few screenshots showing the diversity of trees that can be created:
    MiracleGrow1.png
    MiracleGrow2.png
    MiracleGrow3.png
    MiracleGrow4.png
    MiracleGrow5.png

    It was fun to create the base code to get a tree to recursively grow like that (and Torque is nice and it didn't take too much effort to do that), but the thing that I ran up against was that it was really hard to get the right balance of growth-down-the-line as well as how long to grow the branches, etc. It was just a tough thing to get to feel "right", and I was even thinking this morning about how I could refine it better. Tweaking with those values is what I spent most of my time doing.

    Enjoy!

    --clint

    ReplyDelete
  12. This prototype made me think in this post!

    http://www.experimentalgameplay.com/game.php?g=69

    Cheers,
    Diego.

    ReplyDelete
  13. Well, it's been a week since I posted the prototype. Any feedback, Danc?

    If as a blog we've moved on to discussing musical worlds, that's totally fine -- I don't have *huge* attachment to this project (even though I still think it's cool), but I just wasn't even sure if you ever saw the proto I made for you.

    Cheers!

    --clint

    ReplyDelete
  14. Whoa Clint, that is cool! I somehow completely missed your post. Deepest apologies.

    I'm still very interested in the Tree Story concept and have some new graphics sitting on my HD I need to post.

    Thought on the prototype: Very, very cool. I can easily imagine the player creating their own little world with this simple technique.

    I think the tree growing prototype is in a good place right now. There are certainly things you could add to it, but I think it proves the basic concept "can the user make interesting trees"

    The next step is perhaps a harder one:
    - Add a simple player to the world with the ability to navigate the trees (likely by jumping)
    - Give her the ability to seed new trees.

    I suspect that this will give us a much deeper understanding of which tree structures work and which ones don't. Somethings like oddly sized trees should also give some game ideas.
    - Imagine finding a special seed that creates a super long trunk that you can't reach the top of. When you build up the rest of the tree to finally reach the top, you discover a little man who gives out special powers, etc.

    If this core mechanic works, I'd be more than happy to provide a complete set of graphics for the project. Very fun stuff!

    BTW, my email is danc [at] lostgarden.com, so feel free to email me directly if you have any prototypes.

    Awesome,
    Danc.

    ReplyDelete
  15. No worries on the missed comment, Danc -- I totally understand!

    Really glad that the prototype passed your initial approval test.

    The biggest hurdle I'm running up against is the idea of how to make the platformer "feel right."

    About the only way that I've been able to think that the game will be playable is to make the foliage platforms be "one way". So I'm still work out how the characters will behave, especially with the hope that characters would follow the normal of the foliage as they walk around the half-circle.

    Have you happened to think about such details?

    I think that making this into a platformer would technically be relatively simple -- the main thing I'm unclear on at this point is behavior design.

    Thanks again! :)

    --clint

    ReplyDelete
  16. Hi clint!

    How to make the platformer 'fun' is a good question. Couple thoughts

    1) Make foliage 1-way (this is what you were saying): Basically there is a half circle collision shell at the tops of the foliage objects. Your feet can pop through one way, but not the other.

    2) Make the player able to catch a hold of and climb foliage. If you move into the area of the foliage circle, you can move up, down, left , right. If you get to a top edge, you pop out of the foliage and start walking on the surface.

    This version makes jumping very forgiving since as long as you can reach the bottom of a foliage brush, you can haul yourself up to the top.

    Visually, you'd crop the character so that just her head was sticking out of the foliage.

    3) Force the player to build platforms that they can climb. In essence the player must grow their own ladder by planting seeds in the right locations and growing the platforms the correct amount and in the correct direction.

    The trick to this one is that you need a good 'tree growing UI', which though not hard is more work.

    When there are so many choices and they are almost all very 'tactile' in nature, prototyping and getting quick feedback on the results seems to be the only way to go.

    I think the overall goal is easy and joyful navigation of the trees.

    Can't wait to see what you come up with next!

    take care
    Danc.

    ReplyDelete
  17. Danc,

    Great layout of the various gameplay options -- I think you covered our options well.

    I'm thinking that options 1 and 2 sound more fun and casual -- option 3 seems like it's inserting challenge. While challenge isn't bad, we don't want it to get in the way of what the player finds fun (growing and navigating trees).

    So now we're down to deciding between options 1 and 2 -- I think that #1 is certainly the easier one to start with, and #2 could be made as an extension to #1 (especially if the code kept such possible expansion in mind).

    I've got a pretty busy week this week, but perhaps I'll take time to dink around with this one -- we'll have to see.

    Thanks again! :)

    --clint

    ReplyDelete
  18. Danc,

    Okay -- a meeting was canceled last night, so I had a free evening I wasn't expecting. I took about 40 minutes of that evening to turn the tree prototype into a *really* crummy platformer, but at least it (mostly) works.

    This one uses option #3 as the climbing paradigm, as it was the simplest to implement very quickly. No one-way platforms, just hard collisions for everything. For simplicity's sake, I just gave the tree nodes and the player spheres for their collision boundaries -- when I implement my own custom one-way-platform collision code, it will be there that I will give the foliage partial-spheres. Because you're a sphere standing on a sphere, that's why you'll sometimes start sliding off of a platform if you're standing on it while it's growing.

    Please forgive the crumminess of the demo, it's quite glitchy.

    Still, I found it fun to play around with, and hopefully you do too. :)

    Screenshots!
    Screenshot 0
    Screenshot 1
    Screenshot 2
    Screenshot 3

    And the ubiquitous download link (again, with Mac and Windows binaries as well as source code).

    It wouldn't be too much more to make the trees grow from a keypress, and it would grow the platform that you're standing on -- I wanted to add that last night, but it was a short-term blitz coding session, and I didn't get a round tuit.

    Cheers!

    --clint

    ReplyDelete
  19. Sweetness!

    I actually had a reasonable amount of fun trying to get to the top of the platforms I was building. The jump distance is larger, but quite nice for exploring.

    - Making the collision hulls on the trees one way is probably the next obvious step. I think that will change the feel a lot.

    - If you push down when standing on a platform, you could fall through that particular platform. That would allow you to get down quickly from high places.

    Pretty good for 40 minutes. :-) I love quick prototypes.

    Danc.

    ReplyDelete
  20. Thanks for the feedback, Danc!

    Really glad you enjoyed it, despite its flaws.

    I like the idea about pushing down when standing on a platform -- I'll have to think about that one.

    I think you're right about the one-way platforms thing -- that really seems to be the only reasonable thing to tackle next.


    I look forward to getting my mitts on the better looking tree art. I'm pretty busy too though, so no rush.

    Thanks!

    --clint

    ReplyDelete
  21. I've seen a couple of flash games with vector-based platforms not entirely dis-simmilar from this. One potential issue I can foresee would be the player not being able to tell exactly where the edge of any given platform lies.

    Of course, I'm making the assumption that you'll use traditional side-scrolling platformer controls. I'm probably making that assumption because the graphics test you provided reminds me heavily of the wizard town area in Maple Story.

    If the tree platforms were such that you couldn't fall off of them by accident, say with invisible safety railings that prevent you from even walking off the edge, or "jump points" that act as a teleport from the edge of one treetop to the next, no jumping allowed, then it would work.

    But if there's just some invisible hemisphere hidden under the foliage, and moving too far left or right makes you fall off the ledge when all you were trying to do is get close to the edge for a jump, then the whole game would quickly become frustrating.

    Other issues include the fact that, in traditional 2D action-platform games, usually the best place to attempt a tricky jump is from the edge of a platform. With hemispherical platforms, this well-known paradigm breaks down.

    Consider the lateral jump from one tree-top to the next. If you jump from the center of the tree, you have an advantage because the starting point of the jump is higher up. But from there, the closer you get to the edge of the platform (and therefore, the closer your stating point is to your ideal landing position,) the lower the starting point of your jump becomes.

    To put it another way, the distance from ANY spot on the hemisphere to the nearest point on an adjacent hemisphere is basically fixed. No matter what point you choose to jump from, the length of the jump you need to make is always a simple calculation of the distance between two circles. (Except for when the target platform is higher, of course.)

    Basically, it means that it makes no difference what part of the tree you jump from. Thus, tried-and-true 2D action platform techniques such as making a running leap off the edge of a platform, or carefully planning a vertical jump to reach some precise point on an overhead ledge lose their relevance.

    Planning a jump to land between, say, spikes or other obstancles on a neighboring platform is still an option, but some would say that the use of hemispherical platforms unneccessarily complicates things. Also, assuming a fixed movement speed, the closer you get to the edge of a platform, the narrower the margin for error becomes. Thus, even if you could see the actual collision hemisphere, and not the leafy green sprite covering it up, there would be serious doubt as to how close to the egde it's safe to get.

    Basically the concern is, "the movement tricks I learned in Mario 3 don't work here." The player's basic assumptions about jumping phsyics in a 2D action-platform game would be seriously challenged. Now, that could be an advantage or a disadvantage, depending on the developer's intentions and the player's expectations of the developer. I'm operating under the assumption that, as a developer, your goal is not to confuse, annoy, or alienate your players. I'm also assuming that people who have already played and enjoyed traditional action-platform games will want to play Tree Story, based on the look & feel. I have no idea who your target audience is, or whether you are offering the game as commercial art (a fun game to play) or high art (a deliberate challenge to the player's pre-conceived notions.) It sounds like you just want to make an experimental game with trees in it.

    Of course, I could be wrong. You might find that some new players adapt quickly to the new paradigm. Personally, I can't help but find myself concerned as I run through it in my head. I don't think it would work well.

    I should note that if most platforms are large and varied collections of shapes, rather than truly hemispherical, it could mitigate the platform-edge issue. Hemispheres would become the smallest unit of much larger, more traditional, vaguely rectangular platforms.

    And naturally, everything I've written here assumes that the game is a real-time 2D action-platformer. My comments do not apply if the game uses turn-based or non-jumping gameplay models.

    Thank you.

    ReplyDelete
  22. Woah... I just read the article on Genre Addiction. I can only immagine what a dinosuar I must sound like to the rest of you. Is it really that unusual for a player to expect or express a desire for a traditional 2D action-platformer?

    ReplyDelete
  23. @WarpZone: All valid comments. To clarify the game as I'm imagining it is more of a 2D side view Animal Crossing with a dash of exploration. As such the movement needs to be pleasurable, but not necessarily challenging in the pixel perfect manner that some action platformers operate.

    Unfortunately, the single best way to resolve these jumping issues is to start prototyping and iterate a few hundred times in order to make it feel better. There are several good starting points mentioned in the comments. Ultimately, tactile UIs are particularly tricky to describe using text. :-)

    Re: Genre Addiction. It is quite common to express a desire for a traditional 2d action-platformer! :-) This is why your comment about the target audience was insightful. Who you are targeting and their desired style of play have an immense impact on the type of navigation and level design.

    It is always tempting borrow complete mechanics from existing genres but this is typically the wrong approach. Instead, it is better to reimagine the mechanic in terms of how it integrates seamlessly into the rest of your game systems. This too requires iteration. :-)

    Good stuff!
    Danc.

    ReplyDelete
  24. I imagine when you say “Painter” you certainly don't mean Microsoft “Paint” that you get with Windows. Because if you were able to do that in Paint, you're positively brilliant. Don't get me wrong, if you did it in some other application, I think it's a great pic for only a few hours or so work. Very good. Looks like an interesting idea, as well. Great shading there. The girl is quite cute too.

    ReplyDelete
  25. Hello Danc.

    I recently found this site and have read bits and pieces about free game art. I've just left a games design course, and I'd like to start creating a game. I have a very, very infant-stage idea running through my head, which I got after witnessing the awesomeness that is your Tree Story art. I've seen LostGarden art in a few games, like Bunnie and some games on Android Market. I wonder if you'd be willing to allow me usage of some of the art for Tree Story.

    If you'd like to know about my idea and let me know if you object to useage please email me at happywombleman@gmail.com

    ReplyDelete