Collision detection with entities/AI
- by James Williams
I'm making my first game in Java, a top down 2D RPG.
I've handled basic collision detection, rendering and have added an NPC, but I'm stuck on how to handle interaction between the player and the NPC.
Currently I'm drawing out my level and then drawing characters, NPCs and animated tiles on top of this. The problem is keeping track of the NPCs so that my Character class can interact with methods in the NPC classes on collision.
I'm not sure my method of drawing the level and drawing everything else on top is a good one - can anyone shed any light on this topic?