Hello,
I’ve tried out a couple of coordinate systems in a tiled world.
So far I’m not convinced that any of them is really what I’m looking for.
I’m working with a pacman clone (The level is tiled, but entities should be able to move freely).
The level is tiled from a 2d array. Each tile is 16x16.
My first attempt was just to use x:y coords for both objects and tiles.
(position and index in the tile-map). This resulted in pacman jumping from tile to tile
and not moving smoothly… clearly not what I was looking for.
My second attempt was to add delta coords for objects. This allowed me to
move the objects smoothly, but I feel using a delta is error prone. And should the major coord
be changed at the start/end/middle of a move?
Now I’m thinking about using different coordinates for objects and scenery.
And add a translation method. Does this sound like a good idea?
I would also like to have objects with larger than 1x1 tile sizes in the future.
Does any of the proposed coordinate systems limit this?
Thanks!