MongoDB for Gaming

Aaditya Tiwari
3 min readJun 3, 2021

Data has always been an essential part of video games. From player profiles to telemetry, matchmaking to leaderboards, data is crucial to making games work — and making them better.

A Database for Video Games

Why should MongoDB be the database for your next game? Whether you’re a solo developer or working on AAA titles, MongoDB gives you the best way to work with data.

Data Model

MongoDB’s flexible schema means that you can change your data layer just as quickly as you change your game. Need to add new items with new kinds of stats, fix a level, or start storing new player data? No problem. Plus, MongoDB stores data as JSON-like documents- you’re probably already using JSON in game memory, and storing objects in the same structure makes your life easier.

Global Cloud Database

MongoDB Atlas is a fully managed cloud database available in more than 60 regions across AWS, GCP, and Azure. Deploy around the world to keep data near users for low latency, adding geo-redundancy to Atlas’s built-in high availability. Scale both vertically and horizontally, from a forever-free tier to clusters that can meet the most demanding workloads. Best-in-class automation and monitoring.

Data & Development Platform

MongoDB Cloud includes built-in data services like full-text search, data lake, workload isolation for analytics workloads, and more. Above the data layer, MongoDB realm will offer a serverless development platform, an embedded mobile database, and data access and sync services. MongoDB charts deliver a visualization tool that’s integrated natively, making it easy to build reports on growth metrics and adoption, share dashboards, and more.

How Can You Use MongoDB?

Extensible Player Profiles

MongoDB’s flexible document data model allows you to quickly iterate on what constitutes a player in your world. Add and associate new features to player profile objects such as achievements, progression-based unlocks, in-game currency, new classes of gear, and more. Keep your players protected with enterprise-grade security controls at the data layer.

Session Matching

Whether you’re matching 2 players in a 1v1 or 100 in a battle royale, MongoDB’s elastic scalability means you can do so quickly and reliably. The database’s built-in aggregation pipeline allows you to perform real-time analytics on player metrics to help ensure that you’re putting the right people together in a session.

Entitlements and Inventory

To check whether a player is allowed to take an action, you need low-latency reads at scale. Delays in loading levels or opening menus make players unhappy. When dealing with inventory, you need fast reads and writes with transactional integrity — especially if players have paid real money for their items.

Telemetry Capture and Analysis

Capture game events, scaling to meet high-write workloads. Run real-time analytics to optimize player experiences on the fly with MongoDB’s built-in aggregation framework. Move data to analytics engines such as Spark for large-scale data processing to figure out the next move. For long-term analysis, shift telemetry data to Atlas Data Lake to save on compute but retain the ability to run analysis on demand. The MongoDB cloud platform also makes it easy to visualize data and share insights, with native visualization for polymorphic data and connectors to SQL-based BI tools.

Ancillary Services

Support messaging and real-time interactions, including cross-game communications. Integrate user-generated content into your games. Update live leaderboards with views and the aggregation framework. Build companion apps and websites to extend the experience of the game. If it relies on game data, someone’s probably already built it with MongoDB.

THAT’S ALL

THANK YOU :)

--

--