c++ - How do game events work? -


I'v always wondered how it works. Is the game slowing down? For example, if a car is flipped, how would it show it? This can be seen in this form:

  if (player.car.angle.y == 180 ) {Something}  

Whatever is my puzzle I, when will it play games? The way I see it, whatever can be done in the game, it appears that if I'm just wondering how it is handled.

Also, since the game runs through a loop, what if the car is flipped over 1 frame, whether the boolean will actually be used to check whether the event

In most general terms, any object in the engine is a state - if it changes the state ( Like not flip to flipped ), it is a transition.
With an infection you can not fire an event or not, but as the infection happens only when the changing situation will not be removed once again.

For situations that trigger the infection, they have to be coded from somewhere. Sometimes these are more clearly coded, but most of them are given the parameter so that the script or any kind of configuration can easily change them.

How it is implemented finally, it is widely vary, depending on the libraries used, as well as the engine design itself.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -