Author Topic: Sprite Batching  (Read 2447 times)

Offline yaKC

  • Mc. Print
  • *
  • Posts: 17
    • View Profile
Sprite Batching
« on: 2016-Oct-03 »
Does GLBasic batch sprites as i believe Unity does, or if not has anyone had any success in doing so?

Awesome language btw :D

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Sprite Batching
« Reply #1 on: 2016-Oct-03 »
You can do that with POLYVECTORS displaying your sprite image on them. These can be very useful for drawing hundreds of sprites (eg particles etc.) in one go. To increase the speed of drawing, ensure that the images are grabbed from a single sprite sheet/ sprite atlas.
I came. I saw. I played.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1734
    • View Profile
Re: Sprite Batching
« Reply #2 on: 2016-Oct-07 »
Welcome to Glbasic yaKC!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3926
    • View Profile
    • Space Fractal
Re: Sprite Batching
« Reply #3 on: 2016-Oct-07 »
Yes POLYVECTORS is great for mest use, depend on content, but is harder to use that regular sprite commands. I'm don't use this for anything, but more tiles and such.

Welcome.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline yaKC

  • Mc. Print
  • *
  • Posts: 17
    • View Profile
Re: Sprite Batching
« Reply #4 on: 2016-Oct-09 »
Thanks for the answers and welcomes :)

I've start converting most of my draw commands over to Polyvectors (which i also love), i have quite a lot of big textures (640x360ish), 11 or so which worries me about texture size, as in a sprite atlas.

When people refer to draw calls, do they mean switiches between sprite atlases then rather than the number of say Polyvectors would actually be used for many sprites, this has always confused me.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3926
    • View Profile
    • Space Fractal
Re: Sprite Batching
« Reply #5 on: 2016-Oct-09 »
Bear in mind, you cannot use 4Kb textures on Android. For some reason that got deprecated....

So I'm in Greedy mouse needs to do a 4 pass with 2KB texture tile sheet instead.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.