Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Lifetime of a Game; Trying to get my thoughts organized
Topic Started: Jun 19 2013, 11:25 PM (487 Views)
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
So... Trying to actually work on a game to publish, I discovered something: if you take away the shiny GUI and the automation, I don't know what the heck I'm doing when it comes to game design. I know about all the components, but I usually have no clue how to connect anything in a cohesive, intelligent manner.

Last night, in an attempt to remedy this, I came up with a list that includes everything a game does from start to finish.

Game Lifetime:

  • Start of game

    • Verify compatible software and hardware
    • Load localization data (if necessary)
    • Create window
    • Load and initialize needed subsystems

  • Game

    • Load necessary scene/screen
    • Check needed assets

      • Load all if feasible and practical
      • If not, load ones immediately needed

        • If proper circumstances are met, load new assets and throw out old ones if possible

    • Update game data/Main loop

      • Update timer
      • Poll user input
      • Update physics/logic

        • Update process manager

          • Each updated object should have a process
          • Physics simulation should have a process

      • Render

        • Cull objects

          • Quadtrees or octtrees first/BSP

            • Occlusion culling (visible space/portal system)

          • Frustum culling

        • Batched rendering

          • Particles of same system rendered together

        • Same texture and shader, if possible, are rendered together
        • Instancing of same mesh

      • Alpha sorting if necessary (hopefully not)

        • Sort and render back to front

      • Transition

        • Only activate a transition if the right conditions have been met
        • Free resources

          • Compare with next scene and don't free reused data if possible
          • Defrag memory pools

        • Provide game with a link to the next scene
        • Destroy self

  • Clean-up

    • Delete game objects
    • Free all memory pools
    • Clean out subsystems
    • Close the window
    • Free any pointers or objects remaining and quit


Any suggestions or comments to help me refine and revise this list?
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Are you asking for suggestions of different game components that are necessary or just general tips on structure?
What I usually do for any big project even if it's not a game is using model classes to hold the important stuff and interfaces so that I don't have to rewrite the whole code structure when I add and take away new functions. But this should be pretty obvious for most experienced programmers.
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
Despellanion
Jun 20 2013, 11:22 PM
Are you asking for suggestions of different game components that are necessary or just general tips on structure?
What I usually do for any big project even if it's not a game is using model classes to hold the important stuff and interfaces so that I don't have to rewrite the whole code structure when I add and take away new functions. But this should be pretty obvious for most experienced programmers.
I'm trying to figure out the general structure. I create actors, event handlers, process managers, and various components, but I just have a difficult time linking everything together. I'm just trying to figure out what has to get done between the time the game starts and the time the game ends.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Very late reply, but I came to think of this last night and it reminded me of this topic.
Have you heard of Playmaker? It's a state-machine plugin for Unity that lets you outline events for your game and link them together in a hierarchical flow-chart fashion. I know that's not exactly what you were asking about, but maybe you would have a easier time figuring out the ins-and-outs of your game with a flowchart of some sort?
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
If you want to map it I think it would be best if you split it up in components.
You have the objects which need controlling.
You have a scene manager which manages the objects in the scene
You have a graphics engine which renders the scene
You have events, what to do when the player presses a button or walks somewhere etc.
And you have the game engine which links those together.

So the order would be something like this

Game engine is started
Loads settings
Loads Graphics engine
Creates scenemanager and adds objects
loop
Receive events
Respond to events
Draw scene
end loop
unload Scene
unload graphics engine
unload game engine

Then you could go on describing the different components. If you work it out deep enough you could totally build a game in plain english, translate to programming language of choice and you're done.
Or anyway, that's how I think about it, I don't consider myself an expert on the matter (maybe amateur is even stretching it).

There are also many modelling tools and diagrams available to describe what a machine does. For example software ideas modeler: http://www.softwareideas.net/ the diagram you want is an activity diagram, but there are many more useful diagrams.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
DealsFor.me - The best sales, coupons, and discounts for you
« Previous Topic · Game design · Next Topic »
Add Reply