Skip to main content
GameDev.net gamedev.net
🔒 Locked

Game Component Flow

Started by Nexster May 23, 2002 at 10:19 AM 1 replies 200+ views
Original Post
Nexster
Nexster
I''m talking about the different parts of a game. The main menu, the actual game class. How do you organize them? Do you have the main menu and gameplay as two seperate classes? or methods? or something else?
Waverider
Waverider
Imagine components like:

Forms - have rectangular controls (including 3D scenes)
Gamestate - data lists for the game
Game - main function loops (tells Gamestate to move ahead a certain amount of time, tells Forms to render active forms and in effect any 3D scenes)
Sound
Network
Graphics - access to graphics API
Resources - lists of bitmaps, textures, etc.
System - (input devices, timer)
Window - original hwnd creation, highest level loop, calls Game

This is the way I think of it.

Each component should be a Singleton, but could be (ACK) global objects. But many will tell you NOT to make them global.

[edited by - Waverider on May 23, 2002 11:28:22 AM]

[edited by - Waverider on May 23, 2002 11:28:40 AM]
It's not what you're taught, it's what you learn.
Taharez
Taharez
I have Managers (Singletons) for stuff like textures, fonts and input. My GUI is it''s own module consisting of several classes. My engine basicly process information from input and updates and renders the other stuff.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.