91
SFML projects / Re: Nero Game Engine
« on: July 15, 2017, 01:35:58 am »
Engine Update
Object Node
I've implemented a Tree structure to hold all objects in a given scene. When i started the engine i was handling only Sprites, things were simple, each Layer of Sprites was represented by a std::vector. Now that the number of different objects begin to increase, i need a more flexible data structure. Starting from now everything in a scene will be encapsulated in a ObjectNode and attached to a parent.
The Different Objects
There are two main categories of objects, primary objects, and logical objects
Primary objects are represented by a Class in the engine. By exemple for Sprites, there is a Class called SpriteObject that encapsulate a sf::sprite.
List of primary objects : LayerObject, SpriteObject, MeshObject, PhysicObject (encapsulate a Box2d body)
Logical objects are built by combining two or more primary objects. Even if the engine recognize them, there are not explicit Classes that represent them.
List of logical objects : MeshedObject(a MeshObject attached to a Spriteobject), SolidObject (a SpriteObject attached to a PhysicObject)
I plan to make the concept of logical object a key concept of the engine. Complex objects like a Player could be build using that concept.
Also in the future (not for the first release), there will be more primary objects like : AnimationObject, LightObject, SoundObject, MusicOject, ParticleObject, ShaderObject etc.
Smart Layers
Now that each scene is based on a Tree structure, looking for a object could be more complex. To reduce the time of processing over the tree, objects are stored in Layers and each Layer always contain the same type of object. Also the engine can create automatically some Layers in order to prevent mixing different types of objects in the same layer.
Video Time
The video present three types of objects : SpriteObject, MeshObject and MeshedObject
We can see that the engine automatically create layers. Also each layer has a Color that indicate the type of object it is holding.
http://www.youtube.com/watch?v=LCrg_UZl1Es
Next Time
The next time i'll talk in detail about Mesh Objects and the Mesh Editor
Object Node
I've implemented a Tree structure to hold all objects in a given scene. When i started the engine i was handling only Sprites, things were simple, each Layer of Sprites was represented by a std::vector. Now that the number of different objects begin to increase, i need a more flexible data structure. Starting from now everything in a scene will be encapsulated in a ObjectNode and attached to a parent.
The Different Objects
There are two main categories of objects, primary objects, and logical objects
Primary objects are represented by a Class in the engine. By exemple for Sprites, there is a Class called SpriteObject that encapsulate a sf::sprite.
List of primary objects : LayerObject, SpriteObject, MeshObject, PhysicObject (encapsulate a Box2d body)
Logical objects are built by combining two or more primary objects. Even if the engine recognize them, there are not explicit Classes that represent them.
List of logical objects : MeshedObject(a MeshObject attached to a Spriteobject), SolidObject (a SpriteObject attached to a PhysicObject)
I plan to make the concept of logical object a key concept of the engine. Complex objects like a Player could be build using that concept.
Also in the future (not for the first release), there will be more primary objects like : AnimationObject, LightObject, SoundObject, MusicOject, ParticleObject, ShaderObject etc.
Smart Layers
Now that each scene is based on a Tree structure, looking for a object could be more complex. To reduce the time of processing over the tree, objects are stored in Layers and each Layer always contain the same type of object. Also the engine can create automatically some Layers in order to prevent mixing different types of objects in the same layer.
Video Time
The video present three types of objects : SpriteObject, MeshObject and MeshedObject
We can see that the engine automatically create layers. Also each layer has a Color that indicate the type of object it is holding.
http://www.youtube.com/watch?v=LCrg_UZl1Es
Next Time
The next time i'll talk in detail about Mesh Objects and the Mesh Editor