What about making a pseudo dedicated server where you remove all the graphics rendering in the game (so ram still has all the memory of all the assets and players but render is nothing so it’s all black like a blank level) and give the player a basic UI to do? That is assuming there is a method or blueprint at runtime that can disable all rendering.
So my logic is that a dedicated server is just a normal game running with the cpu and ram but you have no usage of GPU to render the graphics thus no gpu bottleneck, so I’m thinking like why not just use a listen server but remove all rendering so you kind of have a dedicated server of sorts. This is all to bypass the need for me to learn how to make a dedicated server XD
How does this method compare to a normal dedicated server?
What is the goal of this black-window server? Why is it better than a standard listen server?
Can you get the same effect by just making the window very small, and set the LOD distance to very small? Or place the camera 200000 units above the world, pointed up?
To be honest it’s not that hard to setup. The only boring part is waiting for the engine to compile from source. The rest is just copying the editor target file in you project and replacing the word editor to server in it.
Then you run your project from your source build and in the package options you get a new option → server.
Just as an FYI, Servers do not render anything. No fx, no materials/textures, no audio etc. They are for the most part math engines. The game world to the server is vectors, transforms etc based on the collision hulls of the mesh, not the mesh itself.
real quick as currently learning about dedicated servers,
do i need to make 2 packaged version of the game?
if done right then I should see the in the package options like where you see windows, mac, and linux, are you saying in thaty location I will see a new button for server? how to know if that is a windows server or not?
also how does the game in server package will run as I need a UI in the main menu to host a game or a 3d lobby to host the gam. Is the dedicated server version I have to edit the code where when start up will auto host? then how do you select the map or settings? I seen people use command line but does blueprints have command line?
as you can see there is a couple of knowledge I am lacking in this field, if you can reply then many thanks!
The dedicated server has no ui, there is no use in spawning widgets on it. It normally runs in a headless configuration. You can only see the terminal if you run it with the -log command
I was just showing someone the dedicated server in a project demonstrating repNotify. There is a downloadable project with configured client / server. You just need to point the uproject to your compiled engine source to test it.
The project settings let you select the map the server starts on.
If you want a dedicated server then c++ is the only option. It doesn’t work with just blueprints.
As for if you need a separate project for client / server. That’s a tough question. The client needs to call events on the server, so it needs to know about them (their input parameters , is it a reliable RPC etc).
You can’t really do that with 2 separate projects.
The only way you could implement this would be through a custom network protocol or through serializing / de-serializing commands through for instance json (not the most efficient).
A third option would be to have your server logic be a 100% custom, but that is more complex. Then the client and server logic can be completely isolated only pushing information via sockets.
I read the doc sent by @RevOverDrive and saw your post, is this right? I have some more questions.
Compile a dedicated server from the source, then from Visual Studio there is the option to build a dedicated server?
what does cooking in the editor do? it doesn’t seem necessary as you can build the project in Visual Studio as a dedicated server.
have to package the same project but one version is for normal game the other is for dedicated server?
but how do you still edit the settings of the server to change game modes or maps? Or is that like a voting system for client I have to add to indluence the settings on the dedicated server?
when you run the exe to make a dedicated server how do you choose the name of it or add a password functionality after start up?
do I have to change the code for a listen server as I’m guessing dedicated servers need code that runs automatically without player / host input like a listen server?
what do you mean in your post to change focus on dedicate server and then rep notify started to work?
if I release a game can I be lazy and other people convert my game to dedicated server or I have to do the work to allow that structure?
i heard someone say you can use the console command “-server” and that makes a dedcated server, what does that do?
the -server was used in the older versions of unreal when you could run the dedicated server without source compile. It’s been gutted with the newer changes to the engine architecture.
The dedicated server focus is just a thing when you run clients & server on the same machine. Normally you wouldn’t see this as it would be running somewhere else (a hosting service aws or some other server farm)
The server logic for the most part is up to you. There is a whole slew of c++ commands that let you handle things like basic cheat detection (rpc with validation), player kick commands, checking logging / logging out.
As for password functionality, login logic is usually separate from unreal’s servers in production environments. You’d have a lower end machine that would just handle the login logic and spin up a dedicated server if an instance is needed.
Servers are a can of worms in itself. Frostgiant the new studio from ex blizzard employees basically said in one of their last interviews that they decided to roll their own client server networking because unreal’s woudn’t cut it for an RTS. It’s basically only built for smaller scale fps / third person games.
There are some extra options with replication graphs introduced with fortnite, but you need to enable them through c++ with some extra configuration.