I had expected to get the first update to Puzl out by now, but I got a bit more ambitious with the music options. See, everybody wants to use their own music, but most people don’t have mods. They do, however, have lots of mp3s. So why not play mp3s?
Well, honestly, the DS isn’t particularly suited to streaming/decoding mp3s while doing anything else, like running a game loop. I’m using Noda’s excellent AS_Lib (essentially a wrapper for Real’s Helix decoder) and it’s playing back, but I can only handle low bitrates and mono. This isn’t really a problem considering the poor audio playback from the DS without headphones, but I’d be happier if people could just drop the mp3s they want into the music directory without having to reencode.
So I need to speed up Puzl itself.
Puzl expends most CPU time rendering the pieces. The original version of Puzl (a minigame in my upcoming Paniq title) used the DS’ hardware sprites, which was unsurprisingly much faster. I switched to software blits because I was running out of addressable sprite memory for very small jigsaw pieces, and running out of sprite memory period for the biggest pieces. Blitting it myself frees me from sprite memory restrictions but means I’m responsible for transparency and boundary checks, further slowing down rendering.
My solution is to move to the 3D hardware. Each jigsaw piece is a textured quad, and performance should be much better. I say should because I haven’t actually written the texture part yet - but the plain quads are certainly nice and fast. An added benefit is that I should be able to use 16-bit color for the images instead of the paletted version I use now.
Yeah, now that I think about it I don’t have the memory for that ![]()
- SiW
Leave a Reply
You must be logged in to post a comment.