Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

TBS Demo game and 2D - 3D

Sign in to follow this  


Hi everyone,

first thanks to Ravuya for his wishes. I feel a lot better than yesterday and I hope that I'll be ok for tomorrow (I have to restart working tomorrow). I still have a sore throat and slight problems with my nose ;)

Unfortunately, I cannot yet post any screenshots as Ravuya requested it. This is due to 2 things :

First, I'm still hard working on the underlying system which keeps all together. I'm testing some stuff to see how it works out and if it's easy to use or not. I've already made some changements to my parameter management which is now part of a lib called "ARUtils". I've done this because I use the "CParameterized" class for the config files of my applications. You'll find an example at the end of this blog.

Secondly, I'm not really a graphic artist. So I'll have to stick to an very abstract type of graphics : Basic geometry.

I still have some game design to do but the demo game for the TBS engine will be spheres versus cubes on hexagon tiles. There will be different unit types such as defenders, attackers, blockers and healers. The force and the additional capabilities of the different units will be viewable through animation (pulsation, glowing, ...) and the units size. The underground types would be normal, energy drain, energy plus, warp and construction. Every player will have a color in which his "possession" (underground) will be painted.

Internet play and vs computer will be included since these are the core things I want to have in the engine.

This morning I'll try to concentrate on the problem how to store the maps in the engine. I get headaches when I try to figure out how to manage to include 2D and 3D maps into the engine.

While pure 2D games (tile and hexagon based games; the display may be 2D or 3D) are quite easy to handle since they are just an array represenation, it's quite more difficult to handle real 3D maps. It's not like just adding a 3rd dimension to the array or so. It's about having a real 3D enviroment with different heights, platforms and bridges. It's much harder to manage that. Any ideas are welcome.

Content of my application config file.

Interesting is the templates part where I actually define, which templates should be loaded. This will later on move into the level description file. The C++ code to load the templates looks like this.
// ----------------------------------------------------------
// Load the template files that are listed in the configuration file.
// Get the name of the template to load from the parameters.
AR::CParameterList *pTemplateList = GetParamList();
AR::CParameter *pTemplates = NULL;
if ( pTemplateList->FindParam( "templates", &pTemplates ) )
// Get the list of templates.
AR::CParameterList *pList = pTemplates->GetParamList();
ASSERT(NULL != pList);

// Iterate through the list.
for (ulong u=0; uGetNrParams(); u++ )
// Get the indexed template entry.
AR::CParameter *pTemplate = pList->GetParam( u );

ASSERT( NULL != pTemplate );
ASSERT( AR::PT_STRING == pTemplate->GetType() );

// Load the file into the entity manager.
if ( !m_pEntityManager->LoadTemplates( pTemplate->GetStringValue() ) )
return false;

// Everything went fine.
return true;

For those interested how I load the other parameters :
AR::CParameterList *pParamList = GetParamList();
AR::CParameter *pParameter = NULL;
if ( pParamList->FindParam("screen", &pParameter ) )
AR::CParameterList *pPL2 = pParameter->GetParamList();

AR::CParameter *pP2 = NULL;
if ( pPL2->FindParam("width", &pP2 ) )
m_pOptions->m_uWidth = pP2->GetIntValue();

if ( pPL2->FindParam("height", &pP2 ) )
m_pOptions->m_uHeight = pP2->GetIntValue();

if ( pPL2->FindParam("bitdepth", &pP2 ) )
m_pOptions->m_uBitdepth = pP2->GetIntValue();

if ( pPL2->FindParam("fullscreen", &pP2 ) )
bFullscreen = pP2->GetIntValue();

if ( pPL2->FindParam("highdetail", &pP2 ) )
bDetail = pP2->GetIntValue();

Saving the config file is as easy as this :
AR::IConfigElement *pDocElement = m_pConfig->CreateElement( "config" );
if ( NULL != pDocElement )

// Open the config file.
AR::IStream *pStream = m_pFileSystem->OpenFile( "Data/config.xml", _O_WRONLY | _O_CREAT | _O_TRUNC, 0, AR::OPENFILE_NOCACHE );
if ( NULL != pStream )
// Create an xml
pDocElement->SaveToStream( pStream );

SAFE_RELEASE( pStream );

// Release the document.
SAFE_RELEASE( pDocElement );

Sign in to follow this  

1 Comment

Recommended Comments

Glad you're feeling better, and I'm looking forward to when you get a demo running.

I'd be happy with just seeing some polygons floating in space, hell, look at my latest demo:


I'm obviously not an artist either. :( Nobody around here is. I wonder where they all hang out...

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!