How to make a game without gameplay framework

Hi, I am new to UE and I have a background with Unity.
I spent two evenings trying to figure out how to make a minimal game without all the stuff I dont need.
UE4 forces me to use PlayerController, HUD, GameState etc. the concepts of its Gameplay framework, but my game does not need any of those. I want to write my own actors.

This guide mentions that I can disable gameplay framework somehow, but I can not find a way to do it anywhere :frowning:

You can’t ‘Disable’ it, but you can choose not to use those classes if you really want to. Either way you can’t avoid some things, like have a Controller for the player for example. Without that you get no input, no camera, nothing really. That guide is pretty misleading to be honest.

I would recommend sticking with it where it’s applicable, because otherwise you’ll be fighting the engine all the way.

Thanx for the reply!
I found that in project settings I can disable some of the annoying actors

So no Pawn and no HUD, we are getting closer :slight_smile:
Now I understand that I need PlayerController to manage camera and input. The name “PlayerController” does not fit my project, but I can live with that.
For some reason I cant remove GameState, PlayerState and Spectator, how do I do that? Or these actors also have some important roles I am not aware of?

Why don’t you just not use them in you’re code? You can ignore stuff like GameState etc… What is you’re game idea? Maybe we can help you fit you’re game into the framework?
You really shouldn’t be wasting time looking at this stuff effectively not using these classes in you’re code is the same as setting them to None…

Being an ex-Unity dev too, I can fully understand your frustration with the Gameplay Framework. Feels like in Unity you have this clean blank canvas to start on, but in UE4 you are knee-deep in clutter, constraints, and pre-made stuff you don’t want in your project in the first place. You can’t really “disable” it, but you can ignore it almost completely (unless you’re making an online game. Then you’ll be happy you have it.)

You’ll have to handle input in the PlayerController. But aside from that, just make your own Managers and whatnot instead of using all this GameMode/GameState/PlayerState stuff. The default ones are harmless and won’t do anything in particular by themselves

There may be a way to make none of it appear if you create a custom GameMode and override some of its initialization functions (GameMode::InitGame(), maybe?). You’ll have to look into it

It is possible to become comfortable with UE4’s sea of polluted code and all the stuff that it imposes on you and forces you to live with, though. It just takes a lot of time and effort. I guess we have yet to see a “perfect” engine getting released. It would have to have Unity’s “blank canvasness” and UE4’s rendering/tools quality, which is by all means a realistic goal


I really wouldn’t want Unreal to be as blank as unity, because having all the extra stuff does not actually stop you from writing stuff from scratch but if you actually need the framework it’s a huge time saver.

I know some people who are using unity and are replicating a lot of the unreal framework, because it’s a well designed, battle tested one. The question of how basic an engine should be in it’s game play framework is a complicated question, because having a blank system has it’s trade offs also.

There just isn’t a perfect engine and believe me from experience, not even when it’s completely designed for one game, just different tools with different pro’s and cons.

1 Like

Personally I would learn how to use the gameplay framework, I don’t see how it really gets in the way, it’s a pretty sensible basic framework. If you are starting your effort to learn Unreal Engine by trying to make it like Unity, well, you’re making life hard for yourself.

It’s not that big an effort to figure it out, the documentation is pretty good :

The classes that you can not remove are all required for basic network interaction which is one the keystones of the engine. Every PlayerController will have an PlayerState, which is responsible for replicating the players network data. Same goes for the GameMode and for it’s GameState class, the mode is only available in the host and handles joining, match handling, etc while the GameState is used to replicate global game related information to the connected clients.

Honestly if you choose to ignore the framework then fine, but you’ll be in an uphill struggle all the way. A lot of core functionality won’t behave without it and you’ll run into mishaps later down the line. If want to use any of the navigation or AI features for example, and you don’t use a pawn with a PawnMovementComponent - good luck with that.

There’s a lot to be said for using the tools in the way they are designed.

By the way, I know it seems like I just made a little rant about the Gameplay Framework, but I completely agree with the others that it is much better to just bite the bullet and learn how to use it.

The official doc never managed to clearly explain the Gameplay Framework to me. It says things like “the player name and score goes in PlayerState, and the game’s rules go in GameMode”. That just leaves me with more questions than answers. WHY do things have to be like this? What do you mean by “game rules” and how do they even get applied? What does it actually do in practice? What is the lifecycle of all these objects? Why do game-specific things like name and score come built-in into the engine? It’s ugly!!!

But then I found this:
It explains everything clearly, and from a programmer’s perspective. Read pages 7 to 47 carefully, and suddenly everything will become clear. You’ll see that the Gameplay Framework is actually a brilliant generic structure for online games.

I’ve tried to think of games that wouldn’t work well with the Gameplay Framework, and I couldn’t think of any. Even games with an atypical online structure such as Dark Souls or DayZ, or even games that people say UE4 “doesn’t do well” like RTSs (my guess is that the people who say that are mostly non-programmers who are used to having everything pre-made for their game in advance. UE4 comes with a lot of pre-made shooter gameplay classes that you can use if you make a shooter game, but since it doesn’t have pre-made RTS-gameplay-specific classes, they think it can’t do RTSs). They all work well. The Gameplay Framework is generic enough that you don’t have to worry about specific game compatibility. **The worst case scenario is that you won’t use certain aspects of the framework, but it will never actually prevent you from doing anything **

It basically consists of:

  • A class that serves as server-only logic (GameMode)
  • A class that represents the client as a whole, and can communicate with the Server (PlayerController)
  • A class that represents the public data of every client, accessible to everyone on the network (PlayerState)
  • A class that is the central place to store data accessible to everyone on the network (GameState)
  • A bunch of functions to make all connected players safely travel to new maps with everything getting properly cleared and initialized, handy Login() and Logout() events, etc…

Yup, it all makes sense when you think about it. IMO it also encourages good organisation as well.

Study the C++ examples (or in fact, any of the samples), it’ll help.

Sorry to necro the old thread, but does anybody have a working link to that document?

Multiplayer Network Compendium | An Unreal Engine Blog by Cedric Neukirchen

1 Like

Thanks Rotem!