[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Entity system in Lua, communication with C++ and level editor. Need advice.
- From: HexDump <hexdump2002@...>
- Date: Fri, 7 Jan 2011 09:58:48 +0000 (GMT)
First of all as this is my first message to the list I wanted to say hi to
everybody.
Before expose my questions I would like to note that I don't want anybody to
expose a silver-bullet for all my probs, just need some inight about how peopple
ussually do that in orther to let me start rolling and develop my own system.
I have a 2D basic editor written in Qt, and I'm in the process of adding
entities. I want the editor to be able to receive RTTI information from
entities to change properties, create some logic being able to link published
events to published actions (for example, A level activate event throws a door
open action), etc... . And here is where lua enters the game.
On the other hand I want to use a component based design for my entities, and
here starts my questions:
I have decided to create my components in C++ side and export needed things to
Lua. Making lua define entities by composition of C++ components (Entity
templates). Don't really know if Entity class (just a container for componentes)
should be a lua class or C++ class.
How are engines like cryengine, etc... have all this rtti information exposed in
their editors?
I have some ideas but don't know how feasibles they are. For example, I have a
Health component, I have come across I could expose the Health component to Lua,
and two methods getHealth() setHealth(), this way the editor could ask the
entity with this component all "get"XXXXX and show in the editor the XXXXX as a
property the designer can change. Does this makes any sense?
To bring some more information I have to say that my editor is external, not
ingame editor.
Thanks in advance,
Notbad.