I moved to a new URL! Check it out!

Dev Log: Atlases

Dev Log: Atlases
Getting ready to head back home to Phoenix today after two weeks of being in the Northwest! I went to Seattle for PAX then up to Vancouver/Richmond to hang out at Indie House, and now I'm back in Seattle for a little bit and I fly out tonight.

During the week I was in Indie House I got a lot of work done on my upcoming 2d framework. One of the major features that I managed to get in is texture atlas support. Texture atlasing is pretty awesome and I'm surprised SFML doesn't have any cool built in support for it, but basically it's a way to pack all of your image assets into as few textures as possible to use in the game.

Image


I'm not super well versed on this kinda stuff, but apparently one of the most expensive things a video card has to do while running a game is switching which texture it's using to draw. So if you have a game that has 100 different sprites on 100 different textures, that can get kinda rough for the video card. However, if you can pack all those sprites into one texture and use just that one texture to get all the sprite data from, the video card only has to render that one texture (hopefully) so the performance is greatly increased.

This task had been on my to-do list for awhile but it wasn't until Saint requested it that I felt motivated to actually get it working. He was working on a little game in the framework as a test and it was super motivating (and also scary) to see someone using the framework! Right now the framework only supports the Sparrow/Starling export from Texture Packer. I'll leave support for more formats up to individual users after that.

I'm still busy working on my example game for my framework that will hopefully be done in a week or two. The major tasks for the rest of the game are just art, so I just need to buckle down and draw a whole bunch of stuff. Once the example game is done I'll be taking one last look at everything and then I'll make it public for anyone to use. There are some parts of the framework that are a little weird since I learned better C# programming practices as I coded it, so some of the earlier stuff probably needs some revisions, but aside from that this thing is almost ready to go!
new comment!

Post your comment!

Name
Email
Comment