Skip to main content

Rewarding players for playing every day in Corona SDK

Rewarding players for coming back and playing your game every day is nothing new, and is probably used in most successful games out there in one way or another. I don't want to miss an opportunity to keep my Ice Trap players for a little longer if possible, so I've implemented a simple daily rewards solution in Corona SDK to handle this.

My solution is the simplest possible really: Give the player a reward if he/she plays two days in a row. The reward will be the same every day regardless of the number of consecutive days played. I guess you could make this just as advanced as you like, with increasing rewards after a specific number of days, different rewards on different days and so on. But for the moment I don't see a need for that, and a flat reward will do just fine to start with.

Recently I implemented a concept in Ice Trap called level keys, allowing the player to unlock the next level if getting stuck. The player starts the game with a few keys, and can then earn new level keys while playing.

Allow the player to unlock the next level from level selection...
...and when getting tired of failing on some level.


Level keys make a perfect daily reward in my opinion. If a player tries to unlock a new level and is out of level keys, just pop up a dialog saying something like "Check back tomorrow to get 2 new level keys". This should hopefully entice the player to do just that, check back, instead of quitting and never play the game again.

Following is the full source code for my Corona SDK implementation of a dailyrewards module together with a small example of how to use it. Note that dailyrewards also requires the following modules, so make sure to get them too if you want to be able to use the code:


  • fileutil - A little helper class I've written myself to simplify working with local json files.
  • Lua Date - A date/time module for Lua which I got from here: https://github.com/wscherphof/lua-date. It's enough to download and require the date.lua file.


Comments