I just started work on a top-down rpg, "pokemon" style kind of game. I've already implemented some grid-based movement for the player and NPCs. I have a function checking if the grid-space a character plans to walk too is walkable or not, but it does not handle the case where another character/object is occupying the space (in which the function should also return false).
My question: Is there a nice way to check if a pixel is occupied by ANY character or object?
Right now my only strategy is to loop through all characters/objects and check if their coordinates lye within the grid space.
Thanks for assisting a newbie