Skip to main content
65 votes

What's the performance benefit of saving all logged in characters in MMOs in regular intervals?

This is not for performance. This is a failsafe. If the world saves every few minutes, then if something happens to the server and it shuts down everyone will only lose a few minutes' progress. By ...
Aric's user avatar
  • 595
40 votes

How can I implement an inventory that stores different types of items?

When you are comming from non-game application development, then you need to be aware of a couple things. Relational databases have a niche role in game development. You really only need them when ...
Philipp's user avatar
  • 120k
34 votes
Accepted

How do online games handle frequent updates?

While web applications tend to store everything in the database immediately, games work a bit differently. Any information pertaining to the players currently in the game is stored in the RAM of the ...
Philipp's user avatar
  • 120k
32 votes
Accepted

How can I efficiently load huge volumes of star systems?

The trick Elite likely uses is that they don't pre-generate the whole galaxy and store it in a database. They likely generate most of the galaxy at runtime when it is needed. I would do this using a ...
Philipp's user avatar
  • 120k
9 votes
Accepted

What is the reason that people avoid PlayerPrefs to store character data and coins etc?

As implied by the name, PlayerPrefs is mostly intended for storing config options. But it can also be abused to store savegame data, if that data is rather small. If you target platforms without write-...
Philipp's user avatar
  • 120k
6 votes

How do online games handle frequent updates?

Firstly, as a comment points out, a properly configured database can be pretty fast, especially in 2022. But MMOs have been around for thirty years, so it's worth looking at the techniques rather than ...
pjc50's user avatar
  • 513
5 votes
Accepted

realtime multiplayer game database design

Databases usually only make sense for data "at rest". As in data which someone might or might not look at at a much later point in time and which you want to be searchable by different keys. If you ...
Philipp's user avatar
  • 120k
5 votes

What's the performance benefit of saving all logged in characters in MMOs in regular intervals?

Early systems that saved only on disconnect tended to also save periodically while the player was active. In those systems, typically MUDs (Multi-User Dungeons), the character was maintained in memory ...
phyrfox's user avatar
  • 376
5 votes
Accepted

How to efficiently store a large amount of data?

First of all, consider if it is actually necessary to break down the world into units of storage. 32x16x32x16x16x16 = 67,108,864 blocks. When each block is a 2 byte integer representing the type-ID, ...
Philipp's user avatar
  • 120k
5 votes
Accepted

How to connect to a server without hard coded passwords?

Don’t. You cannot secure your password indefinitely. What you can do is restrict access remotely. I don’t know anything about trello, but if it allows multiple logins with multiple permissions, you ...
Ed Marty's user avatar
  • 5,229
5 votes
Accepted

Workflow for authoring Pokémon-like game database content

I would generally not use a SQL database (not even SQLite) for handling static data in a singleplayer game. The only exception would be if I had so much data that it won't all fit into RAM. But when ...
Philipp's user avatar
  • 120k
4 votes
Accepted

Strange issue with bool comparing ToString always false - unity c#

Quick Answer: What your code actually currently does is compare references to check that they are the same, not the values of those references. Try changing ...
Jedai Saboteur's user avatar
4 votes

How to store and retrieve user data in a multiplayer game

Unity does not include a server side persistence solution out of the box. As far as I can tell the only storage solution Unity includes is PlayerPerfs, but that is client side. However that does not ...
Theraot's user avatar
  • 27.3k
4 votes

Game communicates with MongoDB in the Editor but not in WebGL build

What you are trying to do here unfortunately can not work. The MongoDB protocol is based directly on TCP/IP. But a web application running in a web browser can not create raw TCP/IP connections. There ...
Philipp's user avatar
  • 120k
4 votes

Workflow for authoring Pokémon-like game database content

Multi-user concurrent transaction support will be required if you have multiple designers who are not actively deciding who will work on the data at such-and-such a time. Without this, data can be ...
Engineer's user avatar
  • 30k
4 votes

How do online games handle frequent updates?

When i was working on a MMORPG (2006-2011ish), we loaded character data from MySQL on login, and held all updates in RAM, until character logout/avatar death, upon which the MySQL database was updated ...
hanshenrik's user avatar
3 votes

Save game on server side

I assume you know how you're going to send the file to the server and how your going to store it... To check integrity of the file you can do a few things: Check the the values in the file are ...
user3797758's user avatar
  • 3,641
3 votes

Inventory Table efficiency

If you want to do relational database design by the book, you would use the first solution. Encoding multiple independent values into the same column by encoding them in a string is a big no-no. ...
Philipp's user avatar
  • 120k
3 votes
Accepted

Where and how to store players collection in a computer card game?

The relational-database-by-the-book solution would have a table players, a table cards_owned_by_players, a table ...
Philipp's user avatar
  • 120k
3 votes
Accepted

Store temporary state in DB or not

Deciding where to keep your data is a tradeoff between speed and RAM usage. Keeping information in the database saves you money, because your game servers need far less RAM. But keeping it in the ...
Philipp's user avatar
  • 120k
3 votes
Accepted

How do Mobile Idle-Games work

You don't necessarily need to run such games server-sided. When the user exits the app, you save the game-state with the current time and date. When the player restarts the app, you reload the ...
Philipp's user avatar
  • 120k
3 votes

How to create game database editor interface like Age of Empires' AGE

All the tool does, I'm pretty sure, is unpack some data files (XML serialization is easy to set up), present it to you in a readable format, and pack the files back up again when you hit the save ...
Foxwarrior's user avatar
3 votes

How is data regarding items in RPGs and other loot-based games stored and implemented?

We can't answer questions like "how do they do it" because, well, we don't know, and they won't tell us. We can help you figure out a few things, though. In software development in general, ...
Vaillancourt's user avatar
  • 16.3k
2 votes

Ability/Skill Data and Method Structure (C#, Unity3D)

Based on your description, I would make each card effect verb a class & then use composition to combine them into cards as needed. E.G. the draw cards action would be an effect class, its ...
Pikalek's user avatar
  • 12.5k
2 votes

Relational Databases vs XML vs public static finals: Pros and Cons

1: TOTAL overhead. Like driving a 40 ton truck to your weekly shopping for you and your spouse. Adds a lot of memory eating high end functionality into what is essentially a configuration file. If you ...
TomTom's user avatar
  • 155
2 votes

Strange issue with bool comparing ToString always false - unity c#

Your first logging line isn't doing what you think it's doing. Unlike Java, C# overloads operator == on strings so as long as ...
Jimmy's user avatar
  • 9,029
2 votes

How to trigger poison effects efficiently

A "performance critical" part of your code is the check if (activeEffect is Poison) It looks as though Poison inherits from ...
George Hanna's user avatar
2 votes

Best data structure to store large amount of data

100s of objects is not a large amount of data for current machines (computers, phones, consoles). For only 100s of objects with different properties, you could save them as a comma-separated-values ...
wip's user avatar
  • 318
2 votes

How to achieve game server redundancy?

I have done your Solution 3 in the past, and it worked quite well. We then had an arbitrary number of server machines inside the server farm, each of which was running one or more pieces of the game ...
Trevor Powell's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible