Sifteo cubes are awesome. They are awesome and they are slow. The simple 16×16 cellular automata smoke effect Peong uses was dragging my framerate to the ground. It’s just a 16×16 matrix but the update was eating the bulk of my framerate. I wanted to see how high I could push the fps with some optimization. I finally got it running at a solid 60Hz on all 3 screens during gameplay but this is all running in an emulator so it’s hard to say how it will look on actual hardware. The emulator reports that the screens themselves are refreshing at a maximum of around 35Hz so that may be the limiting factor.
Initially I was using floating point math for the effect, this is convenient but unnecessary and slow on the Sifteo processor. Now it’s using a integer based solution which is much faster. It also really helped to pull conditional branches out from the inner loops in a few key places. I’m pretty much out of low hanging optimization fruit but it’s running at full refresh so that’s good enough to move onto something else.
It runs fast enough that I was able to use bg1 to draw the connection and wall notifiers with 1 bit alpha. This opens up the space and demos the tech a little better I think. I also simplified the rules and increased the overall speed a bit so it is more challenging. The game flow has also been streamlined to be more intuitive and easier for players to see their scores between points. There’s also a neat pulsing effect after a point to notify players that it is their turn.