Jump to content

  • Log In with Google      Sign In   
  • Create Account


Question about game events


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Irlan R.   Members   -  Reputation: 1404

Like
0Likes
Like

Posted 18 June 2014 - 05:43 AM

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

 

?



Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 4858

Like
1Likes
Like

Posted 18 June 2014 - 05:49 AM

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!



#3 Irlan R.   Members   -  Reputation: 1404

Like
0Likes
Like

Posted 18 June 2014 - 04:22 PM

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.



#4 SeanMiddleditch   Members   -  Reputation: 4763

Like
4Likes
Like

Posted 19 June 2014 - 04:57 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS