AWS for Games Blog

New getting started project: Inventory System for Games with Amazon Aurora Serverless

Many games these days have an inventory of some sort. Whether it’s an MMORPG where your character maintains an inventory of weapons, armor and other equipment picked up while adventuring, or a casual match three where the player collects power ups and coins. Believe it or not, even in such different games, the requirements for creating an inventory system are very similar.

  • Inventory must persist between play sessions, you can’t lose your items when you have to log out. Also, if your player logs in from a different device, they should be able to load their inventory.
  • Inventory transactions must be correct. When an item is acquired, it better actually show up in the inventory!
  • Retrieval of the inventory items must be fast, players don’t want to wait for the inventory to load.
  • If your game is a hit, the system needs to scale to match your player base.
  • You’ve probably already guessed that an online database is a pretty good tool to help build your inventory system, and you’re right.

We’ve just recently released a new getting started project that you can follow along and build an inventory system for a game using a completely serverless solution.

I had the chance to run through this project, and it’s a great starting point for helping understand how you can use AWS services to create an inventory system. The guide walks through all the steps you need, including provisioning a database with Amazon Aurora, planning out your data model, creating a secure endpoint to access the system and then deploying and testing it all with an example “game”. I put that in quotes because the example is just a barebones JavaScript web app, but it’s nice because it shows the functionality needed to add to your game without it getting lost in a lot of extra code.

One particularly cool aspect to the guide is that it shows how to create all the services and code with AWS Cloud9. Cloud9 is a cloud-based IDE that lets you write, run and debug code all in your browser. On top of that, it actually gives you access to an Amazon Elastic Compute Cloud (Amazon EC2) instance running Linux, and there’s a terminal where you can not just run your code, but also access AWS services with the AWS command line tool. This means you can deploy things like an AWS Lambda function right from the tool. It even has an image editor, so if you wanted, you could actually create a whole web game right from Cloud9!

I hadn’t worked with Cloud9 much myself, and I learned a lot from walking through the steps in the guide. If you’re looking for an easy start to working with databases on AWS, especially if you’re building an inventory system, I can’t think of a better place to start than with this resource.  Now, go let your players horde some loot!

 

Stay up to date the with latest AWS Game Tech news and information.

Follow us on social media:         Subscribe to the newsletter