Sign In Register

How can we help you today?

Start a new topic

About Code Cloud and Authoritative Server


I'm trying to understand the possibility to use Code Cloud to run an Authoritative Server using the Realtime service.
So far as I understand what I want to do is possible but I still have a few questions and some might sound strange since my knowledge is peculiar I suppose.

First my story, I was planing on using SFS2X to write my server and UE4 to run my client, when I first picked it up I focused in the server code and had a quite decent abstraction of the battle instances and etc. When I came to start developing the client I ran into issues using the their API in UE4, to which after some reading I started writing an plugin to interface with the API (the API required RTTI while UE4 basically doesn't allow it). After testing the concept and it worked so I wrote the API, but as I was working with the UE4 Client I started getting undefined behaviour... After more time wasting I found that the boost libraries used by the API had redefined an UE4 macro that actually lead the basic concept of the whole plug-in not to work...

Not willing to waste more time, I'm looking for an alternative, photon cloud doesn't allow for code to be run on their servers unless it is an in house (and effort I don't think I have to make), next I looked at the UE4 Networking itself, but as I understand the concept I feel it has allot of features I don't need and only allowing one map to be run per server makes it cumbersome for my project.

Basically I'll have the server run numbers in an abstract battle and use the client mostly as a "video player", since the client doesn't actually ever move around, he only makes decisions that will latter be played out.

Now the point is I've used allot of OOP (c++, java, c#) but never actually used scripting for as strange as it might seem, for what I've read around I turned rather suspicious specially of JS. So is what I intent to do feasible in JS and GS?

Also, so far as I understand Code Cloud is to be written in your website, but I would rather use an IDE for it (possibly VSC) is there any way to have code completion of the GS Objects or do I have to memorize all the specific syntax?

I know some of these questions might sound ignorant, please excuse me for it.


Hi Bruno, 

At a high level you can use the Realtime sessions intermediary server to intercept packets via callbacks listening for packet op codes. You can then define ranges of expected inout outside the bounds of which can be considered potentially bogus, or the result of hacking. 

With calculations taking place on the server you can mitigate the risks associated with direct input in the client,making it easier to determine expected input and handle accordingly. 

Obviously this ranges broadly according to architecture and implementation however the server allows for the reading, evaluating and sending of packets, enabling you to develop a server authoritative implementation. 

Happy to help, Patrick. 

It needs to receive input form the player in real time, just not as movement. Let's say that the player makes tactical decisions in real time but the timing of execution of such decisions is left for the server. Same with the AI that is to be ran on the server if it is a single or co op battle.

Due to the nature of how these results are sent from the server and how the player can at any moment change their previous decisions data has to be transferred back and forth even if in quite small packets.

Sorry for the delay in the answer, haven't had the possibility to come here.


 Hi Bruno,

Before giving you a full answer. If your game does not have movement or need for immediate response, why would you want a realtime server?



Non outstanding of the previous questions, I've read about some numbers called "Fair Usage Policy" and one thing has called my attention:

  • API Requests: 5,000 per MAU

Does this mean that including log-in, messages, code cloud and other services I can only make 5000 network calls per month per user?

Login to post a comment