Just as the players of our mobile game Creature Quest must make wise strategic decisions and manage resources carefully to successfully complete their journeys, we first had to face plenty of our own tests throughout the game’s development.
Along our adventure, we needed to equip ourselves with the game engine and database of our destiny, and do battle with scaling, client-versus-server data handling, as well as other issues that would fulfill our quest for a completed mobile strategy RPG.
As a newly formed company in 2014, we set out on this mission already armed with a veteran development team from the world of PC games led by Jon Van Caneghem, who fans will recognise as the creator of the Might and Magic and Heroes of Might and Magic game series.
Our team gathered as an elite force – or so we like to see ourselves – ready to bring those same kind of acclaimed experiences to the vast worldwide mobile gaming audience. In that spirit, the team began taking on the technical needs and challenges before us.
We began by researching available technology solutions, investigating stacks commonly used in the mobile game industry.
Based on past experience and familiarity, working with NodeJS stood out as a desirable option. The team also wanted a document-based database solution, which led to identifying MongoDB as a popular and well-suited NoSQL choice.
Given mobile gaming’s vast audience – which potentially includes just about everyone with a smartphone today – the necessity of being able to scale backend data storage to meet whatever burdens might come with rapid success presented a particularly acute challenge that only the right database and management strategy could address.
Being able to scale backend data storage to meet whatever burdens might come with rapid success presented a particularly acute challenge.
With around 20 employees, we faced an additional challenge in implementing and managing our database effectively, in that we had no dedicated experts on staff – and it was pretty cost-prohibitive to add them.
Our status as a start-up required that we solve this need without devoting much at all in the way of our finite internal resources, or distracting from our near-singular focus on game development.
To do so, we settled on the strategy of finding a capable database-as-a-service, which could provide the MongoDB expertise, scalability, and reliability we required while freeing our team to concentrate fully on our product.
Following a free trial and an assessment period, we went with mLab as our fully managed MongoDB database provider. The rationale was both due to the reasons mentioned and because it offered the ability to start small and easily scale the service as our needs grew (without needing to pay too much attention to it).
Another technical obstacle was finding the most appropriate framework for developing the Creature Quest client-side app, and ensuring its quality and availability for both Android and iOS (as well as Android for Amazon devices).
We met this challenge by enlisting the Marmalade SDK and game engine, allowing our team to write code in C++ and deploy native apps to each major mobile platform as we wished.
Our engineers primarily use the Lua programming language – Marmalade provides the needed integrations between Lua and the C++ core engine.
Rounding out the picture, we chose the libcurl library to talk to a backend NodeJS REST API server, and the Mongoose NodeJS library for MongoDB as a middleware layer.
The flow of data looks like this: the client app makes requests to the NodeJS server, then the NodeJS server makes calls to the database to either store or retrieve data.
Our technology and data strategy is stable, effective and has us prepared for the future challenges that await.
From a scalability standpoint, using NodeJS is beneficial because it operates in an asynchronous fashion: requests can be handled concurrently, allowing for elegant handling of requests on a tremendous scale.
This leads to discussing perhaps the trickiest data predicament we’ve had to navigate: balancing control of the game’s data between the client and the server.
Experienced adventurers reading this may recall the old advice on how holding a sword correctly is like holding a bird: hold her too tight and you smother her, too loose and she flies away. We found the same adage actually applies just as well to handling game data.
Initially, our instincts were to wholly distrust the client, which, left unchecked, can become the plaything of hackers to execute all sorts of cheats and exploits.
However, forcing the client to check in with the server to verify every piece of data resulted in a poor, stuttering game performance – whereas mobile gaming needs to be an absolutely smooth experience.
We learned from this, and began allowing dirty data on the client, with accumulated data then saved to the server at critical points (such as when combat begins or ends, when an in-game purchase is made, etc).
At the same time, we spent a great deal of focus on the architecture of key data transfer sequences (like purchasing), and on QA so that the app doesn’t crash and lose that valuable player data.
While our quest is ongoing, Creature Quest has now succeeded in launching worldwide and establishing a growing audience. More importantly, our technology and data strategy is stable, effective and has us prepared for the future challenges that await.