Hey
What is a good way to handle the NPC Collision?
In a tile base game?
I already did it but I think its very bad so I want to know how you make it right.
For now I make a Rectangle for each NPC.
And for the Player.
Then I check if the player Rectangle intersects the NPC Rectangle.
The Problem is if in one Map are 10 NPCs I have to make this 10 Times:
if(PlayerRect.intersect(NPCRect[0]) ==false && PlayerRect.intersect(NPCRect[1] && PlayerRect.intersect(NPCRect[2]) )
Its ok but how do you do it?