Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Extract the Version Information of a Game with Unity and C#

If you play a lot of games, you probably noticed at some point in time that the version number or build number of the game is often presented clearly on the screen. This is often not by accident and is instead a way to show users that they are using the correct version of your game. Not only that, but it can help from a development perspective as well. For example, have you ever built a game and had a bunch of different builds floating around on your computer? Imagine trying to figure out which build is correct without seeing any build or version information!

In this tutorial we’re going to see how to very easily extract the build information defined in the project settings of a Unity game.

Read More

Interacting with Sprite and UI Buttons in a Unity Game

When you’re developing a game, whether it be 2D or 3D, you’re going to need to add menus with buttons at some point. These buttons could be as simple as a means to exit the game, or something more complex.

In the Unity game development framework, there are a few ways to accomplish buttons. You could create sprites and interact with them through mouse clicks and keyboard presses, or you could make use of the canvas and UI elements.

In this tutorial, we’re going to look at both options for creating buttons in a game.

Read More

Implement the Konami Keystroke Cheat Code in a Unity Game

Remember all the cheat codes you could use in old-school games back in the day? Remember the Konami cheat code? Ever wonder how you could add cheat codes to your own games?

Adding cheat codes to your game is a great way to leave your imprint. Think easter eggs, but even more secretive.

In this tutorial we’re going to see how to add keystroke driven cheat codes to a game built with Unity and C#. While the Konami cheat code will be the basis of this example, a lot of the logic and ideas can be applied to other aspects of your game.

Read More

Building a Space Shooter Game that Syncs with Unity and MongoDB Realm

When developing a game, in most circumstances you’re going to need to store some kind of data. It could be the score, it could be player inventory, it could be where they are located on a map. The possibilities are endless and it’s more heavily dependent on the type of game.

Need to sync that data between devices and your remote infrastructure? That is a whole different scenario.

If you managed to catch MongoDB .Live 2021, you’ll be familiar that the first stable release of the MongoDB Realm SDK for Unity was made available. This means that you can use Realm in your Unity game to store and sync data with only a few lines of code.

In this tutorial, we’re going to build a nifty game that explores some storage and syncing use-cases.

Read More

Getting Started with the Realm SDK for Unity

Did you know that MongoDB has a Realm SDK for the Unity game development framework that makes working with game data effortless? The Realm SDK is currently an alpha release, but you can already start using it to build persistence into your cross platform gaming projects.

A few weeks ago I streamed about and wrote about creating an infinite runner type game using Unity and the Realm SDK for Unity. Realm was used for storing the score between scenes and sessions within the game.

There were a lot of deep topics in the infinite runner (think Temple Run or Subway Surfer) example, so I wanted to take a step back. In this tutorial, we’re going to spend less time making an interesting game and more time including and using Realm within a Unity project.

Read More

Build an Infinite Runner Game with Unity and the Realm Unity SDK

Did you know that MongoDB has a Realm SDK for the Unity game development framework that makes working with game data effortless? It’s currently an alpha release, but you can already start using it to build persistence into your cross platform gaming projects.

A popular game template for the past few years has been in infinite runner style games. Games such as Temple Run and Subway Surfers have had many competitors, each with their own spin on the subject. If you’re unfamiliar with the infinite runner concept, the idea is that you have a player that can move horizontally to fixed positions. As the game progresses, obstacles and rewards enter the scene. The player must dodge or obtain depending on the object and this happens until the player collides with an obstacle. As time progresses, the game generally speeds up to make things more difficult.

While the game might sound complicated, there’s actually a lot of repetition.

In this tutorial, we’ll look at how to create our own infinite runner game with Unity and C#. We’ll look at important concepts such as object pooling and collision, as well as data persistence using the Realm SDK for Unity.

Read More

Developing a Side-Scrolling Platformer Game with Unity and MongoDB Realm

I’ve been a gamer since the 1990s, so 2D side-scrolling platformer games like Super Mario Bros. hold a certain place in my heart. Today, 2D games are still being created, but with the benefit of having connectivity to the internet, whether that be to store your player state information, to access new levels, or something else.

Every year, MongoDB holds an internal company-wide hackathon known as Skunkworks. During Skunkworks, teams are created and using our skills and imagination, we create something to make MongoDB better or something that uses MongoDB in a neat way. For Skunkworks 2020, I (Nic Raboy) teamed up with Barry O’Neill to create a side-scrolling platformer game with Unity that queries and sends data between MongoDB and the game. Internally, this project was known as The Untitled Leafy Game.

In this tutorial, we’re going to see what went into creating a game like The Untitled Leafy Game using Unity as the game development framework and MongoDB Realm for data storage and back end.

Read More