The purpose of this project is to create a simple mobile/tablet game that makes use of Liquid Content as data provider.
As example the project implements a simplified version of the classic game: 4 Images 1 Word. Here you can find some examples of this kind of game in both Play and App Stores:
https://play.google.com/store/apps/details?id=de.lotum.whatsinthefoto.us
https://itunes.apple.com/es/app/4-pics-1-word/id595558452
The idea in the game is to provide 4 images and a hidden word that a user has to figure out. Each one of these game levels will have some coins that the user will earn if the level is solved.
Finally, thanks to the support of Liquid Content, we will also define a page for the game where we can check the leaderboard with the users with more coins.
Some images of the game:
The game will be implemented using the framework Corona Labs:
Some of the features of this framework are:
- Free
- Publish to the major mobile platforms
- Windows and Mac support.
- Android TV and Apple TV support.
- Go to the Corona Labs web page: https://coronalabs.com/
- Create an account in order to be able to download and execute the app.
To be able to use the Liquid Content API, we need to provide to the game configuration a valid API key with permissions for:
- Read content types.
- Read/Write content items.
Liquid Content's Types are the perfect tool to support the data manage by an application, a game in this case.
For our game we will need two new content types:
- Stage, which contains information about a level including:
- 4 pictures
- a hidden word
- earned coins
- User, each user that makes use of the game will have its own instance in Liquid Content. In our case, a user has these attributes:
- Nickname
- earned coins
In the following section, we will learn how to set the types needed for our game.
In the folder of the project we can find two zips:
- types/stage.zip
- types/user.zip
Importing these ZIP files, the associated types and visualizers for our game will be automatically added to our site.
This type has three attributes (all required):
- Hidden word, the word to be figure out by the user.
- As set of 4 images that will be uploaded to our system.
- Number of coins that the user will earn if the level is solved.
User type has only two attributes:
- Nickname of the user, which is required.
- Number of coins earned by the user.
Thanks to the great features of Liquid Content, once we have defined the types of our game, we will be able to define new levels that will be automatically available!
To create a new level, we only have to follow these steps:
- Decide a hidden word, for example: DOGS
- Search for images related to the word, here there is a link for searching with the proper images resolution: Search link
- Save 4 of them
- Create a new item:

Our game will use Liquid Content in some steps during its execution.
In this scenario the game:
- does not have any information about the content types identifiers.
- no user associated with the mobile.
So the game will do these requests to the Liquid Content API:
These content types are cached, so this information is only retrieved once.
After this the game shows a view to insert your user's nickname:
Once the nickname is inserted and tap on "Create" the following communication is done:
This information is also cached by the game, so we will only have to introduce our user once.
Assuming that the game is already configured (previous section), the game makes this communication with the API:
To configure our game, we have to edit the file:
src/config/liquidContent.lua
local config = {
apiServiceUrl = "https://dnnapi.com/content/";,
apiKey = "$API_KEY$",
userContentTypeName = "User",
stageContentTypeName = "Stage"
}
Globals.liquidContent = config
In this file we have to replace
Corona Labs allows us to execute our game in a big number of platforms, in this section will see two of them.
Once we have the framework installed, we have:
Once we have our game running following the previous section steps, we can export it to one of the supported platforms by clicking in:
File -> Build -> one of the platforms
The easiest platform to be generated is the Android one, the iOS ones need to have xCode previously configured. After that an APK file is generated that can be installed in any Android device (smartphone or tablet).
Finally, we will user the visualizer created during the importation of the types to create a web page of our game.
For do that we have to:
-
add a new page in EVOQ
Adding these two visualizers list, we get this result:



















