Posted November 13, 2021 by erSt
#auto-battler #auto-chess #cloud #azure #multiplayer #free #fantasy #godot
No need to hide, I was inspired by Super Auto Pets. I find that game so interesting in it’s concept, I had to dabble in this field myself. As usual I see a technology I liked and I had to know, I had to be able to reproduce it. How does it work? How can I make it work? I went ahead and drew up the early concept for a game:
I had my Menu down, it’s easy, just a button to start the game. Let’s try to make the Shop:
Having everything down, next step is the Arena.
This is the hard part. I come from the corporate (mostly) service development environment. Everything needs to work fast and just be done with everything as quick as possible. Game development is different. Back to animation, events, everything starts to break. I had my early Arena code, it was fast, calculated the whole fight in a few milliseconds, but how do I show it to the users? A few days later, after a lot of redesign, I had something I was happy with. Animations are going, the player is able to follow the fight. Awesome.
You need to fight with someone. For testing and development I had a hardcoded team by default, but that can’t stay. Do I write predefined enemies? No. I let users battle each other. How do I do this? Cloud. The concept is simple:
I use Azure Functions for the Upload and Team getting. Azure Functions lets you define a really lightweight API and it’s all serverless. Azure will scale these function calls for your needs. Nobody plays my game? No cost, it just won’t run! Thousands play my game? Okay that will cost me, but the server won’t struggle. It’s a really simple, but powerful solution.
Datastorage is also in Azure. The Functions application communicates with an Azure Tables database. You guessed it, also serverless! My whole backend solution is serverless, scales (both in performance and cost) to the playerbase.
It just works. I think after all of this work and (re)design I find this solution so simple and straight forward and yet, I had to think so much on how to go about it.