Timeline for Event-driven Communication in a Game Engine: Yes or No?
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23, 2017 at 12:37 | history | edited | CommunityBot | replaced http://stackoverflow.com/ with https://stackoverflow.com/ | |
| Apr 13, 2017 at 12:18 | history | edited | CommunityBot | replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/ | |
| Jun 14, 2015 at 13:40 | review | Suggested edits | |||
| Jun 14, 2015 at 14:57 | |||||
| Mar 28, 2014 at 10:48 | history | edited | Anko | CC BY-SA 3.0 | Introduced clarifying formatting. Improved word order. Removed redundant bits. |
| May 17, 2013 at 19:43 | comment | added | House | @James Welcome to the vote to close privilege, use it wisely. | |
| Apr 4, 2011 at 15:48 | comment | added | James | @hamlin11 Glad this information is still helping people :) In regards to the registration, if this happens quite a bit, remember you will want to optimize it for speed, have a pool of the registration objects to draw from, etc. | |
| Apr 2, 2011 at 1:13 | comment | added | Brian Webster | Great answer James, much appreciated. Did not occur to me to do registration. | |
| Feb 10, 2011 at 19:07 | history | edited | James | CC BY-SA 2.5 | Added in a link to an old school project of mine. |
| Jan 25, 2011 at 23:48 | comment | added | James | Glad to help, and good luck on your project :) | |
| Jan 25, 2011 at 23:41 | comment | added | Bunkai.Satori | Hi James, yes your response helped very much. Thanks. Your's and Ricket's responses were the most valid. | |
| Jan 25, 2011 at 23:39 | vote | accept | Bunkai.Satori | ||
| Jan 25, 2011 at 23:24 | comment | added | James | @Ricket looks like a spot on description of the setup used for the EMS :) @Bunaki.Satori Hope the extra response helps sort out some more of your questions :) | |
| Jan 25, 2011 at 23:21 | history | edited | James | CC BY-SA 2.5 | Added in more information to answer questions in the comments. |
| Jan 25, 2011 at 21:28 | comment | added | Ricket | The Observer pattern is the typical alternative to polling. en.wikipedia.org/wiki/Observer_pattern | |
| Jan 25, 2011 at 21:24 | comment | added | Bunkai.Satori | There is one thing related to event driven system that confuses me: Under traditional system where every object has predefined set of methods (OnUpdate(), OnMove(), OnAI(), OnCollisionCheck()...) regularly called, every object is resposnsible for checking and managing its state. Under event driven system, there must be some master system chcecking condition of every object, and then sending messages to those where some event was detected. To me, this standardizes the possible object states, and limits the freedom to create unique object behavior. Is that true? | |
| Jan 25, 2011 at 21:12 | comment | added | James | The way the system linked to in my above answer works is that objects only register to hear about the messages they want.. We would use this to our advantage in video games where there may be 100-200 objects in a level, but you only 'activate' the ones the player can directly interact with, keeping the number of things listening down to about 10 or so. All in all this type of system should be 'smarter' than an 'are we there yet?' polling system, and should reduce the overhead of an engine, atleast as far as communication is concerned. | |
| Jan 25, 2011 at 20:55 | comment | added | Bunkai.Satori | Hello James, as I am thinking about internal event messaging system more, I think it does not need to add more cost to the engine. For example, if there are 50 objects on the screen, but only 5 of them are supposed to change their behavior; under traditional system, all the 50 obejcts would need to check for all their possible actions, to see if they should do something. However, with the usage of event messaging, only 5 messages will be sent to those 5 obejects with specific change of action. That looks like a time saving approach. | |
| Jan 25, 2011 at 20:45 | history | answered | James | CC BY-SA 2.5 |