Thoughts on Corona

Posted 2 weeks ago, under Game Dev
3 comments

@jasonmontalto asked me ‘Now that you have put some time on Corona… Hows the workflow compared to AIR? Hows the performance? File size?’
My comments and observations of using Corona come from only targeting the Android platform, with 3 specific low level casual games, shown in this blog post: pixelpaton.com/?p=4742. I’ve got very limited time so excuse me if this comes across rushed, it is.

Workflow
Coding in Corona with Lua is VERY rough and basic, essentially text editing. But the VERY fast compile times go a long way to making up for that. They are basically instant. The desktop simulator
Using the built in physics is extremely useful and robust, collision handling was all taken care of really well and performance for what I did was great.

I have to say there was something cool to be able to just edit a text file (.lua) and instantly see the results. Though I have ended up with some VERY long text files, ideally I would prefer to break these down into more classes and files as I started having trouble finding functions. For me, this is really just about understanding how to work with the language better. In these 3 cases I was more focused on result than producing nice code.

I started out my main work with Corona in building a framework similar in function to how I do in Flash, with a ‘DisplayManager’ to handle different screens and switching between them. I ignored the built in framework for handling this as I figured (correctly) that I would learn more by trying to build my own.

There are most definitely a few gotchas, having sub folders to store ‘classes’ either involves using workarounds or just working with a flat structure, which is what I did, ends up quite messy, but got the job done.

Also of note, Lua is a dynamically typed language and coming from the strict typing of AS3 took me a while to ‘relax’. Also variable scope is something that takes a while to understand, and I still don’t completely get it, but given that I worked with the language for less than 2 weeks, its not an issue of the language, its my understanding.

There is no library as Flash has, or asset .swc at least not as far as I found. As everything visual is based on bitmaps being loaded to the gpu, I found it very easy and quick to create elements within the games. For example the following line loads in a png and places it on the stage:
local santaBody = display.newImage( “content/santaBody.png” )

Performance
Although I’m not pushing any limits with the games I’ve made, performance was awesome. Even on the Nook Colour which is one of the slowest tablets I’ve developed for. Corona performs well by compiling to a native application and totally leveraging the GPU for all it’s rendering. The Nook played these games without fault. The game boing boing santa has about 100 snow ‘particles’ which are individual objects that have their own basic behaviours. Nothing ground breaking obviously, but for the game it worked beautifully.

Filesize
File size for my finished games have been around 5-7mb size for these particular games. It took me a while to realise that anything in the development folder would get compiled in to the published .apk file which meant my files were coming out at 40+mb because all my psd’s etc were being included.

Thoughts
I had great fun playing around with Corona, found it extremely quick and easy to use, the lack of strict typing was a nice reminder of my speedy actionscript 2 days. Less ‘typing’ is less typing.
The lack of robust debugging is troublesome, but typically I just use a lot of trace statements in Flash anyway (in Lua they are ‘print’) so it wasn’t too bad for me.
The built in physic engine, disposal of objects and general structure of the platform grew on me very quickly.

Doing bigger projects/games with Corona would take some more planning than the make it up as I go along approach I took. Doing a few games has helped me understand how I might do future projects better from the ground up.

In adapting to use the Lua language and working out the ‘gotchas’ of Corona, I had 3 specific moments of ‘Fuck this! I give up!’, but really that was my frustration at learning how to do something new. And is expected it when I tried something with such a different approach to my normal way of working.

I highly recommend playing around with Corona, the demo lets you even publish on your own device (not to markets).
www.anscamobile.com/

3 comments so far, add yours

An game in HTML5?! WTF!

Posted , under Game Dev
No comments yet

A GAME IN HTML5!? Yes that’s right, who knew it was possible eh? ;P

The talented Brad Manderscheid (@bmanderscheid) has been working on an HTML5 canvas version of my often frustrating Flash puzzle game ‘Flipit’.

This project has partly been a learning exercise for Brad, and he’s avoided sound in this version due to compatibility issues between browsers and systems (Rather than get stuck on adding a feature sometimes better to just ditch it and move on). I remade all the levels in this version as my original game got WAY to hard too quickly.

The following link should take you to a version that will play on your desktop, or redirect you to one that will work on mobile with touch events. The iPad is by far the best performer with this game, so if you try and run this on an Android device, expect it to be SLOW.

actionmousegames.com/flipIt/

High scores in the game are powered by the awesome www.scoreoid.com/, check them out if you want an easy cross-platform, cross-technology scoring (and more) backend system.

You can play the original Flash version here: mrtobi.com/flipit-2/

Here’s some screenshots showing the game in action:

Leave the first comment

3 games finished with Corona SDK

Posted 2 weeks ago, under Game Dev
4 comments

Got to say I’m impressed. I’ve now finished my 3rd quick game with the Corona SDK and have greatly enjoyed the process. I’ve kept these games purposefully simple and focused on finishing them, rather than making complex games from the start.

Working on games of this level has helped me get to grips with the differences between Flash and Corona. One of the big differences is Actionscript 3, which Flash uses is a strongly typed language and Lua, which Corona uses is a dynamically typed language. This brought back memories of the very loose style of coding I used to use in Actionscript 2, and has been fun and painful at the same time.

Performance of Corona for mobile is really good, especially given the games that these games I’ve developed have been extremely simple. Personally if I was working on more complex games I may have trouble with coding in a text editor as I have been with three, and I’ve greatly missed the tools within Flash Builder that I normally use, such as a code formatting plugin … I rely on it heavily normally.

I encourage you to give CoronaSDK a look, if only to see another of the options out there as a game developer. Its not free, but it’s not THAT expensive, and you can test on your own devices with the demo version. I found it extremely quick and easy to use, and if you’ve been watching my work you can see I’ve made these 3 games with it in just over a week.
Check it out Corona SDK here: www.anscamobile.com/

I haven’t yet tried publishing these games to iOS, as I have primarily made these games with a focus on publishing to the Barnes & Noble ‘Nook’, which is Android based. I didn’t demo on my Nook as I was having some trouble side loading the applications after a recent software update, but my previous tests showed performance was equivilent to what I show in the videos below.

Here’s 3 videos showing the games in their finished states:

Minefield:

Escape:

Boing Boing Santa:

What might interest a few people is how I designed the levels for ‘Escape’ using Lego to physically make level that I then translated into data by hand. Unfortunately given that I’m going away for 3 weeks in a couple of days I REALLY don’t have the time or focus to go into detail about this, sorry.

4 comments so far, add yours

HTML5 version of Flipit

Posted 3 weeks ago, under Game Dev
No comments yet

The talented Brad Mandershceid has been working on an HTML5 canvas version of one my games ‘Flipit’ and I’m excited to show how it’s coming along. I know Brad’s tested the game running on the iPad, but seeing as I have a couple of other devices here I thought I’d give it a quick demo on those so he (and you) could also see how it’s performing. Brad hasn’t optimised for these other devices, so although the performance is slow, it’s great to see it works fine anyway. Awesome work Brad.

Sorry the video gets blurry towards the end, forgot to set me camera to autofocus and as always pushed for time …

Leave the first comment

Corona – Escape

Posted 3 weeks ago, under Game Dev
2 comments

I don’t have much time to write this post, so I’ll leave it mostly to the video. Here’s a demo of another game I’m working on using the Corona framework. This uses the phsyics engine, and is based on an old Actionscript 2 game I made a few years ago. This is running on a first generation Galaxy Tab.
(Sorry about the quality I didn’t have time to get conditions better)

2 comments so far, add yours
Older Entries
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.