Should my game handle collisions in the Player object?
Posted
by
user1264811
on Game Development
See other posts from Game Development
or by user1264811
Published on 2012-06-06T14:23:49Z
Indexed on
2012/06/12
22:49 UTC
Read the original article
Hit count: 154
I'm making a 2D platform game. Right now I'm just working on making a very generic Player class. I'm wondering if it would be more efficient/better practice to have an ActionListener within the Player class to detect collisions with Enemy objects (also have an ActionListener) or to handle all the collisions in the main world.
Furthermore, I'm thinking ahead about how I will handle collisions with the platforms themselves. I've looked into the double boolean arrays to see which tiles players can go to and which they can't. I don't understand how to use this class and the player class at the same time.
© Game Development or respective owner