AWS for Games Blog

We Also Make Games: AWS’ First Internal O3DE Game is Now Available!

Author(s): Starr Shaw, Technical Artist for O3DE / John Kennedy, Head of Product for Amazon Lumberyard and O3DE

Developers like code. Developers like demos. But game developers, in our experience, REALLY like code and demos. And we’re looking to share some code and demos with you! After all, when you’re starting to create a new game, it can help you when you can see something working, and explore “how they did it.”

We love this; after all, one of our AWS Leadership Principles is Learn and Be Curious. We want to encourage both our own developers and the Open 3D Engine (O3DE) community to explore and innovate. We also want to Dive Deep into O3DE from a user perspective and experience it just as its users and community contributors do, and we want to share our results to both inform and inspire you.

So from July 26 to July 30 of this year, the AWS O3DE engineering folks held a Game Jam. The charter was to experiment with the new features that we launched for the Developer Preview —and just have some fun making games! We formed teams across the organization, got to codin’ and buildin’, and delivered 8 games by the end of the week. Some of these games are pretty good!

Today, we’re happy to share one of these games, called “Planet Storm.” Also, we’ll be making all code and assets for this game available to the O3DE community!

But let’s not forget the folks who did the development! Planet Storm was developed by AWS Game Tech engineer Starr Shaw, who wrote this game in — yep, one week! — during the Game Jam.

Planet Storm was imagined as a 3D, physics-based, side-scrolling platformer inspired by the 1980’s IREM classic “Moon Patrol”.

Want to dive right into the code? Get started with the links below, or read on!

We decided to set Planet Storm in an off-world mining colony where there are many valuable resources to collect. To keep it simple, the player starts this physics-based, side-scrolling game while in motion and, as a result, you only have one possible action to initiate: JUMP like your moon life depends on it! As you navigate the planet’s harsh environment of rocks, cliffs, and chasms, you must collect the power resource gems to continue on your way.

Here’s concept art we created, so you can see the experience we were targeting:

To start, we used Blender and Adobe Substance Painter to build the key assets for the game. The main character of the game is an interstellar planet ATV vehicle that you drive across a harsh alien landscape.

And here are the original models for the game built in Blender:

Landscape


ATV


ATV after the import into O3DE:

Here are the textures created using Substance:

ATV


Gate

Landscape


Starting Platform

Assets? Check. Now, what about the gameplay mechanics? I kept it simple:

Mechanics: You start at 100% fuel in your planetary buggy. As you move you consume this fuel, and once the tank is empty (0%) your game ends. To extend your play time and score higher, you must collect the world’s floating gem resources. where each are worth a fixed amount of fuel. Of course, you can also end the game by crashing into one of the planet’s deadly environmental objects, such as boulders or chasms. As I said before: JUMP!

All of the game behavior was defined and mapped in O3DE’s Script Canvas tool. I used Script Canvas to create the main game loop, logic, player and environmental interactions, and GUI behaviors. I defined custom, data-driven Script Events that I handled in Script Canvas to handle gameplay events like exploding rocks.

To show you some examples of the logic and how it looks to a developer as it’s being defined, here are some of the Node maps as seen in the Script Canvas Editor:

To start the game play loop, we wait for a keyboard input to start the game:

This is the core game play logic script, and controls most of the game. (This is a relatively spacious script, so we’ve sliced it into two images.)

Part One:

Part Two:

Once the StartGame Event has been activated, we will move the scrolling backgrounds at different speeds to make an old- school parallax effect. (If you’ve played Moon Patrol, you’ll know why it’s essential.)


Hitting objects in the game launches events as well:

The player character, “The Buggy,” behaves based on physics calculations. Script Canvas is used to implement jumping behavior, based on velocity, whenever the player presses the space bar to jump.

Exploding Rocks

When The Buggy collides with a rock in the game, all of its physics-rigged components are triggered to ‘Wake Up’. Similarly, the fragments of the rock are not stable and set to explode once awakened.

In Blender, a rock looks like this:

We pre-sliced the rock in Blender to support some very basic destruction behaviors in scripting, and implemented them.

Now, when the player hits a rock, it will break into the components we’ve defined.

With all the assets ready, we’ve reached the end of the game loop. This EndGame Event is called if the game logic conditions are met; and in our case, it’s when The Buggy is `Out of Fuel` or the player has damaged The Buggy beyond repair.

Here’s the game in action. It’s pretty snazzy for a week’s worth of work, but we bet there’s even more you could do with it. There’s no better way to learn a new tool than jumping right into code!

Read this far? Hop on over to GitHub, clone the game sources, and check it out for yourself! Join the O3DE communities and share your thoughts, ask questions, or even submit a pull request. We’d love your thoughts and feedback as well as ideas on future game samples.

We’ll be providing more game examples to inform and inspire you in the coming weeks, so keep an eye on this space.