Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sprite batch drawing examples  (Read 1292 times)

0 Members and 1 Guest are viewing this topic.

TheGameSquid

  • Newbie
  • *
  • Posts: 3
    • View Profile
Sprite batch drawing examples
« on: June 06, 2014, 08:36:03 pm »
Hi,

After working with other libraries and frameworks for a while (MonoGame, libGDX, etc.), I've come back to SFML because I love its clean, modular and simple approach.

However, because I usually attempt to make tile-based games (with maps in size comparable to games like Dwarf Fortress, Rim World, etc; often maps larger than 100x100 tiles when zoomed out), I do sort of miss the easy built-in sprite batching found in other frameworks.

My previous approach to limiting the amount of GPU draw calls was to put everything in Vertex arrays (usually I would split this up into 1 call for the map tiles, one for all living entities and one for objects visible on the map). However, my implementations of this were usually kind of messy, not very clean and totally not reusable in other projects. I'm not a professional programmer unfortunately :(

So I was wondering if someone else had some nice, reusable examples of sprite batch drawing lying around. Language doesn't matter (I'm currently using JSFML cause I'm building for Linux this time around, and well... I failed my C++ exam back in school  ;) )

Thanks!

 

anything