Skip to main content
21 events
when toggle format what by license comment
S Jun 23, 2017 at 0:26 history edited Vaillancourt CC BY-SA 3.0
Removed blacklisted tag.
S Jun 23, 2017 at 0:26 history suggested Applekini
Removed blacklisted tag.
Jun 23, 2017 at 0:21 review Suggested edits
S Jun 23, 2017 at 0:26
Sep 29, 2011 at 15:38 vote accept ultifinitus
Sep 27, 2011 at 21:14 comment added Patrick Hughes Even a complex GUI is only dealing with a few dozen event types being shuffled around to a few hundreds of consuming objects, in my estimation. Are you building this to support a real scenario or predicting future system uses and building towards that goal? - The reason I ask is that maybe your problem might be solved by not designing a global warehouse of all events/objects (like a mainframe) but as a service that can be instanced and used independently by any number of client problems (like pocket calculators at everyone's desk).
Sep 27, 2011 at 20:36 comment added ultifinitus The event number is rather large, but not upwards of 100000 different types. That would be o.O
Sep 27, 2011 at 20:17 answer added Nicol Bolas timeline score: 2
Sep 27, 2011 at 20:05 comment added Nicol Bolas I'm confused about something. You say that lookup time is a problem when you have 100,000 objects. But the map doesn't map between object name and event index. It maps between event name and event index, correct? So the number of objects is irrelevant; what matters is the number of events. Do you really have 100,000 separate events?
Sep 27, 2011 at 17:53 comment added ultifinitus @Patrick Hughes: Yes, I have seen the signals/slots paradigm, I'm actually using it for things such as collisions and other events that only a handful of objects would care about, The startup doesn't matter, I agree.
Sep 27, 2011 at 17:50 comment added Patrick Hughes For a server it really doesn't matter how long it takes to start, the emphasis is on the per-hit performance. For an end user startup speed is vital, that's already two opposed forces. Have you looked at existing tech like signals+slots (eg. codeproject.com/KB/cpp/ElmueSignalsandSlots.aspx ) or even message passing systems like zeroMQ to help getting those events out only to objects that care?
Sep 27, 2011 at 17:27 answer added Klaim timeline score: 0
Sep 27, 2011 at 14:48 comment added ultifinitus This is my engine, so I am really going for flexibility. It will be used in server applications and end user applications (less often the first, optimization)
S Sep 27, 2011 at 14:24 history suggested Nathan Reed
add performance tag
Sep 27, 2011 at 13:01 history tweeted twitter.com/#!/StackGameDev/status/118671711913783296
Sep 27, 2011 at 7:54 comment added Patrick Hughes 100K objects sounds awful high for just a game. Is this a server or an end user client application?
Sep 27, 2011 at 5:36 comment added ultifinitus It's already implemented, and there is a bottleneck, when many objects are used. My previous comment about the lack of bottleneck was not in the application itself but actually the speed difference between the two implementations above where the same number of objects was actually handled. I was hoping for other methods of creating event systems... However some of the ideas in this thread will increase speed quite a bit, especially in the loading of the event system (11-25 full seconds load time with 100000 objects)
Sep 27, 2011 at 5:17 comment added Jari Komppa A good question is: is this really a performance bottleneck, or are you just worrying prematurely?
Sep 27, 2011 at 4:43 comment added Patrick Hughes This is kind of what Hash Maps (or Hash Table) are for, the string gets computed down to a hash number which then is used to look up directly in an array. en.wikipedia.org/wiki/Hash_table
Sep 27, 2011 at 4:35 review Suggested edits
S Sep 27, 2011 at 14:24
Sep 27, 2011 at 4:06 answer added Nathan Reed timeline score: 5
Sep 27, 2011 at 3:47 history asked ultifinitus CC BY-SA 3.0