no the level editing is done in 3dsmax or blender, i have written tools for both and plan to add more later on.
The values in that dataobject can be whatever i want, and code side its as easy as using it as so :
Code: Select all
bool CGameCameraEntity::fromGameObject(core::stringc &name,CGameEngine* engine)
{
CDataObject tocreate = engine->sgeData()->getObjectByName(core::stringc(name));
if(tocreate.paramExists(core::stringc("position")))
mPosition = tocreate.getParameterAsVector3df(core::stringc("position"));
if(tocreate.paramExists(core::stringc("rotation")))
mRotation = tocreate.getParameterAsVector3df(core::stringc("rotation"));
if(tocreate.paramExists(core::stringc("target")))
mTarget = tocreate.getParameterAsVector3df(core::stringc("target"));
if(tocreate.paramExists(core::stringc("fov")))
mFov = tocreate.getParameterAsFloat(core::stringc("fov"));
if(tocreate.paramExists(core::stringc("near")))
mNear = tocreate.getParameterAsFloat(core::stringc("near"));
if(tocreate.paramExists(core::stringc("far")))
mFar = tocreate.getParameterAsFloat(core::stringc("far"));
return true; //todo::checking
}
Something in the dataObjects from a level might include :
Code: Select all
ShadowObject(gameMesh://levelprop_arch1) {
position = x[234.34] y[21.0] z[100.0];
scale = x[1] y[1] z[1];
texture0 = textures/levelprop_arch1_diffuse.jpg;
texture1 = textures/levelprop_arch1_normals.jpg;
texture2 = textures/levelprop_arch1_glowmap.jpg;
};
Code: Select all
ShadowObject(config://mainMenu) {
background = ./data/menu/background.jpg;
windows = CDOHudWindow://profileWindow;
items = CDOSprite://menuNewGame,CDOSprite://menuProfiles,CDOSprite://menuOptions,CDOSprite://menuQuit,CDOSprite://menuSelector;
};
See, so each data object gets stored by type and by name...
sgeData()->getObjectByName, getObjectsByType (gets a list of those types)
So, in general the data system makes the engine super easy to modify (as you can clearly see).
The other aspect of the engine is simple object registration... Such as the menu... a menu needs a few functions such as :
init()
render()
shutdown()
run()
This is part of the core of the engine, and the menu class inherits a list of these it can or doesnt have to use, and each one can be registered with the core, based on a priority. Such as the data system is priority 1, where the simple things can be priority 4 or 5...
Code: Select all
gEngine->sgeProcess()->registerOnInit(this,CGameWork::GAMEWORK_PRIORITY_2);
gEngine->sgeProcess()->registerOnRun(this,CGameWork::GAMEWORK_PRIORITY_2);
gEngine->sgeProcess()->registerOnRender(this,CGameWork::GAMEWORK_PRIORITY_4);
gEngine->sgeProcess()->registerOnShutdown(this,CGameWork::GAMEWORK_PRIORITY_2);
This kinda shows a tiny bit, dont wanna post too much cos its still coming along and might change quite a bit... But you can atleast see what im aiming for. Also, there is a version coming soon for free, to the community. Which has the basic functionality to "plug" a game into the engine, with an already minimal state system etc so that if i wanted to prototype something it would take a handful of code, in seperate pieces (for updating the framework thingy), plugging into the engine.
Hope this makes sense, is that what you are referring to?