Using GBC Data Cabinet

I think it’s time to give GBC Data Cabinet some love… it’s been in the Corona Marketplace for over a year and it just works!

GBC Data Cabinet is my free Corona SDK plugin that can be used to keep temporary and persistent data for your Corona written apps.  It is very easy to use… simply create a data repository, and start adding and reading data.  That’s two lines of code!

GBC Data Cabinet does not use global variables to store data. Any data type, including tables, can be stored and used between scenes as well.

Do you need to store data between runs of your game? Just call save and pass in the data repository, and values are saved. Use the load command to bring everything back the next time you need it.


Tip: Using GBC Language Cabinet With Larger Applications


GBC Language Cabinet is my free CoronaSDK plug-in that helps simplify the addition of multi-language support in your games and applications. Using GBC Language Cabinet is very easy… define the languages you want to use, add the translation text, and then call a function to retrieve the appropriate text in a specific language.

For smaller games, it is very convenient to create a separate Lua module to create and add all the required text that you need within the game, but what about larger applications that have many scenes and/or a large amount of text? What about scenes that are only displayed one time? In these cases, one large Lua file will work, but it is possible to use multiple Lua files to help you manage the large amount of text needed for games such as this.

Modular Approach to Translation Text Managment

For example, translation files can be created per scene, or included in each scene’s create() method…

-- remove all text entries currently stored in GBC Language Cabinet

-- load scene specific text
GBCLanguageCabinet.addLanguage("English", "en")
GBCLanguageCabinet.addLanguage("Deutsch", "de")
GBCLanguageCabinet.addLanguage("Español", "es")

