Spirals and Pinches

23 April 2011

Last night I had a burst of inspiration. All this time I’ve been trying to implement pinch-to-zoom in Distant Star via various OpenGL tricks, like rendering the galaxy into a texture and mapping that texture onto a screen-sized rectangle — it works, technically, but the end result always looked just appalling. My burst of inspiration, of course, was that I didn’t need to scale any textures — in fact, I could totally fake it, and the result would be easier to render and look way better.

So, umm, that’s sorted.

Anyway, I’m testing pinch-to-zoom on all the devices I own, running it through a bunch of games and looking for bugs. One problem I’ve already found is that it causes a slightly slowdown in massive games with lots of AI opponents; it’s not game-breaking, just annoying.

I’ve also backported a spiral galaxy generator I whipped up last weekend as a proof-of-concept: large games are way cooler with legitimate-looking spiral galaxies instead of the rough grid they’ve used up until now. Take a look:

Spiral galaxies! Zooming! Zomg!

I’m insanely glad to be done with the iPhone port; these kinds of gratuitous features are so much more fun to write.

~