How can I achieve strong typing with a component messaging system?

Posted by Vaughan Hilts on Game Development See other posts from Game Development or by Vaughan Hilts
Published on 2013-07-01T14:57:52Z Indexed on 2013/07/01 16:30 UTC
Read the original article Hit count: 278

I'm looking at implementing a messaging system in my entity component system. I've deduced that I can use an event / queue for passing messages, but right now, I just use a generic object and cast out the data I want. I also considered using a dictionary. I see a lot of information on this, but they all involve a lot of casting and guessing. Is there any way to do this elegantly and keep strong typing on my messages?

© Game Development or respective owner

Related posts about component-based

Related posts about entity-system