Game Client Architecture

Post on 22-Feb-2016

58 views 0 download

Tags:

description

Game Client Architecture. System Core. Register user defined callback functions. Create a window. Attach a swap chain to the window. Run users OnCreateDevice () callback function. - PowerPoint PPT Presentation

Transcript of Game Client Architecture

Game Client Architecture

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

System Core

• Register user defined callback functions.• Create a window.• Attach a swap chain to the window.• Run users OnCreateDevice() callback function.• Main message loop for translating and

dispatching mouse and keyboard events. When there are no messages to process, call the users OnFrameRender() callback function.

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Graphics Core

• Create an object for the display adapter. Current support is for a D3D10Device.

• Create a render target and bind it to the swap chain of the window created by the System Core.

• Create a depth stencil buffer.

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Core

• Create a scene graph for objects that are instanced multiple times. monsters, trees, etc.– INode class: Basic component for the scene graph.• Public virtual destructor: Allows derived classes to

specify cleanup operations appropriate for their object.• Private std::vector<INode*> m_children: Creates a list

of child nodes for the current node.

Game Core

• Create an asset class for all objects that are created only once. meshes, textures, etc.– IAsset class: Basic component for the asset class.

• Public virtual destructor: Allows derived classes to specify cleanup operations appropriate for their object.

• Private std::vector<INode*> m_children: Creates a list of child nodes for the current node.

• Derived classes from IAsset can be used in the game client without recompiling the game core and are dynamically resolved at runtime.

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Network Core

• sdf

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Input Core

• asdfs

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Sound Core

• sdfdf

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Scripting Core

• sdfad

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

Game Client

System Core

Graphics Core

Game CoreNetwork CoreInput Core

Sound Core

Scripting Core

GUI Core

GUI Core

• sdfads