HuskyGames Dev Diary 004

This week we’ve been playing game-development tennis in an effort to further refine our soon-to-be-ground-breaking-and-record-breaking-and-all-round-awesome iPhone game. This particular game featured many interesting rallies, which I shall recreate for you below. With words. There will be no dodgy headbands here.

  • Me: Dude! The new build is ready. The stuff moves around properly now.
  • Nofi: Just played it. The new stuff moves around all wrong. Make it move half as often, but twice as fast. With more graphics.
  • Me: Dude! The new build is ready. It’s all bob-on now.
  • Nofi: You forgot the “more graphics” bit. And it moves too fast. Make it half the speed, but it should move more often.
  • Me: Dude!
  • Nofi: Is it ready?
  • Me: No. I have no idea what the heck you are on about.

These sorts of rallies continued for much of the week until Nofi came up with the best idea he has ever had: Animated GIFs. This astounding idea brought about a new implementation of the prototype which met all Nofi’s exacting design specifications. My use of the word “all” could better be described as “some, certainly more than ealier in the week, but not all of”. Still, progress is now being made in a more organised fashion.


Aside from playing tennis, I’ve been spending much of my time getting to grips with some of the timer functionality in the Corona SDK. Timing is a significant part of the game we’re building, and handily for us Corona comes with a number of things to help with the process.

The most significant of these is the command that allows a certain piece of code to be called at specific time intervals. This can either go on indefinitely or for a specified number of executions. So, for example, if we wanted to call a certain piece of code every second we can do something like:

local timedCode = timer.performWithDelay(1000, myCode, 10)

Corona will then ensure that the function called myCode is called every 1000 milliseconds – every second – and it will be called 10 times, i.e. once a second for 10 seconds. This is prefect for what we need, but Corona has another trick up its sleeve, something called transitions.

A transition is basically Corona’s way of transitioning a display object (see last week’s blog if you don’t know what a Corona display object is) from one state to another. This provides an easy mechanism for making objects move from point to point, or grow in size, change their colour and so on. A transition can be set to run over a certain period of time, and a piece of code can also be set to run upon the completion of the transition. For example:

local myBox = new.Rect(100, 100, 100, 100) (mybox, {time = 1000, delay = 1000, x = 150, y = 150, onComplete = onMoveFinished} )

The code above creates a box on screen, and the transition then moves the box to a new set of coordinates. It does this after a delay of 1 second, and the resultant transition then takes 1 second to complete. When it has finished the function onMoveFinished is called and executed.

With these pieces of the puzzle in place, our game has animation running like clockwork, and other bits of code running on time like the British rail system.

You see, that’s the main problem this week: making everything run on time. I’ve got all the pieces of the puzzle in place. They are all running at the time I tell them to. But still it’s not quite right. And that’s why we’ve been playing game-development tennis, and why animated GIFs have been the best step towards getting all our trains running on time, every time.

Next week we hope to lay down the tennis racquets and get on with implementing the gorgeous UI that Nofi has designed. Coupled with a few more tweaks to the main game engine, and I think we’ll be close to having a game. We’ll need a few layers of polish then, but we’re closer now than we’ve ever been.

A big thank you again to the people at Ansca Mobile for their support in our gaming endeavour. Corona is an excellent product and we’re on track to add another Corona-powered game to the App Store.



  1. Good stuff, and good luck in the coming weeks/months.

  2. Thanks :-)

  3. Fantastic reading once again. Quite how you make coding seem fascinating, I haven’t the foggiest.
    You should write a book. Subject is irrelevant, you write it? I’ll read it.
    First however, finish the game. :)

    Good stuff guys, look forward to next week.

  4. You’ve got me really hyped up about whatever the game will be, plus the article itself is refeshing and interesting :) good luck over the coming weeks/months with the project.

  5. Think I’m more hyped for Nofi and Michaels game than I am for Uncharted 3. Sounds really good, keep up the insider development diaries, hopefully we’ll see some screenshots soon. Just a quick question: will it be free or will we have to pay?

  6. Dibs on the review code! :op

  7. I’m a newbie to programming so this is really interesting, not just knowing how you guys are getting on but also the coding aspect. Good luck!

    • What do you use? I’m a newbie too and am currently dabbling in Processing, it’s a great tool for beginners.

      • Haha, only pascal. My teacher thinks it’s the best program to learn the basic syntax. He says it’ll then be easier to learn other languages.

  8. If you don’t tell us what this game is soon I am going to have serious trouble stealing your idea before it is released…

  9. Thanks for the comments, guys.

    We hope to bring you more info soon like screenies.

  10. @DrNate86 Our game is a plagiarism simulator.

    @aerobes Thanks! Glad you’re enjoying the blog.

Comments are now closed for this post.