GBCLanguageCabinet.addText("RedBall", {
    {"en", "That is a ##color## ##object##"},
    {"de", "Das ist eine ##color## ##object##"},
    {"es", "Esa es una ##object## ##color##"},

Notice that for each scene, you remove all previous text, add the language, and then add the text.  This ensures that only the scene specific text is available.  This keeps the memory footprint lower, and makes management of text easier.

In Closing

GBC Language Cabinet is flexible, so the best approach is really up to you. It depends on your game and how you would like to manage it. Using a modular approach allows you to manage translation text in cases where a large number of scenes or a large amount of text makes a single file solution difficult.

I am always interested in knowing who uses GBC Language Cabinet… show me your games! Also, if you have any suggestions for improvements, please let me know.

Post Mortem – Pumpkin Patch Match

I originally wrote this article in October of 2015, but never published it.  Since I just released an update to Pumpkin Patch Match, and since we are coming up on Halloween, I decided to make a few edits and finally release this Post Mortem.


Pumpkin Patch Match bannerI wanted to create a Halloween themed game along the lines of my past two holiday releases, Tappy Holidays, and Tappy Valentines Day. Tappy Halloween, as it was going to be called, was going to be a simple game with the same game mechanics as the first two games in the series, but I just couldn’t figure out a game that would be interesting.

After a couple of weeks of trashing ideas, it came to me… make a game where you have to match a pattern of jack-o-lanterns. Shortly after, I decided to change the name to Pumpkin Patch Match since it seemed better suited for the game.

Putting It Together

I have been learning Unity throughout the first part of 2015, and I thought that this would be a good “first game”. I got pretty far, and was pretty impressed with it, but what I thought were a couple of limitations prevented me from continuing, so I went back to CoronaSDK for this app.

I put together a CoronaSDK based application in no time and I am very happy with the results. I feel it is one of my better developed apps.

Stuff I Encountered
  • CoronaSDK is great for 2D games. I built Pumpkin Patch Match rather quickly, but I’ve been trying to find a reason to move completely to Unity. I guess both have their strengths and weaknesses. I am close though, since there are a few things that are a bit limiting with Corona.
    • 2016: Looking back, I think I should of continued to use Unity… it would of been a great learning experience.
  • I decided to try Vungle for monetization… let’s see how this pans out. I hate ad based games, and I’ve been trying unsuccessfully to get out of that, but I don’t seem to have a choice. My games with In-App Purchases, or games I originally released as a pay-to-play (no ads) were unsuccessful.
    • 2016: Still not sure Vungle is the way to go.  It fits well with the game (allowing the player to continue at the same level if he/she watches a video), but I do not see the profits I expected.
  • I am also going to release on the Windows Phone platform. I have no experience there, and have no idea how this will turn out. CoronaSDK recently released a Windows Phone build.
    • 2016: I did release a Windows Phone version, but since Vungle on CoronaSDK on Windows Phone is not supported, I had to go with a $0.99 app, and as I expected, not a single purchase was made.

Space Mission: Survival – Mobile Update

A rather large update to the mobile version of Space Mission: Survival has finally been released on the Apple App StoreAmazon Store, and Google Play. After about a month of work on the update, Version 2.0 is live! Changes include:

  • Larger UI for smaller devices (phones)
  • Additional Achievements
  • For iOS, partial Achievements
  • Support for multiple languages… English, German, Spanish, Chinese, Japanese, and Klingon.  That’s right… KLINGON.  Other languages coming soon.

For those interested in the development side, SM:S is written in CoronaSDK, and has the following features:

  • The language translation features were developed using the plugin I wrote called GBC Language Cabinet.  You can use it too… it’s available on the Corona Market for FREE.
  • Persistent data is being managed by another plugin I wrote called GBC Data Cabinet. Again, another FREE plugin for Corona Developers to use.
  • I implemented IAP using a plugin called IAP Badger. A great plugin to make in-app purchase development easy. Support is great too.

May 2016 Update

I’ve been a bit quiet lately, and since this is the end of the month, I figured this is a good time for an update to go over what i have been working on.

I took a break for a couple weeks after Ludum Dare 35, and started up again in mid April.  I was all set to continue working on the update to Space Mission: Survival, currently named “SMS: The Next Mission“, but I am still in a bit of a funk deciding what I want to add to the Shmup version of the game.  The 70s and 90s version is pretty much complete, except for some tweaks. Until I figure out exactly what I want to see in the Shmup version, I decided to work on some updates to the original mobile version of SMS.

The mobile version was written back in 2014 and one of the features I coded, but did not utilize, was language support. I decided it was a good time to add language support now. Late last year, I wrote a Corona plug-in called GBC Language Cabinet that made it easy to add support for additional languages. Works like a charm… it’s also free for Corona developers. I spent a few hours adding language support to the game via the plug-in, and several days adding language support to the iOS and Android app stores in preparation for the update.

There’s a few other things I wanted to add to SMS, so I decided to keep going and make this upcoming version a massive update. Some improvements you will see, others are internal. Other obvious visible improvements are better support for smaller (ie. phone) devices, and some bug fixes.

Using GBC Language Cabinet is so easy, but while using it for this update, I noticed there are some other things I want to add that will make this plug-in incredible. I am seriously thinking of continuing development on this plug-in and releasing a “Enhanced” version as a paid version (keeping the free to use option also available).

SMS: The Next Mission is still on my radar, and I hope to get back to it very soon. The mobile update should be completed soon, and then I will decide whether to continue development on GBC Language Cabinet Enhanced. If yes, then SMS comes a bit later.  If no, sooner.

Eating Your Own Dog Food

There’s a popular term in business called “Eating your own dog food”. In other words, “use your own products”. I had that opportunity during my recent upgrade to Tappy Holidays. I wanted to add a persistent high score and a game counter for achievements, and what better way to do that than with GBC Data Cabinet.

GBC Data Cabinet is a Corona SDK library I wrote to manage temporary and persistent data within your application. It’s on Corona’s plug-in store, and it’s free! Let me know what you think.

The following is the code I used to check for an existing persistent cabinet file. If it does not exist, then create one, and get it ready for upcoming data during game play. If persistent data does exist, then read the values.

CabExist = GBCDataCab.load("playerdata")

if CabExist == false then
    CabExist = GBCDataCab.createCabinet("playerdata")
if CabExist then
    highScore = GBCDataCab.get("playerdata", "highscore")
    if highScore == nil then highScore = 0 end
    intTotalGamesPlayed = GBCDataCab.get("playerdata", "gamesplayed")
    if intTotalGamesPlayed == nil then intTotalGamesPlayed = 0 end
    highScore = 0
    intTotalGamesPlayed = 0


Halloween Achievement in Pumpkin Patch Match

I guess Halloween is a perfect time for a bone-headed move. For those players of Pumpkin Patch Match, you may notice that there is an achievement that will be awarded if you play the game on October 31… today.

For some reason beyond my comprehension, the check for that achievement is coded incorrectly.  To get this achievement, you will need to do the following:

  • Play the game on October 31.
  • Get a score of 1.

Any other score will not reward the achievement at this time.

I am in the process of uploading an updated version of the game (version 1.1) to all the stores, but in the event that the game is not approved in time, please note that ending a game with a score of 1 will reward the achievement.

My apologies.

Announcing GBC Language Cabinet Plugin for CoronaSDK

GBC Language Cabinet is an easy to use way to display text in different languages. Simply specify which languages you are supporting, create or import tables of translated text, and use a basic function call to return the text in the correct language.

Several options exist to make your life even easier:

  • Text can be created with embedded keys. During the getText call, parameters can then be passed via a table. The returning text will be formatted to replace the keys with the parameters you passed. See below for examples.
  • You can import a comma-delimited file or a json file containing your text (including embedded keys!) instead of using multiple addText calls.

GBC Language Cabinet is available on the Corona Plugin Store.

Announcing GBC Data Cabinet for Corona SDK

GBC Data Cabinet, my free Corona SDK plugin, has been released on the Corona Plugin Store.

GBC Data Cabinet is used to create one or more data repositories, which is then used to store and recall data needed in your application. Data can be used throughout the application, without using global variables.

Data Cabinets can also be saved and recalled at a later time, which is ideal for keeping persistent data such as scores and other values that should not be reset between launches of the application.

For more information, check out the Corona Plugin Store, or view the plugin’s documentation.