|
||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| Some recent topics started on our forums | |
| Component-based Entities using Properties | Component-based Entities using Properties Introduction This is my second public design for using compoents with entities to prevent deep hierarchy problems and make the game object difinition more data-driven. By data-driven, I mean that you can... |
| Posted October 26, 2009 2:04:02 PM | |
| Being stalked by a fraudster, what to do? | I'm not sure this is the right place to post this, but after all, it is a Help Wanted topic. Last year, a man emailed me, luring me into joining what he claimed was a company in the start-up phase. Inexperienced as I was, I didn't do much backgrou... |
| Posted June 9, 2006 5:10:38 PM | |
| View All Topics Started By This User | |
| Some recent replies made on our forums | |
| Component-based Entities using Properties | If I understood your text correctly, this is pretty much what I do already. Every component will hold a direct reference to the properties they care about and won't look up on the string key of the property in Entity's. So actual map lookups occ... |
| Posted November 17, 2009 12:55:43 PM | |
| Component-based Entities using Properties | I'd do a dynamic_cast on thatone, at least in debug builds, else there's no way to catch a null pointer exception if the type is wrong. I'm not using templates on the components. I found that I never really did GetComponents too often an... |
| Posted November 16, 2009 4:43:45 AM | |
| Component-based Entities using Properties | Just commited a fairly large update to the component system. It breaks backwards compatibility, but holds a lot of cleanup and also adds a type serializer, written by Kenneth Gangstų aka Sphair, which I'm doing this component system with (we use it i... |
| Posted November 14, 2009 9:18:35 AM | |
| Component-based Entities using Properties | Sorry that I haven't replied here for a while. I've been really busy, and I still am. But I just wanted to add a few comments. ComponentContainer holds a vector of components. PropertyContainer holds a map of properties. So yes, we have a map... |
| Posted November 13, 2009 6:06:58 PM | |
| Component-based Entities using Properties | I forgot to mention this in my last post, but since you also can listen for properties changing, and this might be something you'd want to do, you could also listen in the Graphics component for when the position property changes, and only do th... |
| Posted October 27, 2009 4:24:31 PM | |
| Component-based Entities using Properties | void ComponentContainer::UpdateComponents(int deltaTime) { std::vector<Component*>::iterator it; for(it = components.begin(); it != components.end(); ++it) (*it)->Update(deltaTime); } As you can see, the components are not... |
| Posted October 27, 2009 3:14:05 PM | |
| Component-based Entities using Properties | Quote:Have you considered adding a bit more exposition to this and submitting it to writers@gamedev.net as an article? Oh, I never considered this worthy of being listed there, but that is a very intriguing thought! Thank you :) |
| Posted October 27, 2009 11:43:43 AM | |
| Component-based Entities using Properties | Commited a small update to the code that now throws an exception if you try to get a component that does not exist. This instead of returning NULL. |
| Posted October 27, 2009 10:26:08 AM | |
| Component-based Entities using Properties | Quote:I'm just skimming here so I may have missed it, but I do not see anything that protects the user from choosing non-existent components or properties. For the properties, if a property does not exist, it will be made. One could certainly th... |
| Posted October 27, 2009 10:13:21 AM | |
| Component-based Entities using Properties | Thank you for your reply, zyrolasting. I'll make sure to edit and fix the line that indicates that components own entities, since it's most definately the opposite, which I'm also sure is the impression all readers would sit back with after readin... |
| Posted October 27, 2009 4:41:15 AM | |
| View All Replies Made By This User | |