Although the title of this article might suggest otherwise, I don’t dislike Unreal’s multiplayer features. As someone who has worked on two different multiplayer games in Unreal, I enjoy Unreal’s seamless multiplayer integration. It’s built deep into the engine instead of being moved to an optional plugin like so many other features. You can test any project in multiplayer mode without writing a single line of code. Of course, it will not work properly without many corresponding changes to the structure of your game, but still: Multiplayer is in the DNA of the engine. This has many advantages and makes multiplayer development much easier compared to Unity where you have to install and activate additional plugins and libraries before you can start working on multiplayer features. But there must be some drawbacks to this approach, right? What if you were working on a single-player game? Is there a disadvantage from having all these features? For the most part, no. Unused code/features don’t affect the performance of your game (at least not in a measurable way). But there are some small exceptions. One of them is the required data that needs to be stored in Unreal’s base classes for multiplayer to work. Mostly simple variables like “bReplicates” in the AActor class, which defines if an actor should be replicated over the network or not. Even when developing a singleplayer game, this data still needs to be stored in every instance of the class, it remains unused. But so far, this mostly seems a theoretical optimization, not very worthwhile to do in a real project. This variable is even implemented as part of a bitmask, so we wouldn’t even save a single byte, it’s just a single bit of unused data. Doing any change to a working codebase to save a few bytes in memory? No thanks. At least that was my opinion until I happened to show some students Visual Studio’s Memory Layout Visualizer, using the AActor class as an example. This tool displays the memory layout of any class...
First seen: 2025-04-08 02:22
Last seen: 2025-04-08 21:26