Thanks for the reply! Let me try to explain things better.
There are 2 problems I’m having.
Part 1:
The easiest way to visualize the first one, is that I would like to be able to emulate a dedicated server in a single game instance (Mostly for testing, and possibly the case when one person hosts both a server and a client).
If I used a single “world”, then I can’t really simulate lag properly. The system I’m setting up is explained better in part 2.
(I agree that depending on load, it might make a lot more sense to just have the “server” and “host client” be the same instance. But, I’d like the option to set things up this way regardless.)
Part 2:
I’m trying to set up an event driven game engine, so basically both “worlds” will be running the same events. The issue, is that the exact timing of the events varies.
For example, imagine the case of a single player controlled character (on Client A). This player moves. The network flow is as follows:
Client A sends move command to server -> Move command is processed and propagated to all clients -> Client A receives command and moves character
Okay, that’s fine. But, in this case the move command has to do a full roundtrip before it is seen by Client A, making input feel very sluggish. Here’s what I want to do:
First, Client A has two instances of the world. One instance is “synced” to the server. The second is a graphical instance, which gets player input events before the server sees them, and then uses the synced version to interpolate any arising discrepancies over time.
In this set up, the flow looks like this:
Client A sends move command to server -> Move command is processed and propagated to all clients -> Client A receives command and moves character on SYNCED instance
Client A sends move command to graphical interface -> Character starts to move instantly on their client -> Synced instance and graphical instance are now out of sync. -> Apply interpolation/etc to fix the variance
So, objects need to have a “synced” position/parameters, and a “graphical” position/parameters (technically this is only NEEDED for player controlled objects).
The key here, is that I want to keep as much as the basic unreal engine usable as possible. I’m afraid that any hacky approach is going to break a lot of the base awesomeness of the engine.
P.S.
It would be acceptable to instead of having completely distinct worlds, only double up the player controlled objects. But, even still, I would need those objects not to interact with each-other (interaction as defined by the unreal engine itself, not my arbitrary interactions). I feel that both these issues are very similar. Basically, what is the best way to segment the physics and nav system (and other underlying components of the engine)?