Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 Jun 2011
Offline Last Active Oct 25 2016 09:28 AM

#5279301 Rendering 2D tiles - performance issues

Posted by on 03 March 2016 - 11:26 AM

The first thing I notice is that it looks you're issuing a draw call for every single tile. Not to mention (potentially) changing texture and shader state unnecessarily. I'm assuming, except for position, all these tiles are being drawn in essentially the same way. Instead of drawing once for every tile, just bind your shader and texture, submit _all_ the vertices and indices at once and issue a single draw call.

#4835297 [XNA] 2D Point and click games - how do they work?

Posted by on 14 July 2011 - 09:35 AM

Alternatively to cutting the image up and layering it, you could use a pseudo depth buffer as well. In it you would have key-values (graphically for editing you could use something like Magenta or some other stand-out color), then, when drawing your sprites, check the buffer at the sprite's position and don't draw anything that collides with the Magenta value.

Just a thought. I do think it would be more difficult to implement this efficiently than just layering, but, from a development standpoint it it would be quicker and simpler than chopping all your map screens up in randomly sized chunks.