In the first article I listed some Lua-based engines for 2D games, along with libraries for object-oriented programming and utilities for making graphics. But it takes more than that to make a complete game. So in this second installment I will share some more tools that are useful for making a 2D game in Lua.
You will need programs for creating sounds and music unless your plan is to release an avant-garde silent game. If your intent is to make use of a gamer’s speakers then these tools may be useful:
FFmpeg: Here is another piece of technology which covers a lot of bases. A major aspect that I personally like about FFmpeg is that lets me easily convert formats. This is useful because it allows everyone involved with music and sound to record lossless audio, which you can later convert to a more compressed format. Often the original, lossless files for music and sound take up a lot of disk space because they contain a lot of data and metadata that is useful during composition and editing. But when you’re ready to put those files into a game you can use FFmpeg to remove that unnecessary baggage.
LMMS: Despite its name the Linux MultiMedia Studio also works on Windows and OSX. It attempts to fill the role of being a free alternative to FL Studio. It is less polished and lacking some of FL Studio’s features but in my experience it has proven to be a capable recording environment. Similar programs worth consideration are Audor, Aria Maestosa, AudioChain, and Rosegarden.
LilyPond: I won’t lie, I am listing this program because I have a geeky love for it more than anything else. LilyPond is a program for type-setting music and manipulating sheet notation. It is great for composers because of the wide variety of notation it supports, and it’s fun for programmers because of the extensible language used to actually create the sheet music.
I am not going to suggest any specific editor. I don’t feel like fighting that Holy War. However, as a game developer I believe you should do your best to use an editor that offers the following two features at a minimum:
Jumping directly to the definition of a function or variable. Exuberant Ctags is a great help for those editors which support it, as it understands Lua out-of-the-box.
Catches syntax errors as you type. We all make that mistake, and the less time you waste on it the better. Especially when the output from Lua does not make it immediately obvious where the syntax error occurs, e.g. forgetting to
enda block may cause Lua to choke later on if there is another
endthat it accidentally treats as the one you forgot (imagine an
ifnested in a
Another important programming tool is version-control software. These tools let you record the development history of your game, and that is useful for many reasons. One example is how by keeping a record of source-code changes it becomes easier to pinpoint the introduction of a bug. My personal program of choice is Git but there are many more.
Note: Git sucks when it comes to storing large binary assets like graphics and music. Since those are common in games you should consider either keeping them in a separate repository from the code, or use a different tool entirely, one which does better job handling such files. I have heard that Perforce is good for that, but I have hardly ever used it and so I cannot fairly judge it.
In the next post of this series I’ll share a long list of game-related Lua libraries that I’ve come across. I thought about including it today but odds are that list will be very long, hence the omission. As always, please share any tools you find useful for game development, even if they’re unrelated to the topics above.