Aug 07

Better tree structure

Tag: Full Games,MMORPG Tycoontrevor @ 12:01 am

Just a quick screenshot, since I’ve finally got some better tree shapes being generated.

This isn’t going to be appropriate for the final trees — it’s way, way too slow to render (just look at the length of that green bar!  Though to be fair, there are 200 trees being rendered)  Here, each branch is effectively being treated as a separate object, instead of treating the tree as just one big thing.  Once I’ve pretty much settled on a tree generation system, I’ll set it up to bake all the geometry into a single object, instead of having it all in dozens of separate objects like this.

But I think that the general shape is reasonable.  Next step is going to be generating foliage for the trees.  And maybe at least making the trees brown or something, instead of having them appear to be made out of white plastic, as they do in this screenshot.

4 Responses to “Better tree structure”

  1. Jay says:

    Looks much more normal :P

    Will you be generating just a few different tree types or hundreds (within certain constraints obviously)?

  2. trevor says:

    Everything in the game, including these trees, is procedurally generated based upon some input data. The only difference between the trees seen here and the ones in the previous shots (apart from a few code fixes) is to the input data. Come to think of it, the only difference between these trees and, say, the model for the Inn is the input data — both are generated by the same block of code.

    Anyhow, right now, all trees share the same model, the same way that all Inns share the same model. But there’s no need for that to be the case; I intend for there to be lots of different models available.

    But I’ve been trying to decide exactly how I want to handle these different procedurally generated models.

    One approach would be to just create a selection of them myself, and provide them as options to the player. Another would be to expose the data to end-users via a GUI, so they can make their own models, perhaps a bit like creature and building-creation worked in Spore (I’m told – haven’t played it myself). A third option would be to have an AI developer make models for you by modifying the input data according to a simple genetic algorithm (much like the one featured in The Blind Watchmaker). He’d present the player with five or ten options, and the player could pick one of those to use, or else tell the AI to generate more options (perhaps based upon one of those first set of options).

    The final “I can’t make a decision about what would be best for the game; I’m only a game designer!” option is, as always, to implement all those other options, and then let the end-user decide which ones to use. Needless to say, I’d really rather not descend to that level of non-design; it’s always a lot more work and makes the game feel unfocused. :)

    The whole thing comes down to a question of what the game is really supposed to be. If it’s really supposed to be a Tycoon game (the way that v1 and v1.1 were), then using static pre-built models would nicely keep the player focused on the Tycoon game mechanics. If it’s supposed to be a The Sims-style “build a world” game, then it should allow the player to directly create the models himself. On the other hand, if it’s trying to simulate what it’d actually be like to be in charge of the development of an MMORPG, then it should have a simulated employee who presents a range of options to the player.

    Right now, I’m leaning toward one of the latter two options.

  3. Jay says:

    Wow, thanks for the detailed reply! :)

    Perhaps a selection of “Forest, Jungle, Dead, Desert, Mountain” (and maybe a few others) for a sort of paint on tree tool (in much the same way as the raise and lower tool works) could be used with each selection generating several different types of tree each? That would allow players to put trees where wanted and still maintain focus on the tycoon aspect?

  4. Neckername says:

    Looks nice, although ease of use will be necessary in final product. With that being said, is there a way to click where you want a tree (or possibly click and drag an area or create an outline of where a forest should be and then have the trees pop up) and have random designs of trees so they don’t all look the same? I know that is a lot to think of for one sentence but I think it makes sense according to what i learned in game programming this year at school.