Chapter 9. Employing Cloud Computing and Storage
In the previous chapter, we examined how Lumberyard handles audio events in games. In addition to simply playing sounds, we reviewed Lumberyard's Audio System architecture, which includes audio areas, audio triggers, and the Audio Controls Editor. We also reviewed Wwise by Audiokinetic. We used example asset packages and a sample game to make our audio review contextual.
In this chapter, we will turn back to AWS. You'll recall that, in
Chapter 7,
Creating Multiplayer Gameplay, we used GameLift, one of the many AWS. For this chapter, we will review two additional Web Services: Cloud Canvas and Amazon Simple Storage Service.
After reading this chapter, you will:
Understand the need for cloud-based solutions for your Lumberyard games
Use the AWS Console to create an Identity and Access Management (IAM) user
Understand how to use Cloud Canvas
Understand how to enable the Cloud Canvas gem
Understand how Amazon S3 is accessed
The need for cloud-based solutions
In Chapter 7, Creating Multiplayer Gameplay, we created a free AWS account. We will use that account for this chapter.
Tip
If you skipped Chapter 7, Creating Multiplayer Gameplay, please follow the steps in the Amazon Web Services section before proceeding with this chapter.
AWS is a family of cloud-based solutions offered by Amazon, collectively known as AWS. Lumberyard and AWS are inexorably linked, which results in great benefits for the AAA game developer (that's you!). When we develop multiplayer games, we need a cloud-based solution for networking, storage, notifications, leaderboards, and so much more. AWS has a suite of offerings that we can use in our games.
Tip
Remember, cloud computing solutions, including those associated with AWS, are not free. Pricing is usually based on usage and not static plans. This allows you to pay for what you use, and not for what you do not use. It is recommended that you continually review your account so that you do...
Let's use a game example to help us understand how to enable and use Cloud Canvas for our games. Here are the steps:
Launch the Project Configurator.
Click the SamplesProject icon:
Next, you'll want to ensure Cloud Canvas is enabled, so click the Enable Gems link.
Scroll down the page until you find the Cloud Canvas (AWS) row. Ensure the checkbox is checked:
Click the Back to Projects link in the top-left corner.
Click the Set as Default button in the top-right corner. This will result in the Asset Processor converting all the appropriate objects for use in your game.
Once the Asset Processor has completed its operation, launch the Lumberyard Editor.
Click the Open level button, and navigate to and select the Dont_Die level. Then, click the Open button:
Note
If you were to try and play the game, you would receive a missing authentication token error. That's okay; we'll take care of that next.
Log in to your AWS Console to create an Identity and Access Management (IAM) user...
Earlier in this chapter, we learned that Amazon S3 is the AWS service that provides scalable cloud storage. One of the most useful aspects of this service is that it is scalable. This means we only pay for what is used by our game. We know that the number of players and the amount of time they play our game will be highly variable. That makes scalable cloud storage solutions ideal.
Let's look at how to use the Amazon S3 service:
Point your browser to http://aws.amazon.com/s3/.
Locate and click the Sign in to the Console button. This is likely to be located in the rightmost column. You should be taken to the AWS Management Console because you previously created an AWS account.
Click the Create Bucket button located in the top-left corner of the screen. Amazon S3 uses buckets as data repositories or containers.
Click the S3 link to open the S3 Management Console.
Create a bucket name, select a region, and click the Create button. The system will check to ensure your bucket...
In this chapter, we reinforced our understanding of the need for cloud-based solutions for the games we develop in Lumberyard. While this requirement is not unique to Lumberyard, it is uniquely easy to integrate cloud-based solutions using Lumberyard and AWS. We reviewed how to enable the Cloud Canvas gem in our game. We also created credentials and created an IAM user. You gained experience with the Canvas Resource Manager. In addition, you gained insight into the Amazon S3 and used it to create a data bucket. We concluded the chapter with a brief discussion on the Amazon S3 API, REST, and SOAP.
In the next chapter, you will be introduced to Twitch, the AWS that allows people to watch live game streaming. You will also learn how to implement Twitch functionality for in-game user interactions. Key concepts will include Twitch JoinIn and Twitch ChatPlay.