Developers Cagematch! Round 2: Corona vs. Marmalade

After the surprising success of the first Developers Cagematch!, for a while I had planned to do another round with a different set of programs, and then of course life happened. Today, I’m proud to announce that the second set of this series is finally here, and we’ll be looking at two popular and powerful Lua-based programs, Corona and Marmalade.

I was introduced to Lua during my graduate studies, as an alternative to coding for mobile games. For a strange reason, my courses were very invested into Flash and ActionScript despite its criticisms even at its time. While I still prefer it for animations and light games, even in its heyday, for anything else that Flash was used for, I heavily disliked it. I’m sorry, but Flash websites are not practical, not secure, and are a sign of its time. However, if you still want to get your feet wet and want to practice OOP, especially in games, I won’t stop you whether or not you want to use AS2 or 3.

But, if you want to start playing outside of the little leagues, Lua is a good place to start. As a simplified C language, it is cross-platform and a simple way to really look at how most modern applications, games, and other software are structured. Unfortunately, while I have only really used it for prototypes, I still do advise it as a good way to build your prototype, in case you’re really not keen on using something like HTML5 (which I really recommend as the king of simple prototyping, but again this is all preference).

However, don’t let this learning curve stop you. Lua is also capable of making powerful apps and games, and while by itself can make simple and fun apps, it works best with other languages talking to it. (Hence it is cross-platform, so no figure you will also see some C languages thrown in to help boost up Lua. Think of it like the Megazord from Power Rangers.) For the sake of this cagematch, while I will point to this fact, I’ll only be referring to Lua itself, plain and tall.

