Tileset edge trimming
Posted: Fri Apr 02, 2010 5:48 am
Hais! I'm new to both lurve and game development, but I've dedicated myself to learning. To that end I'm trying to construct a simple top-down 2D RPG, using tilesets.
I can thus far grasp the basics of tilesets fairly well I think, but I would like some opinion as to how to handle smooth camera movement when it comes to drawing new tiles and disposing of old ones. Two examples in the wiki that helped me a lot (Efficient tile-based scrolling and Fine tile-based scrolling) use differing means to construct a tileset that smoothly scrolls, rather than scrolling by tiles. Both also stop short of addressing the jarring popping of tiles into existence as the camera moves.
As far as I can see it, there are three ways of fixing this:
- Draw only portions of the edge tiles, strikes me as somewhat complicatory
- Draw a border to overlap and hide the edge tiles and thus the popping/disappearing tiles (this is my first choice)
- Enlarge the visible game area and draw the edge tiles off-screen
Just wondering what other people have done
I can thus far grasp the basics of tilesets fairly well I think, but I would like some opinion as to how to handle smooth camera movement when it comes to drawing new tiles and disposing of old ones. Two examples in the wiki that helped me a lot (Efficient tile-based scrolling and Fine tile-based scrolling) use differing means to construct a tileset that smoothly scrolls, rather than scrolling by tiles. Both also stop short of addressing the jarring popping of tiles into existence as the camera moves.
As far as I can see it, there are three ways of fixing this:
- Draw only portions of the edge tiles, strikes me as somewhat complicatory
- Draw a border to overlap and hide the edge tiles and thus the popping/disappearing tiles (this is my first choice)
- Enlarge the visible game area and draw the edge tiles off-screen
Just wondering what other people have done