Do I have to make two projects for client/server?

I am making a small scale 2d mmo for android (Maybe 100 players, and if it grows i’ll upgrade servers.) I’ve made a dedicated server and want to house the entire game on the server and have the clients only do input actions that call to the server to prevent people from having access to the game code. How would I go about developing this?

Do I make two separate projects? One for the client and one for the server? Do I use RPC functions to communicate between the two? There doesn’t seem to be much documentation explaining this.

Hey there~!

All you need to do is have one project and use RPC to talk from server to client and client to server.
If you’d like to know about Unreal engine replication you can view this playlist from Unreal Engine

Hope it helped you a bit :slight_smile:

Ahh I see, But when a player downloads and installs the client, is the server code gonna go into that exe as well? I’m thinking about security here. I mean, if i’m developing it all on the same project file.

Like the login user database for example, does that just automatically get excluded from the client exe if there’s a server involved?

Hey.

All blueprints or actors or c++ classes have the server code in it too, however that code can only be executed from the server if it’s set to Run On Server. Clients won’t run any Run On Server code.

Also if you have a login user database, it might be best to host that externally as otherwise you’d have one per dedictated server.

U have Gamemode class which only runs for server/hosting client. There u want to implement servergode/gamelogic.
Then u have RPC/Replication/networkmodes (owner/proxie) etc which u can use in most classes.
Finally u can compile ur project in different modes. aka debug client/shipping server etc. when selecting server it will compiile an exe which wont use any graphic/sound etc stuff and can act as dedicated server(u need to download sourcecode of ue4 for it)