Where can I find more information about AGameMode?


I want to understand how AGameMode works. Ideally no default game logic would have been added. Now it’s important to understand what’s happening in order to being able to guarantee high quality. I can’t get a clear picture of how the code path looks from only looking at the API. Is this sort of documentation available somewhere? E.g. in what order are the different methods called in AGameMode? Is there e.g. some “state” diagram available or similar?

When is StartMatch called? Are players spawned before or after? How do you setup a delayed start? Where to check if the game is ready to start? Is this done automatically or not? If I want to spawn two players myself and not search for their actors when they automatically spawn, how can that be achieved? And so on…

I find the blob design of UE4 confusing and error prone. Also things like MinRespawnDelay makes no sense in a RTS game or any game really where you can’t die or respawn, therefore it sometimes makes me uncertain if really ARTSGame has an ISA relation to AGameMode.

Here only offical documentation on game mode


Othr then that you at your own, but don’t be shy, experiment and figure things for yourself :slight_smile: you can also try to figure things by looking at source code (you need to tie your unreal account with github to see it)


Okay, I will give the source code a try. Thanks!

Although this question is marked resolved, I’d still like to have a official Epic documentation outline what’s being done in their Server/Client model. From the point a level is loaded and call InitGame, client joing, spawn, StartMatch, kill/respawn/update GameState, reach end of match, and either restart or load next level. Right now I think UE4 is still a more shooter based framework, but when the discussion continue, it could be better down the road.

I agree that would really reduce the learning curve of the game engine. Just a simple state diagram would help a lot.

Hi, @PenguinTD. We really appreciate your feedback. We are currently working on improving the available documentation, in particular in regards to networking and multiplayer. In the meantime, we would encourage you to investigate the source code available on GitHub to familiarize yourself with how the engine handles these areas.

Have a great day.

Yep, @Tim Lincoln being doing it the past few days. It’s no small task to dive into source code and try to figure it out on your own. But thanks to available doc/questions, I can at least dig out some threads that I can follow.