itch.io is community of indie game creators and players

Devlogs

Grid coordinate

Secret of the Basilisk (prototype)
A browser game made in HTML5

I tried a few ways to display the map and found that it’s easier for me to set (0, 0) on the left most part of the grid. It also matches the user (0, 0) position.

I also decided to set the player (and entities) position as decimal. The integer part represents the tile and the decimal part represent where in the tile the user is. Example, position (3.5, 6.5) would be in the middle of tile (3, 6).

For drawing, I decided to create a depth map. Each tile has a depth and the world will be displayed from the farthest depth to the nearest.

Read comments (2)