Hey there,
so i'm drawing a level on the screen, basically just a set of tiles (which each are 16x16px)
But the level is likely to exceed the space on the screen, thus i'm wondering if its enough to set a scissor of the full window size (or is that unneeded/the default) to not waste time trying to draw tiles that aren't on the screen anyway; or if it would performance-wise be better to calculate which tiles are actually on the screen and only draw those anyway.
Scissor Speed
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Scissor Speed
The best tile optimization you can do is to use a SpriteBatch (explained a bit more here.)
If you're drawing individual tiles with love.graphics.draw, it will probably be much more efficient to calculate and draw only the onscreen tiles rather than just using a scissor, depending on how your tile data structure is set up.
SpriteBatches and Sprite Sheets go hand-in-hand: http://www.codeandweb.com/what-is-a-spr ... erformance
If you're drawing individual tiles with love.graphics.draw, it will probably be much more efficient to calculate and draw only the onscreen tiles rather than just using a scissor, depending on how your tile data structure is set up.
SpriteBatches and Sprite Sheets go hand-in-hand: http://www.codeandweb.com/what-is-a-spr ... erformance
Re: Scissor Speed
Ok, looked into that and had some help on the LÖVE IRC also Thanks
Who is online
Users browsing this forum: No registered users and 2 guests