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
Tileset edge trimming
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Thursdaybloom
- Citizen
- Posts: 81
- Joined: Mon Feb 15, 2010 3:43 am
- Location: Australia
Re: Tileset edge trimming
I've not done any scrolling yet but does the Fine Tile-based Scrolling tut not recommend to draw at least 1 tile so it's doesn't just pop into view?Zot wrote:... and draw the edge tiles off-screen
Code: Select all
map_display_buffer = 2 -- We have to buffer one tile before and behind our viewpoint.
-- Otherwise, the tiles will just pop into view, and we don't want that.
Re: Tileset edge trimming
I take the viewpoint to mean the visible portion of the map displayed on-screen. I could buffer till the cows come home but until they're buffered so much they go off the borders of the window, they'll still pop into view. That'd be solution #3 in my OP, which I figure most people would use. In my case, however, I intend to have the game world only take up a fraction of the window... so I need to look at #1 or #2 (or whatever other solutions people may have come up with)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Tileset edge trimming
Help us help you: attach a .love.
Re: Tileset edge trimming
<3Robin wrote:See http://love2d.org/wiki/love.graphics.setScissor
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests