Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
13. December 2013


Sorry for the bad pun, I really am.  Not sorry enough not to make it mind you!

Anyways… Love 0.9.0 was released today.  In case you haven’t heard of it, Love is a 2D Lua based game development framework that was previously featured in the Battle of the Lua Game Engines post.  From the release notes:


After a very long year-and-eight-months since the previous version’s release, LÖVE 0.9.0 is out at last!

The full changelog is massive, easily the biggest in LÖVE’s history (when counting by number of individual changes listed). It can be viewed down below as well as in the Wiki. Here are some of the more noteworthy items:
LuaJIT is now being used by LÖVE by default for most operating systems. Depending on what’s bottlenecking your game’s performance right now, your framerate could skyrocket just by updating to 0.9.0!

ENet: real-time networking in games is a complicated topic. Thankfully, people have created libraries to help deal with some of the lower-level nuts and bolts. One such library is ENet. LÖVE 0.9.0 includes the lua-enet wrapper for the ENet library (alongside the existing general-purpose LuaSocket library), so you can easily use ENet’s features in your games with require("enet").

love.joystick: previous versions of LÖVE had support for joysticks and gamepads, but the love.joystick module was lacking in some key areas.
Version 0.9.0’s joystick module has been completely revamped – Joysticks are now actual LÖVE objects, they can be hot-plugged and removed at will (with event callbacks to match), gamepad motor vibration is now supported, and issues with differences in gamepad buttons and axes across operating systems and gamepad models is now much easier to deal with thanks to the new abstracted Gamepad API.

Windows (not the Microsoft variety): functions for dealing with LÖVE’s window have been split from into the brand-new love.windowmodule. The new module also includes new functionality (and better handling of the window in general, thanks to SDL 2): it’s now possible to use resizable, borderless, and “fullscreen-desktop” / “fullscreen-windowed” windows, as well as to choose which monitor the window will use. Along with some general house-cleaning of this module and performance improvements to, ParticleSystems, and SpriteBatches, lots of new graphics functionality has been added. Arbitrarily textured and colored polygons can be created thanks to Mesh objects.Shader objects (renamed from PixelEffects) can now be vertex shaders as well as pixel shaders. Mipmapping support has been added to images, compressed texture formats can be used now, and that’s only a handful of the new features in

love.math: Another new module! This one includes mathematical functionality relevant to games: a PRNG (and random number generator objects), polygon triangulation, Bézier curve objects, a Simplex noise generator, and more goodies.

love.thread: The thread module has an entirely new way to communicate between threads: Channel objects. It's much more flexible than the old API.
There are many more new features, but reading paragraphs about them can get tedious. Check them out on the wiki!

LÖVE 0.9.0 breaks compatibility with nearly every 0.8.0 game.

Several functions have been renamed (and some functionality has been changed or removed) in order to provide a more consistent and clean API experience. Often this will mean simply renaming some functions your game uses, but it will be rare for a game to work completely in both 0.8.0 and 0.9.0 unless it is written to do so.
Check the wiki! It will tell you what the new name of a renamed function is.

0.9.0’s Mac OS X system requirements are higher than 0.8.0’s: it now requires Mac OS 10.6+ and at least an Intel Core 2 CPU (~september 2006 or newer).


Full change log available here

Head on over here to get started.


30. June 2013


Some time back I purchased Codea for my iPad.  Codea is a Lua based game programming kit for creating iOS games on the iPad and frankly it’s really kinda cool.  That said, actually typing code on the device is a bit of a pain, so I looked coming up with an alternative.  It worked, but it certainly wasn’t ideal.  Today I was on the AppStore and I noticed Codea had an update and added something called Air Code, which allows you to connect to Codea using your web browser.


Using Air Code is really easy, in Codea on your iPad, open the side menu and select AirCode:



Then it will tell you the address to open in your browser.  Your computer and iPad need to be on the same network for this to work:



Open that address in your desktop browser and a list of your available projects will be displayed:



You then select the code file to edit and the editor appears:



As you code in the browser, it updates live on the iPad:



That is very very very cool.

Right now the editing functionality in the browser is quite limited.  It’s basically a text editor only now.  Hopefully in the future they add intellisense support and possibly debugging.  This is a very nice start though, and easily gets around the lack of keyboard support.  Nicely, this process doesn’t require a Mac either, any web browser should work fine.  Coding on one screen and seeing the changes reflect live on the other is actually a very intuitive way to code.

I did run into a small bug, in that focusing away from Codea to check email, when returning I could no longer connect via browser.  Shutting down and restarted Codea fixed the problem.

So, if you have an iPad and another PC and want to create games, Codea is a very cool product and worth checking out!

Programming News

17. June 2013

Dreemchest, the Lua based cross platform 2D game engine (and GFS sponsor!) have just released RC147.  The biggest new feature has to be the ability to publish your game to the Flash player.  That said, there were a number of additional improvements including support for ads and in-app purchases, two features that are basically a game engine must have these days.  The complete list of announced new features is:

  • Composer preferences dialog
  • Built-in updater
  • Properties of type StageObject
  • Exporting iOS apps to IPA
  • iOS small icon inside project settings
  • InApp purchases
  • iAds advertisements
  • GameCenter
  • Cryptography
  • HTTP requests
  • Samples for Ads, GameNetwork, InAppStore, Swipe
  • Compressed bundle option for command line packager
  • Asset browser filters
  • OTF font extension
  • Breakout sample game
  • URLRequest sample project
  • Crypto sample project

Dreemchest is currently available as a free download for MacOS and Windows.  You can download RC147 right here.


29. May 2013

So, some time back I took a look at all the various different Lua game engines and at the time one of the biggest strikes against Corona compared to it's competition was it's price.  However, about a month ago, Corona announced Starter Edition, a completely free ( non-trial ) version!  So I decided to give Corona a closer look today and my god is it annoying the hell out of me!


I am using Zero Brain studio and Sublime Text for development and both result in a simulator reload when you run your code, which in turn results in:



Worse, the window doesn't even draw focus, so you have to tab over to it and click Continue before it will run the simulator.  It may seem like a minor annoyance, but trust me, within about 10 minutes I was ready to smash my computer.  The first time I thought, oh… that's why my app didn't load.  The second I got a little annoyed… after the 10th time seeing that message… well, I wrote this post.


Of course, I could just keep the simulator running, and instead of running from the editor, do a CMD+R to reload the app but this has a couple downsides.  First, this means I need to keep the simulator running and it's a battery sucking application and I'm on an unplugged laptop ( and normally this is the case ).  Second, well, it's an annoying process.


Fortunately I found this thread:


Hi @kodewulf,

Yes, we're aware of it, and we realize that it's somewhat obtrusive, especially if you build frequently. We intend to change this (to appear less often or something like that) but that must wait until the next public build. That being said, we intend to ramp up the frequency of public builds somewhat, so the wait won't be as long as you might imagine. In the meantime, this must remain "as is", and I apologize for the inconvenience.



Brent Sorrentino


So they appear to be aware of the problem. That said, that post was dated April 19th, so I'm guessing this fix fell off the radar.  Just a heads up if anyone at Corona Labs is listening, this may seem like a minor point, but its annoying enough for me to stop using your product!  Little things that directly impact workflow… especially for no particularly good reason, they just have a way of getting under your skin!

25. April 2013


As you may know from previous posts I am rather a big fan of Lua based game engines.  When I learned about a new one completely off my radar, I just had to check it out.  The game engine in question is Dreemchest.



As I mentioned earlier, Dreemchest is scripted using Lua.  Underneath Dreemchest is powered by a C++ core.  In terms of other Lua game engines, Dreemchest is probably most similar to Corona in scope.  It comes with a WYSIWYG editor and somewhat uniquely, enables you to use Flash to create your user interface.  Unlike Corona, you don’t need to authorize against and build on their servers, everything is done locally, I know some people really hate that about Corona and Gideros ( and more recently Loom ). Oh yeah, it’s also free(for now?).  Let’s jump in and take a look at Dreemchest.


First things first, you need to download Dreemchest, which you can do right here.  It is available for Windows and MacOS, although I have to admit, the MacOS version seems to be a lot less stable right now, so if you have a choice I would consider choosing the Windows version.  There is no installer, simply download the archive, extract it then run composer.  Dreemchest seems to be a Qt app, so I’m a bit shocked a Linux build isn’t available.  Then again, Linux is a fairly small sub-set of the population, so maybe that’s a down the road feature.


Meet Dreemchest Composer.


Dreemchest Composer in action


This is the WYSIWIG environment in action with the Animation sample loaded.  Currently there are over 20 samples available showing you how to perform various actions in Dreemchest.  As you can see from the Window above, it’s a pretty sparse environment, but most of the information you need is available.  Across the top is the toolbar you would use to configure and run your application.  Below the is the WYSIWYG editing area and below that is the output panel.  On your right hand side is the Property window, which is populated dynamically by your script objects, allowing you to view and configure values visually instead of in code.  Below that are your assets, that you can import, create then drag and drop into your scene.


The UI itself is incredibly customizable, every dialog can be detached, moved or closed, leaving you law things out exactly as you want.



Coding and documentation


So, where exactly do you do the coding?  If you have the Animation sample open, take a look at the assets panel and you will see a pair of script objects, App and Hero.



Double click one of these script files and it will open in the integrated text editor.


It’s a fairly barebones editor, but it does what you need including syntax highlighting, auto-completion and automatic indention.  It’s nice not having to switch apps to edit code.


The programming language itself is standard Lua 5.1, with an class inheritance system.  If you know Lua you will be immediately comfortable with Dreemchest.  If you press play or F5 to run your application, it runs directly inside Dreemchest:


As of right now, debugging options are quite light.  You can alter position, from portrait to landscape, simulate home button press and not much else.  Oddly enough, once the application is running, you see the options traditional debugging options, such as step in, step out and continue.  That said, I cant figure out how to add an actual breakpoint.  My guess is, this is a feature under active development.  I look forward to it too, as for now you would be limited with printing to the output window while debugging.  Build and load times are virtually non-existent, which is nice.


From a coding perspective, there is a pretty good amount of documentation, especially for such a young project.  As mentioned earlier, there are currently 20+ samples included with the download.  There are a series of tutorials available here as well as an API reference available here.  The API is quite straight forward, somewhat minimal, but still under developed.  Pretty much everything you need to create a 2D game is currently there, including graphics, tweening, audio and physics.  For physics, there is also an integrated shape editor which is rather convenient.  Still under development, new functionality is being added with each release.  This is critical though, as you don’t get source code, so you need all functionality needs to be in box.




Perhaps the most innovative feature of Dreemchest is the ability to embed and communicate with Flash objects for creating your UI layer.  You can included an SWF file just like you do any other graphic file.  The swf file can contain ActionScript2 code, and the two languages can communicate back and forth.  Here is a simple example from the SDK on working with a Flash animation, showing how you can load and communicate between the languages.  uiButtons is the swf file that has been added to the scene.

class "Main"( StageObjectContainer )

function Main:main()
    -- Register necessary functions for Flash UI
    UIManager.registerFunction( 'nativeSetPitch', function( value ) trace( 'Pitch set to: '..value ) end )
    -- Attach to events dispatched from Flash UI
    UIManager.attachListener( 'uiStop', self )
    UIManager.attachListener( 'uiToggleMusic', self, 'onMusicToggle' )
    local ui =
    self:attach( ui )
    -- Notify Flash UI by dispatching an event
    UIManager.dispatchEvent( 'onRefresh', { version = 104, message = 'hi there!' } )
function Main:uiStop( e )
    trace( 'Stop the music' )
function Main:onMusicToggle( e )
    if e.pause then
        trace( 'Pause music' )
        trace( 'Continue music playback' )

This allows you to use the rich UI functionality of Flash/ActionScript for your UI layer, while performing game logic and rendering in Lua.


Building your application


When it comes to creating and deploying your application, that’s a pretty simple process.  Simply select the File->Export menu and select the platform.  You need to have a Mac to build iOS or OSX target.  You need to install the Android or iOS SDK and point Dreemchest at the proper directory before you can export to either platform.  The results of the build (an apk in the case of Android) are in the output subdirectory although I had to do a bit of searching to figure this out.






Dreemchest is certainly a young engine, but it has a great deal of potential.  I did experience crashes and a few UI glitches, although the newest release seems a great deal more stable.  I’m actually quite surprised by just how much it did improve in just a couple weeks, this bodes well for the future. This is certainly an engine worth keeping an eye on, especially if you like Lua and are targeting iOS or Android.  It may not be for everyone, if you need source code for example, Moai is a better fit.  But if you are looking for an all in one accessible toolkit, Dreemchest is a good pick.  Of course, it’s free too, so you’ve got nothing to lose by checking it out.


AppGameKit Studio

See More Tutorials on!

Month List