mBaaS in the Wild: a Mobile Game Built on Kinvey
I recently had the chance to connect with Tyler Bandy, cofounder of mobile game development studio HangZone and creator of the awesome iOS game Spelldom, which combines the best elements of Words With Friends and Clash of Clans. Spelldom is backed by Kinvey, and Tyler was kind enough to share with us his experiences using our platform.
What’s the premise of this game? How do the mechanics work?
Spelldom is a town building strategy word game. Each player has their own town, which they strategically layout with new and upgraded defenses to try to protect their Castle from attack. The attacking isn’t with your typical mindless barbarians that like to disrupt virtual civilizations though. No, these are word-based attacks where you must spell your way to victory. Players play their first word on the opponent’s Portal, the entrance to the town, and artfully work their way around defenses by connecting words with each other to move. Complete the town’s objective (something like play 18 words), steal the opponent’s gold, score enough points, and then take their Castle to earn 3 stars! The game is complete with teams, chat, tournaments, and leaderboards to add even more fun!
What inspired you to create the game?
We came up with the idea for Spelldom in 2013. We were playing a good bit of Clash of Clans and Words With Friends, and we started to think about what would happen if we made a cross between the two games. One of our biggest gripes with Clash of Clans was the lack of skill, as your attacking could only be as good as the troops and the spells that you had unlocked. We were also frustrated with how Words With Friends games lasted so long, and you were always at the mercy of your opponent to play back before you could do anything. With Spelldom, we looked to fix those areas with a skillful fast-paced attacking system all set in a quaint little magical forest.
Why did you end up deciding on Kinvey for your backend? Did you look at any other alternatives or think about doing it all yourself?
When we started working on Spelldom, we didn’t have much experience working with backends. Our previous games were single player titles, so we didn’t need servers to handle multiplayer interaction. Spelldom is a different beast, though. We have to save each user’s town layout, resources, and achievements. We need to save team information, and quickly update individual and team leaderboards. Spelldom also has team chat and gem gifting between teammates. This all takes a ton of server calls per user. Kinvey charges on a per user basis, unlike many BaaS competitors who charge per server call. Consequently, Kinvey’s pricing structure was a good fit for us. We also didn’t want to deal with a small BaaS company that might go bankrupt, leaving us with no way to run our game. As one of the larger BaaS players, we felt good about Kinvey.
Did you use any tools other than Kinvey to help you build the app (IDEs, SDKs, Testing/QA tools, etc.)?
We built Spelldom in Xcode, using the Cocos2D-X game engine. We’ve integrated the Facebook SDK so people can check out their friends’ towns, and our new update will include the Everyplay SDK, so people can share videos of their attacks.
Can you explain how you are using Kinvey data store/auth/business logic?
When a user opens up Spelldom, we attempt to login the user to Kinvey in the background, so we can load his town and let him know about any raids that happened while he was gone. If it’s a new user, we create a new user entry on Kinvey, and create a fresh new town. We do all of this without the user having to choose a user name and password, so it’s all a pretty smooth experience.
We save a ton of information for each user—hundreds of columns to handle their town layouts. We also save each multiplayer attack, for a limited time, so that defenders can see what happened to their town while they were away—and so attackers can relive their glorious pillaging.
We use business logic pretty extensively to handle more complicated operations. If a user joins a team, we can’t just make a simple save on the user. We have to make sure there is still space available on the team, update the team’s scroll total for the new member, and carefully handle a few other moving parts. We have to do these sort of operations in the business logic instead of making individual calls from the app, because things would go awry if we lost a connection after handling only some of the actions. We also use scheduled business logic to check the rankings at the end of our two weekly tournaments and then to dispense the rewards.
This really just scratches the surface of the different ways we use Kinvey’s data store and business logic. There’s chat, the team invitation system, shifting resources between users after an attack…there’s too much to cover.
Are you connecting to any data/auth/biz logic sources outside of Kinvey? If so, how did that go?
Users can log into Facebook and Everyplay to view their friends’ towns, check-out their friends’ teams, and share attack videos. Those login processes are quite simple for the user, and don’t take much more than a button press.
Were there any features of the Kinvey iOS library that you found especially compelling?
The business logic is really helpful for us to do whatever sort of custom actions we want. There have been some game oriented BaaS companies that have shown up since we started developing Spelldom, that aim to speed up the development process with canned team and chat functionality. The downside is that they don’t seem to offer as much flexibility as we have with Kinvey’s business logic.
How long did it take you to develop the app? How long do you think it would have taken had you not used Kinvey?
Spelldom took about a year and a half to develop. If we hadn’t used a BaaS provider, I’m honestly not sure how long it would have taken. We don’t have experience building that sort of functionality from scratch.
Were there any benefits to using Kinvey that you didn’t expect from the start?
Using separate backend environments for the development and release versions of the app is pretty much necessary for testing new features without disrupting the live version of the game. It’s been easy to toggle between the two environments, so that’s been a plus.
Do you plan on using Kinvey for any future projects? We’d love to have you!
We’re still focused on making Spelldom as fun as possible for our users right now, so we don’t have a new app in the works yet. We’re quite comfortable with Kinvey now, so it would be a natural choice for any project that requires a backend.
Any plans on an Android version? I don’t have an iOS device and I want to play 🙂
We built Spelldom using Cocos2D-X, so the majority of our code base could translate to Android. There’s still a ton of code that we would have to rewrite for Android, though, so we’re not planning an Android release anytime soon. If the game does well on iOS, we’re certainly interested in porting it to Android. In the meantime, you can checkout our previous title, Fizzy Factory, on Android.
Starting a new mobile project? Check out our mBaaS Savings Calculator for a price quote.