Sign in to follow this  

Question about game events

This topic is 1273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This topic is 1273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this