How to approach networked procgen'd worlds?

I’m working on a prototype that currently generates ~800 proc-gen’d static mesh actors to make a level. It’s prototype code, so it’s really dumb, and they’re mostly just cubes. Not even custom procedural meshes! Some are interactive, but the majority don’t do anything. When connecting the client, it takes minutes to connect and sync the existence of these cubes.

I’d like connection to be much faster, and/or responsive to player input, so they could walk around while the actors stream in.

My first thought, since the procgen is deterministic to a seed, is to just send the seed to the client and have them generate a bunch of local actors. This is super fast to connect, and it visually works, but as a player steps on a block, the third person character code can’t resolve what actor they’re standing on, so we get warnings:

> LogNetPlayerMovement: Warning: ClientAdjustPosition_Implementation could not resolve the new relative movement base actor, ignoring server correction!

I’m not sure what the ramifications of this are, although things seem mostly to work despite it.

My last resort would be some kind of mesh generation, so I’m only streaming tens of actors not hundreds, and/or bite the bullet and move to a voxel renderer. But since this a prototype, I’d really like to do whatever is least-effort. I don’t care about network security, nor do I particularly care about milisecond latency.

What would you do in this situation? Is there any more info I can give you?

I have the same problem, if I create “manually” instances of the same actor on both client and server instead of using a replication mechanism as soon as i step on the actor i get the same error:

> LogNetPlayerMovement: Warning: ClientAdjustPosition_Implementation could not resolve the new relative movement base actor, ignoring server correction!

Wondering if there is a way to deal with the warning and avoid network replication, maybe actor names or setting some obscure id for both.

If some of the Unreal gods can help, please xD

Sorry to necro, but having this exact issue. Did either of you guys figure anything out?

Yes me too!
help

This is expected. The issue is that because you have created all of those actors locally, none of them can be referenced over the network. CharacterMovement component relies on being able to reference the actor it’s standing on for network use. Replicated objects that are spawned by the Server, or objects which exist in the map file at load time can be referenced because the engine knows that all players have identical copies.

It’s not that straightforward to try and get locally-spawned objects to sync up between connections. You might start by looking at UObject::IsSupportedForNetworking(), UObject::IsNameStableForNetworking() and UObject::IsFullNameStableForNetworking()

There are a couple of people in the UE4 Discord group who have attempted it recently and I think they have something working now - you might be best to ask there.

I tried to find this discussion in Discord, but I culd not find it, do you have some link? Thanks!

Does someone has any idea on how to solve this? I am creating things locally but I DO have a way of syncing things, based on an uint16 unique number. I don´t know exactly how to create a descendante of charactermovementcomponent. i could replace an actor but I don´t know to to descend and use a descendant of a component.

Do you mean replace the default character movement component from ACharacter with your own sub class ? I was looking at that the other day,

You can subclass the default UCharacterMovementComponent and do whatever you want with it then override it in the constructor where you are subclassing ACharacter so it uses yours. Something like below



.h

UCLASS()
class YOUR_API AYourCharacterBase : public ACharacter
{
GENERATED_BODY()

public:
AYourCharacterBase(const class FObjectInitializer& ObjectInitializer);


.ccp
#include "YourCharacterMovementComponent.h"
AYourCharacterBase::AYourCharacterBase(const class FObjectInitializer& ObjectInitializer) :
Super(ObjectInitializer.SetDefaultSubobjectClass<UYourCharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
{

}


Is this about when switching maps that when you come into the next map you have no movement control? I have this issue and was starting to look into it, but found this. Is this the fix for that?

EDIT: NOPE not a fix for my issue.

Greetings! Sorry for a necro, but did you found a solution? Have same bug