Refining Objects for Hieroglyph
Posted by Jason Z, 05 June 2010 · 206 views
I have had a few weeks to think about where to take Hieroglyph from here, and I hinted at a few ideas back in a previous post regarding simplicity in interfaces based on how the Processing language builds its interface. After spending some time with Unity as well, I have started to get a picture of what I want from Hieroglyph - ease of use.
As can be seen in many of the sample applications, the basic 3D element in Hieroglyph is the Entity3D class, with a subclass for scene graph connectivity called Node3D. Entity3D provides spatial data representation, geometry and material references, and gets used fairly directly in many situations. However, I have in the past utilized an Actor class as well, which holds a Node3D as a container, and then one or more Entity3D/Node3D instances are added for special processing. The recent addition of SkinnedActor provides a good example - a single entity provides the mesh and the skeleton is provided by a series of Node3D objects for the bones. Animation is done on the bones, and the transformation matrices are used to render the entity.
Up until now, I have considered Actor as a special case class - only used for fancy aggregation of the "standard" objects. But, I think for simplicity's sake I will make all game objects utilize the Actor interface regardless of if it is fancy or simple. There is very little overhead for doing this, and it makes all objects have the ability to add content to themselves throughout the duration of the application. In fact, this will also help solve some problems with dynamic changing of materials and things like that which have been popping up here and there.
One final note on my scripting solution as well: only Actors will be directly manipulated from the Lua code, as opposed to Entity3D and Node3D. This will make it very much more streamlined to create and use a scene, and will reduce the amount of connecting code that is needed between Lua and C++. I'm working out the exact syntax that will be used, but my goal is for it to be simple enough to let my "non-programmer" family members be able to create a scene with a few simple instructions [grin]. We'll see how that works out...