Definitely. But I am looking forward to seeing what I can do.paul doe wrote:You're welcome. The GL code is a little more complex, but only at first (as with almost anything new, no?).
I start with a lot of PNG files that already have certain graphics grouped together, such as a single character and all his animations. I wrote my own packer that lets me draw slices on such an image and give them unique data, which helps later for animation. Then the graphics of individuals slices are kept in RAM at load time so I can do pixel tests. Several sprite sheets are combined onto a single large texture and uploaded to vRam. For example all characters needed at a particular time in the game are grouped on one texture. And all graphics for the current region of the game world are combined onto another texture. I use as few slots as possible. Yes binding is expensive; I don't bind anything except between regions of the game, or when I need to change the clothing layers of a character (pieces of clothing are pre-rendered together over a character to create different outfits), which is not often. Since I work with such small graphics I can fit all kinds of stuff on a single texture.paul doe wrote:On a side note, how are you storing your assets? In the aforementioned format (texture packed), or do you pack them at load time and keep them segregated in memory?
So with shaders I could access and manipulate pixels stored in vRam? That would be pretty incredible, to draw on a sprite during runtime. For example perhaps I could draw footprints in the sand without creating new objects for each step. Also to selectively find and replace certain pixel colors/alpha values on a sprite. Not to mention the blend modes. You're coding all 21? Sounds like a lot of work!
Well, it's a sick day for me today so I'm going to get some work done on this thing.