The Magic Math Puzzle

an interlude

Here’s an interesting puzzle. I saw this a long time ago in one of my favorite crime novels, Death from a Top Hat by Clayton Rawson. In the book the detective, who is a magician, tries to explain how magic tricks work by using this math problem.


Chopper Command: Sprites with Löve

the hard way

In the book Löve for Lua Game Programming I mentioned in my previous post the author shows examples of using external libraries with Löve to control various things, such as animations. The Löve website has a long list of these libraries and they certainly make life easier. But as I wanted to port most of the code to other frameworks, I decided to do things the hard way. So here’s how I created the sprites for the game in Lua.


Chopper Command: OOP in Lua

take your pick

So Lua and OOP have the same problems as JavaScript and OOP. Namely, too many ways to do it, and none of them as good as the real thing. To be honest I prefer the way Lua handles the hacky side of forcing OOP concepts into it. JavaScript makes everything uglier, somehow. There are two ways I’d recommend using OOP with Lua: Metatables and Patterns. Each one has its time and place.


Chopper Command: the Löve version

from actionscript to lua

I was asked by Packt publishing to review the book LÖVE for Lua Game Programming and it just happened to coincide with the fact I was about to start on turning the Chopper Command project into Lua. My original plan was to move straight to Gideros, famous for having an API somewhat based on Actionscript’s. But the book on game development with the Löve framework changed my mind quick.


Chopper Command: Adding Control Overlay

final touches

Now the extra final step in the gameplay: adding the controls for the touch screen version of the game. Since I’ll need to support one OR the other I won’t add logic to support both at the same time.