Square Shooter was my first HTML5 game, and while that has allowed me to show it off easily (and brag about it when HTML5 was still fairly exotic), I always wanted a desktop version as well. And I made one! The most intense coding marathon I've ever done (500 lines of code in two days!) resulted in a game that's easier to control and understand, and looks better to boot.
Let me tell you how I did it.
This wasn't my first go at a desktop version. A previous attempt using C++ and FreeGLUT had been instructive and fun but I was never happy with the result. SDL would have been a better fit, but its C API is positively scary. So what to do?
Luckily, there are wrappers around SDL that not only make it much more palatable but also hook it up to a dynamic language, which is more to my taste. The two best known options are Pygame and LÖVE, and the choice between them is far from automatic.
I have friends who swear by Love2D and could help me in case of need.
most importantly, I already knew some Python and could find my way around the official documentation.
I also took the opportunity to overhaul the game logic, which featured bad physics, as well as some dependencies on the fixed 20 FPS speed of the original. This of course required significant rebalancing. If you never had to do that, beware of details: it's amazing what difference can result from a 20% faster bullet.
Speaking of speed, Python has a reputation for slowness, but in my experience it was more than fast enough. Just with the window background on, the game spins at an amazing 195 FPS; by the time I finished, it was down to 170-180, depending on system load. (The final version is capped at 60, to avoid wasting CPU.) Even text rendering has negligible effect on performance, unlike in HTML5 where it's more than noticeable.
On the minus side, putting text exactly where you want it is awkward. Then again, it was this limitation that inspired the new layout of the game window. But the real problem was figuring it out: the Pygame documentation really, really needs to make text handling more obvious. At first, I couldn't seem to find any text support at all! Turns out, the pygame.Font class has a render() method. But how to right-align text, or whatever? Turns out, Surface objects have a get_rect() method for that... just go to pygame.Rect to figure out the accepted parameters.
If you have Python and PyGame or don't mind installing them, you can download the new version of Square Shooter on the game's homepage.