Question about server-side only logic and networking

Hi all,

I wanted to see if someone could point me in the right direction on this.

For a project that I’m currently working on, we’d like to create some “global statistics” that concern things such as player kills, game wins, etc. I am not sure about how to go about doing this from the server side of things. For instance, storing this total player kills in database. We would also like to create something like a global chat shared between server instances.

I understand the nuances of basic Unreal networking (ie, replication, etc), but unless I am mistaken, the storage code / binding to database driver libs would also need to exist on the client side.

Any input / pointers or even just an abstract overview of the approach needed here would be greatly appreciated! Thanks in advance!

-Ken

I have been trying to dig around and find the same thing, a good way to completely exclude server side things from the client. I would like to exclude a lot of things from client builds in general, like database systems and things of that nature. It would be great to find out of there is anything already built into the engine to exclude code from client builds.

Never include database query or anything that will interact directly with the database in the client, it’s the worst thing you could do. Use a PHP server or something like to be between the client and your database.

There’s a preprocessor definition you can use for this:

Yes, I was afraid that was going to be the solution. Not pretty, but manageable. Thanks!