Collaborative Processes

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Collaborative Processes

      I just wanted to say again that I'm getting so much out of this book. The first time I bought it (2nd edition), I took one look at the code and thought to myself, "This is way too complicated." That was a few years ago. Since then I've studied game engine design, and this book has pretty much not left my side.

      You were right, I don't think I can go back. :P

      Anyway,
      My engine is designed to make "Indie" style 2D games like World of Goo, for instance. In fact, that particular game is my inspiration. As I've stated in my thread, How low level should events be?, my architecture places the Scene object in the App class as a rendering parallel to the Logic object. I also decided to place a ProcessManager in the scene, and allow users to inherit from its interface and implement HandleEvent.

      As the title states, I want to have the scene and logic run processes together, where each side handles visual, and game logic related things, respectively. As an example, I'm creating an animation system (also based on World of Goo) that uses XML files to define keyframes for translation, scale, rotation, color, and other things. I'm thinking of defining two processes, AnimationSceneProcess, and AnimationLogicProcess. In the game logic, the user would instantiate an animation logic process, which would send an event, "animation_began", to all subsystems. This event would contain the keyframe datastructure. The Scene would catch that event and spawn a parallel AnimationSceneProcess, acting on the scene node of the object.

      The logic process would handle translation, scale, and rotation, while the scene process would handle color, alpha, and sound keyframes. It could handle other things like swapping textures, sprite animations, etc. as well.

      This kind of thing isn't addressed in the book, but it seems in line with the whole "split logic and rendering" architecture. What do you guys think?