CORONA (http://www.coronalabs.com)

Corona is a lightweight SDK suitable for the mobile and tablet environment, and a program that was released for Android builds on PC right around when I entered my graduate courses, so it felt incredibly exciting to use such a cutting-edge software. The interface for Corona is very simple, and the tutorials and documentation demonstrate the program’s ability to tap into the features of smartphones and tablets. The program also has access to third-party API’s, enabling even more customization and other bells and whistles you can put into your projects.

Programming in Corona however, is a little different compared to using other means to code Lua. Some of the functions are library-specific to the software only, so if you were to do the same function in Marmalade or another program for example, check with the documentation for how it needs to be coded or else you will get errors. This is something to keep in mind if you plan to use an alternative Lua program in the future, but if your heart is set on Corona for life, you have nothing to worry. (Unlike AS2/3, the differences are minor in comparison and is only a matter of semantics, not the actual coding structure.)

You’re probably wondering why Corona would do such a thing, and until you realize how certain functions behave in other versions of Lua software versus Corona, you’ll realize in the long-run, Corona is more organized in terms of how the programmer can execute their code to do what they want to be done. As any programmer knows, organized code is efficient code, and will hog less resources on the device being used. (This isn’t to say Marmalade is not an efficient program, just that it’s a bit of another animal, but I will explain soon.)

At the time of writing this, the licenses have changed from what I had used originally. CoronaSDK formerly was split into two different types of licenses (one for Mac, one for PC), and could only output to those respective device families, for an annual fee. Now the SDK can output to both OS regardless of which you have, and can output to all types of devices, whether they’re iOS, Kindle, or Android. They also have monthly fees which follow the Unity model – Free, Small Business for $79/month, (mainly for revenues up to $500k), and Enterprise for $129/month (no revenue limit).

MARMALADE (www.madewithmarmalade.com)

As you may have figured, whereas Corona originated in the States, Marmalade is from the UK. It’s also an award-winning program, and while this was outputting to a variety of platforms earlier than Corona was, it also has a level of sophistication that enables it to implement a wider variety of API’s built-in, including support to Objective C and OpenGL, and even includes a plug-in for use with Autodesk 3DS Max and Maya. If Lua is a language meant to be played with others, this is practically the playground that comes with it.

Of course, with great power comes great responsibility. For the average joe programmer getting into Lua, Marmalade has a higher learning curve than Corona does, and it can be overwhelming if you’re not used to seeing or working around all of these functionalities. (I know I was.) While Marmalade’s tutorials and documentation are fantastic, and its interface dazzling and dashing, there were many times I would stare at my screen and grumble to myself “can’t I just code?”. Maybe I was too used to Corona’s handholding and simplicity of things, but while more experience programmers would wet their pants over the oodles of goodies Marmalade has to offer, I just want what’s needed to work, and I want it to work well. The more I worked with Marmalade, the more I felt like a resource manager and not a programmer.

However, if you’re a person of greater talents than myself and want the extra mile, Marmalade has reasonable pricing, with the higher bills obviously meant for larger companies needing multiple licenses. Average joe programmer can easily get away with a Free license with no trouble, or for $15/month upgrade to Community for a little more customization. Everything else from Indie onward ($499 annual and up) open up even more platform and other treats to enjoy. Unlike Corona, Marmalade from the get-go can be used for developing for Windows Phone/Store/10, Tizen, and Blackberry, so keep that in mind if you’re looking to do more outside of good old iOS/Android.

THE WINNER…IT’S A TIE

Sorry, folks. The answer is as subjective as my experiences using these programs. Both hold many strengths and weaknesses, but simply picking one over the other is like choosing apples over oranges. (Both of them are fruit, which means they’re delicious and good for you!)

If you want to just get started and code, Corona is what you’re looking for. Now with the ability to export to iOS and Android, coupled with an efficient library, and hundreds of API’s out of the box, it’s just a no-brainer.

However, if you wanna be with the big boys (and girls), dive right into some Marmalade. Not only would you be able to export to a variety of mobile and tablet platforms, if you upgrade to an Indie license you can basically put yourself all over the digital map! If you’re not afraid to learn a few new languages all in one go, and want the challenge, you will be rewarded generously.

While Lua is taking a backseat in the current atmosphere of mobile/tablets, with its cousin C languages and others such as Java and native taking reign, it’s still a lovely language to learn, especially for beginner/intermediate coders. Compared to others, it feels more intuitive thanks to its lighter syntax, which means you will see results quickly, but keep in mind that similar to Python and AS3, cAsE sEnSiTiViTy is an issue so be careful! Both programs host fantastic documentation and tutorials from other helpful developers, so if you’re in a bind usually you will be able to find yourself out of that jam soon enough.

Happy coding, and Happy Thanksgiving!

“Prison Escape”: A post-mortem

This day wasn’t a day I would want to happen to any of my projects, let alone when it’s collaborated with another person’s work, but before I end 2014 it at least deserves a little burial ceremony. I’ve announced this earlier in December but never had an official update here (since I wanted to take care of its post-mortem in one fell swoop), but Prison Escape has been canceled. This post will break down what happened and why, and how most of all this was still a valuable learning experience. Keep in mind a lot of this gets technical, but since this is a gamedev blog, that’s just the nature of the business. If you’re not here to find out the nitty gritty on why, scroll down to the summary on the bottom.

As a recap, I started Prison Escape when my brother’s Kickstarter for a movie adaptation based on his graphic novel The Chair was preparing to launch for late Spring 2014. We sat down and planned things out for a mobile game to go with it, slated for a Fall 2014 release to iOS and Android. I’ve worked in Lua in the past, and this would be my first finished mobile game. (I did a drag-and-drop game for one of my thesis works.) Concept art and core mechanics were put to paper, and it was time to work.

Sadly not even 2 weeks in that was when the trouble started. While I knew Corona could port to iOS and Android, I was not aware you needed their respective OS’ for this to work (a copy of Corona on a Mac, and one for PC). I’ve worked with Macs in my university (and was probably why I didn’t pick up on this critical fact prior) but otherwise I am 150% a PC girl. Yes, despite being a graphic designer and an artist overall. Like most artists, I am not made of money, so spending almost a grand into a computer that will just be obsolete in 3 years doesn’t make much sense in my head. I know plenty of friends and other people (art folks and non-art folks alike) who will invest in a Mac regardless, and I’m cool with that. But the easiest way you can insult me is to recommend me ANY Apple product to replace anything in my tools of the trade.

That said, you can bet your lucky dollar that when I found this out with Corona’s port for iOS publishing, let alone most game engines for iOS publishing, steam was coming out of my ears. As a developer I’m fine with using or even buying a Macbook if I have to, but I had also just got myself a high-end Dell that Christmas beforehand. I would only get one if there were no other options.

So I did my research on cross-platform tools as a secondary option, and I fell upon Marmalade. While it’s popular for its C++, it can also run Lua and HTML5. Its license also extends across the board, so that one copy of the SDK can help port to iOS and Android all on one OS (other licensing fees and registrations are separate otherwise). So I took advantage of their free one-year GDC promo license, since I had just spent money on a one-year for Corona and was fairly annoyed at myself for my other mistake.

For a while, things with Marmalade went well, and I was even able to churn out a demo – a very buggy demo. For those who have only worked in Corona before, Marmalade’s Lua is almost the same, though keep in mind much of what Corona did was build its own libraries to make writing Lua a bit easier. Marmalade was straight-up bare-bones Lua. If you have an understanding of Corona’s Lua, for the most part you should be okay but many times I had no idea how certain functions or directories worked without using Corona’s built-in libraries (since the other didn’t understand what I was trying to call).

I will be honest – I am not an expert in Lua. But I do know enough to write something that should work. Why this project still fell flat on its face was that I didn’t know enough to break down why things weren’t working, let alone how to fix them. This was horribly obvious when it came to using its random numbers generation, and that was the biggest downfall for this project.

You see, generating a random number in Lua is more than just popping in “math.random(int)” (with “int” being whatever number value you want to put in). Simply using that line of code only generates one number at random upon start-up for the entirety of the game unless it’s restarted. It will need to be called again, usually with the help of functions, in order to help regenerate another number again and to keep things at random. However this is still not true randomness, and is often described more as pseudo-randomness instead. In the case of Lua, depending on what developer’s kit, or even OS that you’re running with, the algorithms for this can vary. Lua-users.org explains this in more detail.

Normally this may not sound like a big deal for a game, and that can be true. If your game only requires its use for a small mechanic, you can get away with this without worrying about what algorithm is behind the numbers being generated at random. But games like endless runners heavily rely on random numbers, and anything that deters from the illusion that every obstacle and power-up is indeed coming up at random to the player, will make your game look like a piece of trash. Running too many generators will also steal your game’s memory like crazy, and if not cleaned up properly, will cause it to lag and eventually crash (which has happened in one of the more recent builds at one point).

I’m sure there are plenty workarounds for this type of problem, seeing that it’s common enough to be addressed across various forums and guides online. But those are things I would like to leave to a second helping hand who knows their way around code much better than myself. After looking over the problems and the other solutions left to continue the game, it was decided that the game should be canceled. Putting out a product that might only work half of the time or would just crash for certain users was absolutely not an option.

To make a long story short, difficulties with OS publishing and game crashes led us to cut life support for the project. It was quite a learning experience though, and maybe they’re some things that others can find helpful to keep in mind. Or to laugh at my foolishness, whichever is preferred.

I’ve made good progress with my visual novel however, so the next update will be on that. My story summary has changed since my last post about it, but many of the story aspects (and definitely characters) are still the same. As you may have guessed by now, the beta for it has been debunked because I have to shift that code over to make room for the actual intro. I’m still accepting voice actors though!

I wish everyone a Happy and Healthy New Year!

Weekend Update

I hope everyone had a wonderful holiday weekend. I managed to continue Prison Escape throughout the past few weeks, though perfecting collisions is still slowing the project down. At least the touch D-pad works, as seen below. Part of the detections is still bugging up in the output though, so I’m going to isolate parts of the code today to see what I’m doing wrong. In worst-case, I’m prepared to start over and rebuild the game, as well as look into different programs and languages.

thechairDPADgif

Still testing out the hitbox but otherwise touch D-pad is in action!

As of my visual novel, the prologue somewhat needs another rewrite, but it’s more like a shift of chapters. What I have so far actually would make more sense later on in the story (like around chapter 2 or 3). So I decided to push it over and focus on events before it, and make those parts the prologue instead. This is also from looking over everything from the original books I wrote to the more current light novel, and realizing that there is still backstory that needs to be explained before I dump the player into this world.

The Magical Mystery Bullet

Also known as “I got slammed with double shifts like crazy so I apologize for being quiet lately but thank you for your patience”!. Phew!

Despite my crammed schedule, Prison Escape (which I mistakenly kept on calling Prison Break for the longest time and had to be corrected by my client, sorry!) is moving along well! I fixed some bugs from the rough demo release that was shown and well-received despite them. I also decided that making the bullets as particles instead would be a better workaround, since I was still having trouble getting them to spawn from arrays for some reason.

So after plugging in the bullets with the default settings for MarmaladeSDK’s particle effect, this magical wonder happened:

 

thechairbulletswtf

The Magical Mystery Bullets are dying to take you away!

 

Of course, it would be bad taste to leave them in the game’s final release, but the effect is so dang humorous that I decided to save that idea for another game I will be making after this one is done. It’ll be much simpler and will be very colorful and wacky, as most of my games tend to be. After working on so many projects that were rather involved, or had short deadlines, I feel that doing a smaller and more casual game would help give myself a break while still churning out work.

I was hoping to even do a prototype tonight just to mess around, but I think I’ll hold off for my next update. 

A word on Project: Mittens and others

Two announcements! First off, I can finally release artwork and a demo based on the 2D RPG game I was working on with a colleague, Project: Mittens. Link opens to the demo we have so far, and a more finalized version will be out at September 30th.

Starting classes you can choose from, at left to right and top to bottom: Ninja, Wizard, Monk, and Engineer.

 

Example of one of the enemies you’ll be fighting, a rat. Armor coming soon!

 

In the mean time, a working demo is almost finalized for The Chair: Prison Break, based off of the successfully funded graphic-novel-to-indie-movie Kickstarter. Surprisingly enough, I got collisions working, and some obstacles and projectiles are now moving across the screen! (Will have a better gif at the end of the week to demonstrate this.)

Of all things though, the next hurdle became showing the player how many lives they have left! Arrays didn’t work, and when I used spritesheets instead, Marmalade decided to run out of memory and crash the game for the night. I’ll have to come up with a backup solution for the time being, but it’s a method I’m not fond of using for the final release unless nothing else works.

The demo is due by the weekend, so my next update will have all of the goodness I can show for, as the game wraps up quickly. I’m excited to finish up this amazing project, it’s taught me well on the ins and outs of Lua, and while some parts can still be frustrating, it’s becoming to make more sense to me. I’ve even looked at my code now and realized how much more efficient I can make it for the final release.

So with that, Project Mittens, and This Game Is Not A Dating Sim being wrapped up for demos soon, it’s fun seeing everything come together in one big package. For so long everything I’ve done or helped with has been under development that it felt like there was no end in sight. Good to see some great feedback out of it!

 

Speaking of, two Let’s Players reviewed my game for Insanity Jam #2! One was brought on by Lone Roach Studios and was quite extensive and amusing to watch! I didn’t even notice I had a few grammatical errors in the dialogue, so I appreciate him going out of his way to really provide good feedback with his LP!

The 2nd is Jupiter Hadley, who did a brief LP for all of the submitted games. I recommend watching through all of them (many on there I liked myself), but if you wanna jump to just mine, it’s towards the end. A great shoutout no less!

Currently, the game is still tied for first place for the jam with a whopping 8 out of 10! I kindly ask you again to spread the word, and play and vote if you hadn’t yet. You have until August 11th! (I was misinformed last time, you have an extra day!) Thank you, and good luck everyone!

Jumping Around

Hello everyone, had a busy week and a half but now I can get around to continuing my game dev! For those that saw me at Eternal Con, thanks for stopping by my table and I hope you had fun at the convention! Sadly I won’t be returning to that one next year, but I’ll see what else is around the area for me to check out next.

A few days ago, I got my new Marmalade build to work again, support moved my license over with no troubles. I went ahead and placed Sullivan’s hitbox, as seen here in the gif, and I also got him jumping!

 

sullivanjumpgif

I plan to make the transition smoother for his jump.

 

I hadn’t been able to test collisions yet, but that’s my next step. That aside, I completed some more stuff for a colleague’s game though I can’t show at this time still. I saw the sprites in action today though, and I’m very pleased with how the animation turned out.

Sorry that this post is rather short, I only had been able to continue my own game dev recently this month. As of my visual novel, I continued on with the script and that’s turning out nicely. Still nowhere near done rewriting the prologue chapter, but I’ll get there, don’t worry. I do admit I miss drawing my characters though, so maybe I might crank out another avatar next.

Smells like progress

Hello all! I mean to update the other day but then it escaped my mind, so for this update I decided to just post early rather than wait midweek again.

I have a progress gif of the finished sprite for Sullivan; he since is bigger now but here’s his animation regardless.

 

Image

Now walk it off! 1, 2, 3, 4…

 

Next update I’ll have other elements added, most likely not sprite related but some more things regarding game mechanics.

I also finished cleaning up my new portfolio site, though I still need to add other examples of my more recent work. I wanted to add collapsible divs but the code I was using wasn’t cooperating with it, so I went for anchor jumps instead and so far it’s worked well. It’s also much more mobile friendly than my previous layout.

 

Image

How come my color schemes always remind me of ice cream flavors…

Adventures in Lua and Pixel Art

So after my dilemma regarding CoronaSDK  and iOS development using Windows, I had since moved on to Marmalade and I love it! I still like Corona but I will use it for Android builds only, though since I took advantage of a free yearly license kudos to the GDC, why the heck would I switch? Both cost the same and Marmalade does way way more. Very powerful stuff. Remind me to kill my Corona subscription later next year.

(Though a colleague of mine reminded me Unity has a 2D engine now, and I could have used it in the first place. We won’t talk about that however, since it just reminds me that I’m a dingus of a developer sometimes. Or I just wanted to do some Lua bonding that bad. Oh my.)

 

thechairgifprogress1

Some basic elements for the game so far. Background was made by me; the sprites are from tutorials as placeholders.

 

Nothing super fancy so far going on for my brother’s game (see above), but I did get a timer and score going, as well as other basics like laying out animated sprites and touch events. Though I made the background to be more finalized art, there’s a chance it won’t be the final version used for the game. Still playing around with how pixelated I want the style to be. For my next update I plan to have a jumping animation and even a hit box test, so that you can collect the coins and improve your score that way. The hit boxes will also be useful for obstacles and collecting other things like power-ups.

Somewhat game dev related, I also am remaking my current portfolio site. For some reason the JQuery on my 2nd page died, and won’t load the new beautiful version I set up on my FTP, despite the preview working well beforehand. At least it shows part of my script for Compendium, but still. Since my portfolio needed some organization anyway, I figure it was a good opportunity to jazz it up.

 

tumblr_n4t62w5hFw1t3a18ko1_1280

Mmm, smells like HTML5 and CSS3!

 

I’m using a responsive grid gallery kudos to codrops, since I generally like their tutorials and their HTML5 galleries, in particular. I’m a sucker for good web design though, and the marvels we can do with it. I still get really excited when I discover new things about it, such as that CSS3 allows embedded fonts! No more same old Arial or Helvetica here! What you see in the screencap is a working page, not a Photoshop mockup! Beautiful stuff.

I also made the resume icon you see at the top right corner there, and am considering making a high-res vector of it that others can use as well. (I may reverse the colors so that it matches better with the other ones though.) I miss making icons and vectors. Even though I just made a handful last week for another game project.

Do the Lua

Hello everyone! Figured I would drop in an update of what I’ve been up to. Aside from my ongoing visual novel project, and the other Unity one I’m working on with another team, I decided to check out other game tutorials out there for simpler games to make that would still be fun, as well as showcase my design work.

I plucked out this gem from my first semester of grad classes, since it was riddled with bugs but still held some charm according to the feedback I got from playtesters. (Btw “gem” is not an endearing term at all in this case; I was very close to pulling all of my hair out over AS2 code that would not cooperate.)

“Tomato’s Perilious Adventure”, a Flash game I coded in AS2 back in 2011.

But of course there were plenty of solutions out there to fix up this game, even though I’m primarly doing this to strengthen my skills in Lua (and also the occasional HTML5) and to actually make more games people can play rather than being muddled with non-disclosures all over the place. I found a great tutorial on making an endless runner game (like Temple Run) that even I could play without burning my eyeballs and getting dizzy (not like Temple Run). So I plan to fashion up my own with my poor tomato pal here, and give him a second life.

If the final product is deemed fit to actually publish and have others to play, I will release it for free on Google Play (App Store fee isn’t practical for my budget right now). Aside from this one, I plan to make other little games, although some of my ideas are a tiny bit more complicated but they’ve always been on my wishlist (a good word game, and a time management one. I’m a sucker for both genres). My goal is to get very good with Lua and HTML5 by the end of the year though, and of course complete my visual novel.

As of the status of that though, I will be changing up the look of the avatars that I was going to use. The lineart felt too harsh and I wasn’t as happy with my coloring job, so next week’s update I’ll go back in and adjust it. I also will assemble some screenshots as well so far, now that I renamed some things and feels a little more finalized (still using stock photos so bear with me).