How to build a Tiled map in Java for a 2D game?
Not sure how to approach this problem. Basically, I want a Pixel -> Tile representation of a 400x400 window. Each coordinate on the screen, e.g 120x300 should be part of a tile. My smallest sprite is 4 pixels, so we can say that 1 tile = 4 pixels. The player and enemy sprites are all 20 x 20, so each player/bad guy will occupy 5 tiles. Then I want to use this Map class to: Retrieve the x/y coordinates of a player/monster sprite by suppling the index/id of the tile. Knowing where the boundaries are, so it doesn't move the sprite beyond 400x400 , thus hiding it. Collision detection, knowing