Question about game events

Started by
2 comments, last by SeanMiddleditch 9 years, 10 months ago

I want to know if game events should be generated by the Game itself or, for instance, the game world can generate game events based on things that happen inside the world?

So my world can have a EventListener attached to it?

Eg.

BeginContact->GenerateGameEvent->DispatchEventViaEventListener

?

Advertisement

What will the events be used for? If they will be used for sending information about the game state, then it should probably come from the game. If it is for sending data to the game to cause a change in game state, then it should be able to come from the game itself or other systems.

So you need to clarify what these objects are supposed to be doing, and then make the design decision based on that!

What will the events be used for? If they will be used for sending information about the game state, then it should probably come from the game. If it is for sending data to the game to cause a change in game state, then it should be able to come from the game itself or other systems.

So you need to clarify what these objects are supposed to be doing, and then make the design decision based on that!

I'm saying if a Game Event is called "GAME EVENT" they're supposed to come from the GameState, or is just globals that propagate through the world, systems, etc.

If so, I don't need even have a EventListener, I can call directly each Object's Event Handler based on a certain criteria.

It doesn't matter. Different games do it different ways. Which way is best for your specific situation depends on a whole ton of details you haven't provided (and which, frankly, nobody here cares about).

Just do whatever way makes the most sense to you.

Sean Middleditch – Game Systems Engineer – Join my team!

This topic is closed to new replies.

Advertisement