A discussion on game engines!

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

    • A discussion on game engines!

      First off, AWESOME book! It really opened my eyes up to some nice new concepts!

      I'm writing my second game and from everything I learned from my first game, I know what to avoid this time around.

      I'm going to pass up using game states and instead use processes. I've got a slew of ideas of how this could be best implemented but not 100% sure if my ideas are right.

      So lets take a game like space invaders. The opening splash screens could be the first process, it fades the title in and out and links to the menu process which allows the user to start, view high scores or quit.

      If start is hit, it starts a big chain of events. A process loads the level and once done links to the main game process. The world manager is instantiated which is the container for all the entities - player, aliens, base, bullets. Individual systems control the various entities.

      So would it make sense for one process to handle the whole world, update/render all entities, check for collisions etc?

      OR

      One process handles the player, another handles the aliens, another the bullets... etc

      Some system that is part of the world class handles the collision detection.

      All systems use the event manager to communicate together. Is the event manager a process as well?

      I'm just wondering if my thinking is right about all this!

      Any input would be great!

      Thanks

      Fred
    • I kinda did what you did, semi-ditched the GameLogic class and went all with processes.

      Except later I decided that sometimes parts in the game need to call data from the GameLogic/WorldManager.

      So I put my Game Screens as Processes and then when it's time, one of them creates a new GameLogic, which holds processes itself (such as game states, etc) instead of having what I thought to be an ugly switch statement.

      Things like physics, while I thought should be a process too, I decided that might need access as well, but haven't decided either. So they may be a process pointed from within the GameLogic.

      Renderer could definitely just be a process listening for messages and if you can completely work with messages, physics can probably be so too. It's just that so many elements may (MAY, again, logic design aspect) need to get information from the GameLogic on entities/actors etc... I thought maybe that one should be globally saved somewhere at least.

      Would like feedback and criticism here too :)

      The post was edited 1 time, last by Shanee ().

    • Ya the main reason I'm going with processes is to avoid the ugly switch statement.

      Besides then, you can run multiple processes at once that layer over one another!

      I'm not sure I like the idea of the rendered being fed with messages. I would like that system the far more coupled to the data it has to render. That's just me though! :)