HuskyGames Dev Diary 008

I tells ya, the match engine is a tricksy little thing to implement. At its heart it’s simple; pass, run, tackle, shoot. Think about it for a moment though and it becomes a tad more complicated. Which direction is the pass going? And how far will it go? Is it a successful pass? If so, who is the recipient, and if not then where does the ball end up?  All this has to be tied into the team manager’s tactical choices and the player’s individual skills. And that’s just passing.

It’s been a much longer process than my naturally pessimistic outlook indicated, but the match engine is finally in a state whereby match results can be generated. Now comes the good bit; the tweaking. Despite best intentions and design, you rarely implement something perfectly on the first go. That’s where tweaking comes in.  Right now the results being generated are consistent, without being too predictable.  There are some issues though. The most annoying is that when two equally-but-poorly-skilled teams meet, it’s rare for them to score. Obviously, that’s not realistic as even when two rubbish football teams meet they often score goals. It’s an annoying little bug, which will require some careful tweaking, but at least I now have the base to do that from.

– ARTICLE CONTINUES BELOW –

As regular readers know, at Husky Games we’re using the Corona SDK from Ansca Mobile as our development technology of choice. We chose this because of the ease of development Corona enables when compared to the traditional Objective-C route. Plus, of course, Corona is multi-platform, meaning code can be written once and deployed to iOS and Android devices, and even to the Nook colour. It’s my hope that Ansca will continue to expand this list of target platforms and that one day we’ll be coding in Corona and releasing on Sony’s NGP. We can dream.

Ansca is very good at promoting its product and takes every chance it can to let people know how good it is. Recently, Ansca posted an interesting Tweet which contained a link to a comparison of performing a simple task in Corona and Objective-C: drawing an image to the screen. You can find the comparison here: Corona v Objective-C image display.

Basically, to display an image in Corona takes one line of code. And it’s an easy to understand line that someone without coding experience could proably decipher. Whereas, in the example provided, Objective-C takes many lines to perform the same thing. I’m not an Objective-C expert, so I can’t vouch for how accurate the number of lines is, but I can vouch for the central idea behind the link: that hiding implementation complexity frees programmers to get more done in less time.

I think it’s a very important point for anyone considering coding on the iOS platform. You will sacrifice some performance for the ease of use, but will your apps really need the performance you’re sacrificing?  In most cases, given the apps Corona is well suited for, I think the answer will be no. You’ll gain more from a faster, easier implementation than you will from performance.

Of course, there are always trade-offs and Objective-C’s performance – and, to my mind, lovely OOP implementation – are two things you may require. But, it’s a bit like the difference between the Apple iPad and other, more open, tablets. You may be missing out on some features with an iPad, but it does everything so well and so intuitively, that for most people it’s not worth considering another option.

Now, having whetted your appetites by mentioning OOP, I’m going to leave it here for this post. But next time I’m going to go all technical and talk about how I’m implementing OOP in Lua, the language the Corona SDK uses.  It’s…odd.

As always, I’d like to thank Ansca for their support and for their continual development of the Corona SDK.

– PAGE CONTINUES BELOW –

21 Comments

  1. So The Sixth Axis is dealing with the development of tough dogs that live in the frozen north eh?

    In this part of the world we’re more interested in hysterical news reports of what will happen to Civilization after the PSN hack…

    Good doggy. Put that clause in the correct place, and make sure that double-precision variable is of the type you really think will handle the data. And what about error trapping? That can’t be solved by having another Bonio you know…

    • If you aren’t interested in the article, please dont comment. Thanks.

    • Well, I don’t think PSN being hacked has really affected Firaxis much. I mean, Civ Revolution is a few years old now, and Civ V was only just released 6 months ago.

      Depends on how well those games sold, now doesn’t it?

      (PS. Yes, I’m deliberately being completely dim and frustrating ;)

    • Whats the point?

    • What the hell are you on about?If you have nothing to say about the article then please don’t post.

  2. Interesting “bug” with the two poor performance teams not scoring. I hadn’t ever considered that in a game until now!

  3. A lot of this passes over my head, but I’m always rather intrigued by developers blogs, especially when they delve into the nitty and gritty of a project.

    With the scoring bug, I think that’s something similar to what I find in FIFA. I totally suck at it, and just break out a copy of the game from a few years ago to play vs. my brother occasionally. When we play with lower star teams, it’s just so much more difficult to score with them, even though we can get through defences easier etc.

    Or maybe it’s just because I’m hopeless at FIFA in general. :P

    • Nope, Defences on Fifa are definitely overpowered, apart from the goalkeepers, who are lousy apart from a select dozen (who even them act bizzarely sometimes).

  4. What an interesting read. It gave me a bit of an insight into what goes on during the developmen stages.

  5. Wow, that Corona V objective C made me laugh.

  6. Mmmm….Corona, stick a slice of lime in it, see if that helps :p

    • That’s all I can picture every time I see the name. It’s a brilliant distraction. :D

  7. What’s with the stupid comments from people all of a sudden?

    Anyway, might be too early to think about it but what will the pricing of this amazing sounding app be?

  8. These pieces continue to go way over my head but they’re very interesting just from a point of view of seeing how much work goes into these things.
    It’s an amount I never would’ve imagined really, makes me feel even worse about developing houses and the like going under.

    Great analogy with the football by the way, that part I did understand! :D

    Good reading.

  9. @Spotter5 Well cheap!

    @aerobes Thanks :-)

  10. I’m developing a game right now for my Uni course, hoping that I won’t fail.
    It isn’t easy, is it? :(

    • What’s it about, can you release details? If you manage to get it released, I’d like to support it. :)

      • It’s just a silly little game where you fire a ball at a target, for my Uni course. Wouldn’t be able to release it, it’s nowhere near full enough.
        Not that that’s going to stop me from releasing something else :D

    • No, it’s challenging. But that’s the fun of it!

Comments are now closed for this post.