bitDecayGames / Jump

Tile-based platformer engine aimed at early 90's era platformer capabilities.
MIT License
0 stars 3 forks source link

Additional Collision events #80

Open MondayHopscotch opened 9 years ago

MondayHopscotch commented 9 years ago

Would it make sense to have the engine fire off events when various collisions happen, and any object can just register for these events?

Example events:

A given object can register for these and just use them to influence behavior such as:

In mario, a shell is kicked, it starts going right. It has registered to listen for the collide_with_wall event. When this event is fired, it changes it's movement direction to the opposite direction it was travelling.

There could be other uses for this, but that was one that is blatant to me.

Feedback welcome as to if this could be a useful thing to have in the engine.

Kenoshen commented 9 years ago

I could see hooking an Animation system into this.

MondayHopscotch commented 9 years ago

I was thinking of it for more of a behavioral thing, but I could see expanding the animation hooks I already built (they are pretty specific. Look at JumperStateWatcher) to use something more generic with a system like this.