Minimal Scenegraph

About Monkey 2 Forums Monkey 2 Programming Help Minimal Scenegraph

This topic contains 0 replies, has 1 voice, and was last updated by  cocon 1 year, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8174

    cocon
    Participant

    Just to make some better organization of the game scenes, I had a look at the Composite pattern. This is a tree pattern (used in scenegraphs) but instead of making distinctions between branches and leafs, I would simply go for one datatype which is a Component that has other components.

    Now the next step is that I wanted to have more reusable code, instead the Components be the strong datatype (Component>Player, Component>Enemy) I would care more about how the tree works, rather than specify class system-wide datatypes. The result was that I made the component a generic class.

    The result is something like this for now, I post this just in case anyone is interested to know, but later on I will try to make more corrections to it. If you want to make any suggestions or having ideas you are welcomed.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.