Template7 Architecture Questions

Posted By: i_program_games

Template7 Architecture Questions - 03/17/08 14:38

After reading the documentation, building the tutorials, and looking at the scripts and xml files I have a few questions:

1. If I want to make my own GE (Game Entity) it appears that I need my new action name to match my new xml entity structure name. Is this true?

2. Are components individual functions with individual parameters. I see no implementation details to confirm this (I assume they are hidden in the dll).

3. If the answer to question 2 above is yes then how do I write my own component and please give an example.
Posted By: Doug

Re: Template7 Architecture Questions - 03/17/08 20:53

1) If you want to be able to link the XML data to the GE, yes.
You can create GEs that don't use external data files but, if you do that, you will not be able to edit your GE in WED.

2) How much do you know about C++?
Components (CMPs) are classes (function+data) that share a single interface (get, set, act, update).

3) Download the dll source code and the documentation.

Once you get it to compile on your PC, add a new folder to the "Components" folder (e.g. "MyCmp"). Create a new class in this folder (e.g. "CCmpMy") that inherits from CCmp.

You will also need to add a new enum for this class (e.g. "kCmpMy") to cmpEnum.h and modify the following functions to include it:

eCmp string_to_eCmp(const char* str); // (in ack.cpp)
CCmp* CCmp::create_cmp(CGameEntity* pGE, eCmp type); // (in cmp.cpp)
Posted By: i_program_games

Re: Template7 Architecture Questions - 03/18/08 18:56

Freggin sweet! I'm gonna play with this to try it out. This means that each Component may be ADDED to a GE's behavior thus making it's actions more or less complex. I was hoping this is what you guys were up to. This is indeed a very flexible and reusable approach. Good show.

P.S. Is this the source code you are referring to?

* t7.dll in the acknex_plugins folder.
* templates folder in the GStudio7 root folder.
* wdlv.dll in GStudio7 root folder (if you want to use WED).
Posted By: Doug

Re: Template7 Architecture Questions - 03/18/08 20:40

You got it.

Once you have the basics down, you can do almost anything with a component system.
Posted By: i_program_games

Re: Template7 Architecture Questions - 04/12/08 22:31

 Originally Posted By: Doug
3) Download the dll source


The only link I have points to http://coniserver.net/t7/t7_source_rc4.zip and its broken and outdated.

Where is the latest source code?
Posted By: i_program_games

Re: Template7 Architecture Questions - 04/23/08 18:34

Boooo. I need an answer to my above question ;\)
Posted By: Spirit

Re: Template7 Architecture Questions - 04/24/08 16:53

I think it will probably be released with the next update because its in beta test test at the moment.
Posted By: amy

Re: Template7 Architecture Questions - 04/30/08 08:20

Doug hasnīt been active on the forum the last 5 weeks or so. Is he on a long holiday?
Posted By: amy

Re: Template7 Architecture Questions - 06/03/08 13:37

Any news about the templates? Where is Doug? smile
© 2024 lite-C Forums