Demo: Green Dragon

Articles with the tag: System Architecture

Framework: animation clip attributes

Time structures:

Real time:

double timer; // Time since GLFW initialisation.
float tDelta; // Time per frame (could also be considered Game Time)

Game time:

float tGame; // Time since first frame (i.e. first update-draw cycle)
float tDuration; // Game-time duration for clip, whose clipDuration will be warped to match it.
// Placeholders for time-based events. Likely entered as literals in the animation update logic.
float tStart;
float tStop;

Animation time:

float tAnim // Time taken since animation starts (Animation Time) (could include repeated clips)

Clip time (supports warping):

float tClip // Time taken since clip starts (Clip Time). Calculated by modding tAnim with tClipDuration).
float tWarp; // Ratio by which tClipDuration is warped by to match the given game-time tDuration.
float tClipDuration;

Clips are loaded onto a an array ClipArray. A call to play a clip sets its isPlaying value to 'true' and each clip is iterated through each update cycle.

struct Clip
    String clipId;       // Name ...

Read More »

Animated materials

[17/03/14 16:14]

Control nodes should have access to the timer (as should autonomous nodes*) but materials should be given the option in case the material is animated.

  • Control nodes could inherit from InteractiveNode and AgencyNode, to distinguish between nodes that take input or not. Or: AgencyNode can be overloaded with an Input class to turn it into an "InteractiveNode".

[17/03/14 20:13]

Models should load their own meshes and materials, but ResMan should check to see if mesh/material exists before loading it again. Could perhaps remove get_mesh() and get_material() methods and simply return directly with the load_mesh() and create_material() methods.

[17/03/14 20:40]

ModelNodes should have meshlists and associated shader lists, to be able to render submeshes.

Read More »

Framework development: Composition versus Inheritance

Speed of calls

Tutorial framework's SceneNode object inherits from Mesh, Texture and other objects. This intuitively seems like a bad idea as one has to make sure different classes don't share member names.

It should speed things up, though, as it doesn't have to make pointer calls to owned Material object.

Solution: elements contain local non-pointer Material object member and copy the passed Material's data.


This can then be called from inside the game loop for real-time material changes.

This does make objects larger, however, whereas before they would simply contain a reference to the same material object and could be all changed by changing the material. This way they'd all have to be set individually.

Composition versus Inheritance

Apparently inheritance of implementation-only things is bad, and composition should be used.

i.e. TestWorld invokes GameEngine object. Is this composition, and is ...

Read More »

Framework system architecture design ideas

Studying previous code to design engine framework.

Possibly: A Game (framework) class which is initialised and called by the main() loop. But we'll see...

1  GameEngine* game = new GameEngine;
2  game->LoadShader...

I don't necessarily want a new game environment all being created in main().

Inheritance could work:

GameEngine (windowing loop and defines scenegraph, renderer classes)

GameWorld (inherits from GameEngine and allows for scene creation, key handling, renderer selection)

SoftwareTitle.cpp -> Contains ``main()`` Starts GameWorld init and GameLoop. OpenGL + windowing init.


Each object will contain its own shader program, presumably. Pipelining might make this more efficient.

Renderer (Buffers, Transformation, Shaderprogram)

    SceneGraph (overall transforms, contains nodes)
    SceneNode (objects inherit from this)

Transform : SceneGraph
Model     : SceneNode
Light     : SceneNode

In Interactive3D:

Framework is overrided by a custom game world using object-oriented inheritance.

The Scene Graph

All inherit from GraphNode abstract (as in aforementioned project).

SceneGraphs contain objects, SceneNodes ...

Read More »

Introduction to CharSim


As part of "Real-Time Global Illumination in a Hybrid Distributed Environment" I looked into the possibility of running games and other interactive animated simulations with global illumination (i.e. physically-based lighting techniques generated using raytracing techniques). The paper compares two different kinds of distributed computing system which would provide the necessary computing power to display raytraced graphics at speeds suitable for gameplay: Shared-memory distributed systems, such as General Computing on Graphics Processing Units (GPGPU), and distributed-memory systems, such as Beowulf clusters and cloud architectures.

I then determined a method in which the two types of distributed system might be combined to create a hybrid distributed system and created an MPICH C++ program to simulate packet distribution.

One interesting research project I covered in the literature review used an OpenGL-based game engine as a base, and determined a way to use OpenGL texture buffers to store raytraced information in order ...

Read More »

Page 1 / 1