| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 4 months |
| seen | Apr 18 at 8:14 | |
| stats | profile views | 68 |
|
Jan 17 |
comment |
Implementing my Entity System. Questions about some problems I have found Hi!, I see. I was thinking about having a system for the health component, another for recharging enemy systems, etc... Perhaps I should be thiking a bit more general as you say :). My main aim was to have a system per component this is why I was a bit scared about having lota systems :). THanks for the answer again. |
|
Jan 16 |
awarded | Commentator |
|
Jan 16 |
comment |
Implementing my Entity System. Questions about some problems I have found Sorry, forgot the real question I wanna make. How many components/systems do you have in a game? I'm a bit scared of having to notify a lot of systems when an entity is created/killed (In my current implementation the template is passed to all registered systems). |
|
Jan 16 |
comment |
Implementing my Entity System. Questions about some problems I have found Thanks for all the coments James. By the way, if you ahve another magical "better way to do it" I'm all ears :D |
|
Jan 15 |
awarded | Supporter |
|
Jan 15 |
comment |
Implementing my Entity System. Questions about some problems I have found @egarcia Methods are hold in the systems. Components will just contain data. This is good for example to get tight loops, because you have a system with just one method to process a list of components... Good caching!. Anyway it is not all good, there are some foes like in any other design. |
|
Jan 15 |
comment |
Implementing my Entity System. Questions about some problems I have found (resuming) When we want to create an entity this template is passed to systems, and they check for the components they care and take out a free component from its own pool and clone from the one that comes in the template and registers it in a used list or whatever. When an entity is deleted, the id of the entity is given to systems, they flag components as dead, and in a later iteration (end of frame) they return to the pool. I think this is the way I could do it. What do you think? |
|
Jan 15 |
comment |
Implementing my Entity System. Questions about some problems I have found Hi!, yes James you helped out as allways. I had in mind to add a pooling system per system too as you stated, just, now I'm justg more aware of the design. One of the nice things about having components per system is that they hold a homogenous list or whatever TAD that is pretty easy to pool, loop, etc... So, rewritting my thoughs to clarify: From the xml (or a template build in lua and registered to C++) we create entity templates that it is just, a list of pre created and initialized components (componets know how to load themselves from xml). "Continues next chunk" |
|
Jan 14 |
comment |
Implementing my Entity System. Questions about some problems I have found I added another comment because I needed some more space. James when I said that it was a lot of work I was refering to all the things the system has to do to create an entity or delete it. When creating, we have to get the template send it to the systems (all, I don't know how many system could be, but I guess a lot for every aspect of the entity), then the system decide if it has a component it is interested, instantiate it, and init it, etc... Don't know if this will slow down things, anyway, deletion and creation won't happen a lot of times each frame. |
|
Jan 14 |
comment |
Implementing my Entity System. Questions about some problems I have found Hi James! Thanks a lot for your time again. In 1 I wasn't asking how to represent the template to be loaded (I decided like you to do it through XML, or just with a creation function in LUA, sorry If I wasn't clear), but how to manage this data in memory eficienly to quicly create the requested entity. One solution I have come with, is at loading time, create the templates that will contain instances of the components they will have and when requesting a new entity just use the copy constructor of the real component to clone it with the one in the template. What do you think? |
|
Jan 14 |
asked | Implementing my Entity System. Questions about some problems I have found |
|
Jan 6 |
comment |
Entity system in Lua, communication with C++ and level editor. Need advice Well, I'm a bit lost right now :). At first I was thinking about using lua in the editor to import my entities templates (because I first thought to define my components in lua). Now that I have decided (thanks to you and other articles I have read) to use C++ Components exposed to lua to build my entities can't see its use. Anyway, would it be a better option to make the editor in-game? This way I will have everything I need. I will have all my components and systems registered to lua, and the in-game editor could suck it from there.The cont is that I won't be able to use Qt for the UI |
|
Jan 6 |
comment |
Entity system in Lua, communication with C++ and level editor. Need advice Hi James, and thanks a lot for your comments they are really good (sorry I can't give you credits, I'm new user :S). If I understand correctly, you mean that as I expose my components to lua, then from my editor, there's no need to support RTTI to get this information, I can directly get it from lua, am I right?. The problem, my editor is now an external editor, so I don't have this information exported from my game C++ part to lua.If you don't mind could we talk through IM or something to have a more fluently conversation?Don't wanna rush you with questions,just it is a pain to speak here :). |
|
Jan 6 |
comment |
Entity system in Lua, communication with C++ and level editor. Need advice I have heard of enignes like cryengine, ut3, etc... (I know this are top notch game engiens) that write all the entities in script. So, they offer a real good information for the game editor, this is why I wanted to do something alike, but much simpler. And this is why I asked for define my entitiens un lua side. Could you suggest any doc or something about the fake RTTI in C++? |
|
Jan 6 |
awarded | Student |
|
Jan 6 |
asked | Entity system in Lua, communication with C++ and level editor. Need advice |