#archived-networking

1 messages · Page 6 of 1

open valve
#

I don't want to make a whole custom scene management solution and I don't want to modify the netcode library... so I made this dirty fix (added to Awake on my network objects script)

if (!NetworkManager.Singleton.IsServer && !NetworkManager.Singleton.IsClient) // make sure we are not running the server yet (and we are not the client)
{
    var type = NetworkObject.GetType();
    var fields = type.GetFields(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
    foreach (var f in fields)
    {
        if (f.Name.Contains("IsSceneObject"))
        {
            f.SetValue(_obj, false);  // _obj is NetworkObject component
            break;
        }
    }
}

And then I simply spawn the NetworkObject manually when I click Host

#

Worked for me, probably gonna optimize it a bit more - cache that field somewhere and reuse it

forest grotto
#

if i have button to start the game it would call a function that first launches dedicated server and the server is ready move/connect all players in the lobby to the ip of the server? that should work

sharp axle
fair escarp
sharp axle
#

Yes, the server always has full permissions

sharp axle
fair escarp
sharp axle
fair escarp
#

It's a 3rd person shooter

sharp axle
frosty kelp
#

Can a host not use server rpcs? My client can shoot the host but my host can't shoot the client

tidal prawn
#

Hi, I got this code for client and host playermovement (just some simple movement) the issue is the client moves way slower and is kind of janky any ideas how I fix this? ```public class Player : NetworkBehaviour
{
public NetworkVariable<Vector3> positionPlayer = new NetworkVariable<Vector3>();
private void Update()
{
if (IsOwner)
{
ClientInput();
}
}

private void ClientInput()
{
    Vector3 moveDir = new Vector3(0, 0, 0);
    if (Input.GetKey(KeyCode.Q)) moveDir.x = -1f;
    if (Input.GetKey(KeyCode.D)) moveDir.x = +1f;
    float moveSpeed = 3f;
    Vector3 position = transform.position;
    position += moveDir * (moveSpeed * Time.deltaTime);

    if (transform.position != position)
    {
        ClientMoveServerRpc(position);
    }
}

[ServerRpc]
void ClientMoveServerRpc(Vector3 position)
{
    transform.position = position;
    positionPlayer.Value = position;
}

}```

austere yacht
sharp axle
#

Host is a client and server so a ServerRPC should work

austere yacht
frosty kelp
#

So my host shoots a million bullets at a time, and I am getting a client that cannot change this network variable error. Except my code works for clients just not the host. I can't figure it out.

sharp axle
frosty kelp
#

Is there another way to handle hit registration? I checked it is a network behavior.

sharp axle
frosty kelp
#

I fixed the issue, my network variable write permission needed to be set to server, not owner. I will change the health ui to change from OnValueChange() Thank you for your help.

fallow adder
#

So im trying out photon pun 2 and I wonder how can I sync ui panels for all players? I cant really find clear answer to that apart from rpc for something simple like text so I didnt try it + its not a room, its a lobby to join rooms from, I instantiate panel on canvas with room info through photonnetwork.Instantiate and I see it for a split second before scene is loaded only on player who created it

austere yacht
#

if you're lucky your framework can sync transforms nicely and offers some help with animations

fallow adder
tidal prawn
#

Ive created a simple movement script but the client is laggy and way slower why is this?``` public NetworkVariable<Vector3> positionPlayer = new NetworkVariable<Vector3>();
private void Update()
{
if (IsOwner)
{
ClientInput();
}
}

private void ClientInput()
{
    Vector3 moveDir = new Vector3(0, 0, 0);
    if (Input.GetKey(KeyCode.Q)) moveDir.x = -1f;
    if (Input.GetKey(KeyCode.D)) moveDir.x = +1f;
    float moveSpeed = 3f;
    Vector3 position = transform.position;
    position += moveDir * (moveSpeed * Time.deltaTime);

    if (transform.position != position)
    {
        ClientMoveServerRpc(position);
        transform.position = position;
    }
}

[ServerRpc]
void ClientMoveServerRpc(Vector3 position)
{
    positionPlayer.Value = position;
}```
tidal prawn
#

isnt the clientnetworktransform unsafe

#

are there any examples on this?

rapid plover
#

first time doing multiplayer

tidal prawn
#

yeah new to this network thing thnx

olive vessel
rapid plover
#

oh

sharp axle
#

@vestal stag @tidal prawn I ran across this the other day. Seems like a pretty good start
https://www.youtube.com/watch?v=leL6MdkJEaE

In this video, we take a look into implementing client prediction to smooth out the movement!

You can take a look at these links for more information on how it works:
Overwatch netcode: https://youtu.be/zrIY0eIyqmI?t=1341
Client Prediction Article: https://www.gabrielgambetta.com/client-server-game-architecture.html

00:00 - Intro
02:00 - Netwo...

▶ Play video
tidal prawn
#

thnx Ill check it out

forest grotto
#

is it just me or are there just no tutorials or doc. on how to setup a server-client way for NGO (dedicated server that clients connect to ) If anyone has any forum post or tutorial on how to make it work plz hlep

#

I can get it to work but its only localy i need to build the game press a button to start a server then join it that all works but how do make it so other people that arent on my LAN connect to the server (tried to open a port and ip in my router put my PC ip and port 7777 and not working)

sharp axle
forest grotto
#

I cant use P2P for my project

#

thats the problem

sharp axle
#

Sure you can have the server start a relay
Code Monkey just put up tutorial like yesterday.
https://www.youtube.com/watch?v=msPNJ2cxWfw

✅ Learn more about Relay and UGS https://on.unity.com/3tQZLLW
📝 Relay Docs https://on.unity.com/3OjXL8z
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
👇 Click on Show More
🎮 Get my Steam Games https://unitycodemonkey.com/gamebundle
🎮 Wishlist my Next Steam game! h...

▶ Play video
#

otherwise you're paying for server hosting.

sharp axle
#

or asking your users to set up port forwarding on their routers

forest grotto
#

its a small thing just a hobbie so if somebody wants to play il just start a server

sharp axle
#

in that case you'll need to set up port forwarding on your router

forest grotto
#

I done port forwarding for Asseto Corsa and it worked

#

anyways il try the relay thing

fallow adder
#

Im so confused with this from photon fusion, does it mean even in host mode no players will have authority over the game even the person who is hosting the game? Who is the "referee" then Im just concerned about cheating if by some miracle my game sees the light of the day kekW

sharp axle
fallow adder
#

yeah so that means host can say nah ive got 999hp? coolandgood

austere yacht
fallow adder
#

what you think is it worth building the game in host mode to test the waters of multiplayer then try swapping into server mode would there be lots to change

#

I imagine its just invisible "player" joining before anyone else and host it

sharp axle
#

Don't know about photon but if you keep that in mind it shouldn't be to much of a hassle.

#

Usually it comes down to changing checks with isHost to isServer.

fallow adder
#

cool

ripe mesa
gritty olive
#

I'm making a game, with Photon Pun, where you can push boxes, for example. I'm spawning them with InstantiateRoomObject, the problem is, when the not host pushes the box, it looks very weird, and the box isn't aligned properly. How can I fix?

rapid plover
gritty olive
#

maybe length?

rapid plover
#

worked here

gritty olive
#

but players is an array, which need .length, right?

#

have you tried length?

rapid plover
#

ill try

rapid plover
gritty olive
#

ok

olive vessel
rapid plover
olive vessel
#

No

#

Players.Length

#

That is how you get the Length of an array

rapid plover
olive vessel
#

Do you think .length and .Length are the same?

rapid plover
#

worked before

olive vessel
#

I don't believe Array has a .Count() method

#

Either way if you want the count of elements an array has, it's .Length

#

If it's a List, it is .Count

gritty olive
#

I have a sceneobject, I want to sync between the clients. My problem is, that it's using Physics, so using Photon Transform View Classic doesn't work.

I ONLY want to sync the object if it's to far from the version, of the master client.

How?

#

Seems like Photon Rigidbody View could work

fallow adder
#

https://hst.sh/yivolulodi.csharp Im controlling same avatar from both instances of the game in one of them input is even reversed somehow this is funny because thats what photon fusion introduction told me to do the only difference is I use rigidbody guy in youtube set his input in same way for fps shooter as well yeshoney also I instantiate camera locally like you would in singleplayer game and Its seen in another player wtf is even this

wispy arch
#

So an RPC cannot be Async.

#

Can the Method being called from it be async?

#

example.

austere yacht
wispy arch
#

Why is that

austere yacht
# wispy arch Why is that

because you will have no way to reference that thread and its state in a proper way and you'll not get proper exception handling

wispy arch
#

Understandable

austere yacht
#

you should always return Task

wispy arch
#

any Async would requrire a try catch too right

austere yacht
#

no

#

the exceptions bubble up

#

but you can use exceptions to detect whether an async method was cancelled

wispy arch
#

Right on. Thank you!

#

Hmm even after removing the aync It still doesnt call for the client. Not sure what im doing wrong

austere yacht
#

hard to tell from the bit of code you shared

#

is your client the same app?

#

ok

#

put in some debug logs and see if the OnHit gets called

#

this can have many reasons

#

its practially impossible to debug remotely

hoary pivot
#

Question regarding Netcode:
What would the value of 'NetworkManager.Singleton.ConnectedClients.Count'
be inside the OnNetworkSpawn method of the host's Player prefab?

tidal prawn
#

any reasons why a serverrpc wont execute? I just call the function in an if statement and it goes to the if statement but it doesnt run the rpc

hoary pivot
#

I just had that same problem

#

Does your script the RPC is running on extend NetworkBehaviour instead of Monobehaviour?

#

@tidal prawn

tidal prawn
#

NetworkBehaviour

hoary pivot
#

Damn

tidal prawn
#

its weird xD

hoary pivot
#

Tried requiredowner=false ?

tidal prawn
#

jups didnt do much

#

the thing that bothers me is that Ive put logs everywhere

#

and all of them are shown except for the rpc one

#

does the ServerRPC be spelled like that or can it be ServerRpc

#

cus I saw somewhere it had to have that in the name right?

#

also for some reason my host controls both of the players now

hoary pivot
#

I think Rpc is fine spelling

#

Sorry brother that is all the info I have on that, only learnt about Netcode in the last few days and still im not really getting how netcode is working

tidal prawn
#

same here documentation feels very limited been having a hard time xD

hoary pivot
#

Yeah ikr, feels outdated and thin haha

#

You might be able to help me with a problem:
I'm wanting to access: NetworkManager.Singleton.ConnectedClients.Count
From a client, but I'm not allowed to

tidal prawn
#

euh

hoary pivot
#

I've stored the value in a NetworkVariable on a few different scripts, but its getting to the point where most scripts need access to the value: doesn't feel right to have all these networkVars holding the same value

Is there maybe some way I can make the NetworkVariable into a singleton or something?

tidal prawn
#

cant u just store it in a single script? and just acces that?

hoary pivot
#

I could

But what if all scripts need access to the value at the beginning of the server? How do I make sure the script I choose to set/update the value does so before all the others need to access it?

tidal prawn
#

I cant think of a solution sorry, you could add an on value changed but even then it prob needs to be put on each of those scripts

#

maybe theres some sort of reload thing but I wouldnt know sorry

hoary pivot
#

No worries, thanks(: I'll prollly just chuck them on every script for now haha

#

GL with ur problem. Feel free to ask it again cause I've probably pushed it up now haha

tidal prawn
#

y2

sharp axle
sharp axle
tidal prawn
#

its not running anywhere

#

but theres a lot more wrong on existing code its okay thnx anyway!

#

just gonna rewrite that part

sharp axle
#

Just to be clear ServerRPCs will not run on the client in any case. They get sent to the server/host and will run there only

golden pivot
#

I am having really weird issues with network transforms, for some reason the Network Behaviour Id does not match the Network Behaviour Id Cache. This results to the wrong thing getting updates, and I don't know how to fix this. Does anyone have a fix?https://gyazo.com/4fa28ca6065e634f72c81a374ba958e4

#

version on host

#

same script on client

#

Fixed it, one of the network behaviours was destroying itself when it shouldn't

hoary pivot
#

I'm after NetworkSpawnManager.SpawnedObjects

Any idea what I don't have access to it?

mellow sapphire
#

Hi, I'm using SandBoxie to test my coop VR game, however I cannot seem to create a license or even manually activate a license using SB. Anyone has a solution to this?

#

Nothing happens after I "activate" them, it still appears a message that I need a activated license

#

When I try the manual way, it appears a message saying that I cannot save the license.

#

I tried using Unity Hub 3.3.0 and 2.0.4

hoary pivot
sharp axle
sharp axle
mellow sapphire
#

What happens if I clone the editor and edit the original one? Does it change for both of them?

sharp axle
mellow sapphire
#

Many thanks Good Otaku!

mellow sapphire
#

It worked @sharp axle! Thanks again!

#

For those using VR, simply tick off the marked optiont to not run VR in the editor you don't want to run VR

fallow adder
#

Is anyone using/used photon fusion for their game? How did you learn how it works?

normal estuary
#

Hey guys, sorry for also posting here, but I can see my post ranking worse and worse on the forums. Perhaps here I'll be luckier, since the issue is probably very simple for someone with experience in networking, unlike myself.

https://forum.unity.com/threads/netcode-for-gameobjects-code-for-assigning-colors-to-players.1370025/

weak plinth
#

whats the best netcode for an open world game with about 16-32 players in each server

rapid plover
#

So, I'm working on a Pun 2 multiplayer game, I would prefer a character controller over a rigidbody controller, but the character controller seems to not work (video below). the scripts by themselves are the only thing that's different in the controllers apart from the character controller and rigidbody components, so the only possible thing that could have gone wrong is in the script 2. I added the code links and the video below.

player manager https://hatebin.com/ccueoanqtb
character player controller (the bugged one) https://hatebin.com/llrehjbulm
rigidbody player controller (the one that works) https://hatebin.com/hgkgztvnbu

sharp axle
#

Changing Player color

sharp axle
weak plinth
#

which one would be best for hosting your own servers, and having two projects that are server, and client

#

@sharp axle

austere yacht
sharp axle
#

All the frameworks can be built as dedicated servers that can be hosted wherever

weak plinth
#

is it better to use your own socket implementation, or would you say i should just use ngo or photon

sharp axle
weak plinth
#

what networking solution do most unity games use?

sharp axle
#

Photon I think is the most used. But it's also been around for the longest. NGO has only been out of beta for less than a year. Mirror is pretty popular too. Fishnet is pretty new as well but is gaining popularity

wispy arch
#

This may be way over my skill level. But is there any way to have Clients be on different Scenes than the Host/Server whathave you.
I mean I know its possible.
But how hard is it

sharp axle
wispy arch
#

If that's the case, a Dedicated Server approach would be best than you think?

#

I am limiting to 4 players tho.

#

So if someone is hosting the max loaded Scenes would be 4 I suppose.

#

And this is a 2D game. So i would assume I don't need to go that route.

austere yacht
# weak plinth what networking solution do most unity games use?

there is no way of knowing that. You can only guess by looking at how much the individual ones are talked about, but consider that all this info is heavily biased towards amateurs/hobbyists. Also games that actually release to commercial success may use custom or obscure ones that see way more traffic than any of the talked about frameworks.

little sorrel
fallow adder
#

And for fusion I found only their manual and one guy on youtube doing fps shooter with it thats all kekW

little sorrel
#

everyone wants an fps shoter

sharp axle
#

I didn't realize Fusion changed so much. Fusion has only been out slightly longer than NGO. Everything is too new and everyone is trying to figure it out as we go

hoary pivot
sharp axle
hoary pivot
#

Netcode Question: What callback runs when a client connects to the server?
I've tried OnStartClient but that doesn't seem to exist

austere yacht
hoary pivot
#

Sorry I'm just learning the terminology.
Is NetworkStart = ServerStart?

Or will a network start occur for each connecting client?

austere yacht
#

its like Start() in a non-networked monobehaviour

#

it runs when the object that the component is on is spawned by the network manager

hoary pivot
#

Will it run for a connecting client on objects that are already spawned on the server?

austere yacht
#

yes

hoary pivot
#

Oh okay thank you!

austere yacht
#

that is the main purpose of having a netcode library (dealing with all these common sync/connect situations/questions and turn the answer to most of them to "yes, automatically under the hood")

hoary pivot
#

Thank you for explaining it well to a novice(:

austere yacht
#

but the key to understand is, that once players are connected, scenes are loaded and stuff is spawned, its all left up to you to make stuff sync

hoary pivot
#

Gotchya. I think I'm starting to get the hang of it now. Just struggling without some clear documentation haha

sharp axle
sharp axle
split hedge
#

Hey can someone help me why did I get this error?

#

here's a piece of the code

neat veldt
hoary pivot
split hedge
#

Yes

#

Wait I'll show you

split hedge
#

here is the manager script where i instantiate

hoary pivot
#

So you're calling Spawn before anyone has actually joined

#

If the object that the Manager class sits on is already in the scene before anyone joins, its Start method will run immediately when you load the game up, I believe

split hedge
#

Yeah, so how do i fix it?

hoary pivot
#

Idk fam that's a design choice.
You'll want to somehow wait until your server has started before calling Spawn

#

I used Photon for 2 seconds last week, so idk off the top of my head. I'll see if I can find what you're after

split hedge
#
using Photon.Pun;

namespace Com.makk87.FPSGame
{
    public class Launcher : MonoBehaviourPunCallbacks
    {

        public void Awake()
        {
            PhotonNetwork.AutomaticallySyncScene = true;
            Connect();
        }

        public override void OnConnectedToMaster()
        {
            Join();

            base.OnConnectedToMaster();
        }

        public override void OnJoinedRoom()
        {
            StartGame();

            base.OnJoinedRoom();
        }

        public override void OnJoinRandomFailed(short returnCode, string message)
        {
            Create();

            base.OnJoinRandomFailed(returnCode, message);
        }

        public void Connect ()
        {
            PhotonNetwork.GameVersion = "0.0.0";
            PhotonNetwork.ConnectUsingSettings();
        }

        public void Join()
        {
            PhotonNetwork.JoinRandomRoom();
        }

        public void Create()
        {
            PhotonNetwork.CreateRoom("");
        }

        public void StartGame()
        {
            if(PhotonNetwork.CurrentRoom.PlayerCount == 1)
            {
                PhotonNetwork.LoadLevel(1);
            }
        }

    }
}

Sure, here is the launcher script tho.

latent cairn
#

Can i ask about unity Multiplay and Matchmaker here?

hoary pivot
# split hedge ```using UnityEngine; using Photon.Pun; namespace Com.makk87.FPSGame { publ...

I'm not sure what this contains, but heres a guide walking through the basics of setting up a game with Photon. I imagine the answer to your question is in here somewhere:
https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/pun-basics-tutorial/intro

split hedge
#

I did follow a tutorial on youtube, but somehow it doesnt work well for me

hoary pivot
#

Put in a debug message where you believe the client should be connecting to/creating a room.
Put a debug message just before the instantiation happens. See which one is logged

sharp axle
fallow adder
split hedge
split hedge
sharp axle
fallow adder
empty night
#

you can hear the sound effect that plays when it get activated but no actual activation occurs... I've done worked so hard to add networking to my game and got so much help along the way , but I'm ready to throw in the towel on this

peak pulsar
#

Hello
I am having a problem with netcode for game objects.
For some reason I can't get my characters spine to transform correctly for the other users
The spine of the character has the script ClientNetworkTransform on it
I am a bit unsure what the issue is exactly, but it might have to do with the spine being deeply nested? Just a theory

https://i.imgur.com/iPKl3FL.gif

#

Showing the spine being rotated at the end of the gif ^

peak pulsar
#

I do have multiple clientnetwork transforms on GamePlay player, kiddustsucker and spine

fallow adder
#

im so giga confused with photon fusion has anyone done anything w it like at all

#

Im just trying to instantiate camera locally

#

it shows up for everyone

#

its not network object

#

it messes up input as well

#

because of camera being instantiated

#

which is not network object

fallow adder
#

nvm noticed a callback Spawned() on NetworkBehaviour of player then with if Object.HasInputAuthority it finally worked definitely did not spend 2 hours on this coolandgood

uncut bluff
#

hey guys how do you manage parenting network objects?

#

ah ok I think I can just go and find a transform to parent with a string of the name of the object

weak plinth
#

what do you guys think about riptide networking?

jagged fulcrum
#

Hi first of all, I'm developing a multiplayer game using Unity netcode for gameobjects and I'm havi

wispy arch
#
public override void OnNetworkSpawn()
    {
        if (_healthComponent == null) gameObject.GetComponent<Health>();
        
        InitializeHealth(_soDataStats.stats[Stat.Health]);
        
        _currentHealth.OnValueChanged += OnHealthChanged;
        _healthComponent.OnHit += OnHit;
        _healthComponent.OnDeath += OnDeath;
        _healthComponent.OnRevive += OnRevive;
    }
#

Does it matter who subscribes in this function?

#

Or should it be only the owner, or only the server. etc

#

For reference, This Script is put on all Units (players enemies)

sharp axle
wispy arch
#

Else im kinda shooting myself in the foot

#

If i need something from it per say

sharp axle
#

I don't see any reason to stop something from subbing to an event

wispy arch
#

I started having issues where the health stopped replicating and stuff. But i gave myself a break

weak plinth
#

would ngo be suitable for a game that would have 16-32 people playing at once in an open world

olive cove
#

anyone here know mirror really well

limpid wadi
#

im using Photon to make an online crossy road game, left is client right is host. I cant figure out why the logs on the left are acting up (each log is multiple blocks wide, client blocks are lagging), can anyone help plz

uncut bluff
#

hey guys sugestion, I unerdand that for example I should do a rpc call for shooting because the other clients do not know that the other is shooting something, but for example capturing an object by trigger enter like capturing a flag, should I do a rpc call for that as well?

neat veldt
uncut bluff
#

yeah just needed confirmation to make sure that I was not mising anything thnaks

spring crane
uncut bluff
teal marsh
#

Hi!, Can anyone helpme to understand why I can't send RPC to all my clients through one RPC?

public void TakeDamage(float damage, Direction direction, Vector3 hitPoint)
{
    pv.RPC("RPC_CheckIfDamaged", RpcTarget.All, damage, direction, hitPoint);
}

[PunRPC]
private void RPC_CheckIfDamaged(float damage, Direction direction, Vector3 hitPoint, PhotonMessageInfo info)
{
    if (info.Sender == pv.Owner) return;

    if (combatState == CombatState.HoldingDefence && SuccessfulBlock(direction))
    {
        HandleParry(hitPoint);
        pv.RPC("RPC_ParryPenalty", info.Sender);
           
    } else 
    {
        HandleDamaged(damage, hitPoint);
    }
}

[PunRPC]
private void RPC_ParryPenalty()
{
    //This function should add something to player who where the info.sender but can't manage to recive the message on info.sender client
    Debug.Log("INFO.SENDER ISN'T GETTING THE MESSAGE HERE!");
}

split hedge
#

Hey can someone help me why did I get this error?

sharp axle
split hedge
sharp axle
#

I can't but post here anyway

split hedge
sharp axle
#

there is also an Official Photon discord you might get better help over there

split hedge
#

Nah, but I posted it there too

fallow adder
#

you shoulda checked out my link yesterday

#

Manager is most likely in a scene where you are creating a room

weak plinth
#

what would be the best networking solution for a small game with 10 people per lobby

hoary pivot
#

Netcode question:

Inside of a ServerRPC, an object is first instantiated, then a variable on the object is changed, and then the object is Spawned on the network.

Is that variable change reflected on clients?

sharp axle
raven nimbus
sharp axle
pearl narwhal
#

Hi everyone, sorry for the newbie question, but I am still learning

I want to use unity to make a virtual "lab" that clients can connect to, to walk around.

I need to have the level that I make in unity start on a server somewhere, and then have clients use the web browser to connect a first-person-controller into the game and then walk around

I have got unity working and compiling to WebGL and I can walk around my level in the browser, but I dont know how to architect a central server, where many users can connect

I just need the users to be able to walk around, nothing that fancy,

is there a framework or library or known way (or template I can purchase) that has this functionality? Any guidance would be greatly appreciated, I dont even know really what to google search (unity client / server levels? Unity MMORPG? ) whats the term I'm looking for?

teal obsidian
thick valley
#
public void LoadIntoBackrooms()
    {
        if (PhotonNetwork.IsMasterClient)
        {
            StartCoroutine(GameCountdown());
        }
    }

    [PunRPC]
    private void ActivateText(TextMeshProUGUI startText, string text)
    {
        startGameText.gameObject.SetActive(true);
        startText.text = text;
    }

    private IEnumerator GameCountdown()
    {
        string text = "Starting game in " + countdownTimer + "...";

        view.RPC("ActivateText", RpcTarget.All, startGameText, text);

        yield return new WaitForSeconds(1f);

        countdownTimer--;

        StartCoroutine(GameCountdown());

        if (countdownTimer == 0)
        {
            text = "Starting Game...";
            view.RPC("ActivateText", RpcTarget.All, startGameText, text);

            yield return new WaitForSeconds(1f);
            PhotonNetwork.LoadLevel("Backrooms");
        }
    }
#

Why would this not work ("LoadIntoBackrooms" gets called when the master client presses a button)

#

I get this error each time

vast patio
#

Just wondering how i could go about having health for each player in networking for gameobjects. I have tried using networkvariables but they would only work for the host

jovial karma
#

When using NGO can you have network objects spawned in scene and load that scene with the network scene manager? Or do i have to instantiate all network objects after the scene is loaded?

novel fog
#

hello uh can anyone tell what this means?

spring crane
novel fog
#

the player already joined the room

#

the player can create a room and join but cannot join an existing room

#
public string gameVersion = "1";

    void Start()
    {
        PhotonNetwork.ConnectUsingSettings();
        PhotonNetwork.GameVersion = gameVersion;
    }

    public override void OnConnectedToMaster()
    {
        PhotonNetwork.JoinLobby();
    }

    public override void OnJoinedLobby()
    {
        SceneManager.LoadScene("Lobby");
    }
#

the lobby joining part

#
public InputField createRoomName;
    public InputField joinRoomName;

    public void CreateRoom()
    {
        Debug.Log("Created and joined");
        PhotonNetwork.CreateRoom(createRoomName.text);
    }

    public void JoinRoom()
    {
        PhotonNetwork.JoinRoom(joinRoomName.text);
        Debug.Log("Joined room");
    }

    public override void OnJoinedRoom()
    {
        Debug.Log("Joined room");
        PhotonNetwork.LoadLevel("Main");
    }
#

joining room part

sharp axle
# pearl narwhal Hi everyone, sorry for the newbie question, but I am still learning I want to u...

You'll want to look into dedicated server hosting. Unity game services has Multiplay. Netcode for Gameobject has websocket support in beta right now. There is a community developed websocket transport that you can use in the meantime
https://github.com/Unity-Technologies/multiplayer-community-contributions#transports

GitHub

Community contributions to Unity Multiplayer Networking products and services. - GitHub - Unity-Technologies/multiplayer-community-contributions: Community contributions to Unity Multiplayer Networ...

split sonnet
#

hi everyone, how can i check unstable or slow internet connection i unity??

#

i have used internet reachablity class but that just for checking if user has internet access or not, it cant check badwidth

austere yacht
# split sonnet i have used internet reachablity class but that just for checking if user has in...

Send a time stamp to the client along with a payload of a certain size (let’s say 100kb, can be garbage but must not be compressible) and have the client send it back in two stages, just the original time stamp and then together with the payload. The difference of the 3 time stamp values gives you an indication of their latency and bandwidth. Repeat at least 10 times or keep repeating for 10 seconds. You can improve the accuracy by sending packets of various sizes.

split sonnet
#

btw i'm not using unity multiplayer, i'm working with nakama

austere yacht
#

this is just based on how networking works, you can come up with all sorts of variations of this idea based on what you actually want to measure (also packet loss etc)

#

to make your own metrics you need detailed understanding of your transport and the usage you expect. A synthetic measurement often is not representative of real performance.

split sonnet
#

so in order for that to not happen i need a way to retry that state for users when the internet get back to natural

spring crane
#

Seems like some sort of reliability layer should deal with this in some fashion

#

Either by resending until success or disconnecting

split sonnet
#

this is an issue related to network jitter

austere yacht
#

I suggest you read up on KCP (a widely used protocol/transport for reliable UDP) or use any existing implementation of a reliable networking protocol, http comes to mind

split sonnet
#

i deployed my game on AWS using nakama server and postgre database, when this happens i check the server log there is no errors accourding web requests bit this problem occurs with socket

austere yacht
#

You could also have a look at gRPC or read the docs of ZeroMQ which are excellent for learning about protocol development in general https://zeromq.org/

split sonnet
#

thank you so much for trying to help me.

#

is there a simple way to check badwith with unity???

austere yacht
split sonnet
#

no no, i'm not using raw socket, it's managed by them and just accesing from the api

austere yacht
#

If the issue is in the gameplay logic that needs to account for lagging/disconnects of players, this becomes a wholly different discussion

split sonnet
#

this is like a nightmare

sharp axle
#

There is not much you can do about a bad connection other than fail gracefully and attempt to reconnect the game

split sonnet
austere yacht
sharp axle
#

You can't really test either unless you are already connected

austere yacht
#

Are you sure the jitter is the clients fault?

sharp axle
#

if you are using server hosting, then that service might have a way to test the quality of the connection before it connects to the server

austere yacht
#

Jitter is usually caused by a crappy server architecture/protocol

split sonnet
austere yacht
#

advanced is a really meaningless attribute

#

I see that nakama is even the most advanced

split sonnet
sharp axle
#

Not even just the server but the connection/bandwidth to the server host could also be garbage

austere yacht
#

seems to me nakama is for horizontal scaling of a game. It’s very different from the “first vertical then horizontal” scaling you do with ‘regular’ multiplayer

#

And it’s also a one size fits all thing, where other products like playfab or photon cloud offer only parts of the whole solution with a more open architecture

split sonnet
#

yes, there cloud base is heroic cloud

#

they don't allow horizontal scaling if you use other cloud providers like aws or oci

#

but here is how i configured things on my side if any of you understand these variables

austere yacht
#

those are irrelevant to your problems, they just define when a connection will drop

#

if you send too much stuff those settings won’t help you

split sonnet
#

these all depend of the amount of message you send and the size of each message

austere yacht
#

none of those values are anywhere near tolerable for regular play

#

these are “worst case, this is bad, get out of here values indicating a dropped connection, crashed server or data center on fire.

split sonnet
#

these are nakamas default

austere yacht
#

I’m not saying they are bad, I’m saying they have nothing to do with your problems of network jitter

#

Maybe the queue size does

split sonnet
#

yes i set the queue size based on experiece, there default is 16 but it did not work for me i kept getting errors from the server saying my queue size is full

austere yacht
#

How many requests does the server process per second and how many bytes does it read/write?

split sonnet
#

so based on the messages i send and how frequesnt i send them this was the best option for me

austere yacht
split sonnet
austere yacht
#

the queue should be practically empty at all times

split sonnet
#

i'm using 2xlarge aws instance

austere yacht
#

sounds like you have a massive bottleneck somewhere

split sonnet
#

i tried to reduce we requests as much as possible on client side

sharp axle
#

I guess it would also depend on what region that server is located and where your users are

austere yacht
#

maybe your server code is just bad

#

Do you write to the Postgres DB a lot in those requests or call any other APIs that may be slow.

#

maybe the resources that the server depends on are congested without any way to recover from that

split sonnet
austere yacht
split sonnet
#

okay guys my game is in app store and google play store you can check it your self

#

it's called Meet 2 Play

#

okay i found this in the nakama documentation

austere yacht
#

if you query the user data from a db in each request your performance will be atrocious

split sonnet
split sonnet
austere yacht
# split sonnet

This is an api you should call only once over the lifetime of a session

split sonnet
austere yacht
#

I get a feeling that there is a design flaw in how you use the nakama backend

rapid plover
#

when I spawn I always look forwards no matter the spawnpoint transform rotation

sleek shard
#

Hey everyone, I am hoping to get some feedback for a game name for my college project so I created a google form, I'd really appreciate your time, it'll only take a few minutes and it will help me and my team out a lot. Thank you!
The link is below 🙂
https://forms.gle/dcDUV5XK1mrFNktq5

rapid plover
#

worked before I updated the postprocessing package

sharp axle
olive vessel
#

Somewhere you call SetUp and pass in a Player, that'd be more helpful to see

olive vessel
#

It has 2 references

rapid plover
#

in load balancing client

sharp axle
rapid plover
sharp axle
sharp axle
rapid plover
#

@sharp axle it worked like 30 min ago, I didn't change the script or the prefab

sharp axle
rapid plover
#

ok

rapid plover
sharp axle
#

weird. but i guess 1st rule of troubleshooting is to turn it off and back on again

rapid plover
fallow adder
#

https://hst.sh/zafitiwiwo.csharp this is from photon fusion it wont compile if I try to use tuples is there some special way doing it or I will have to split it?

sharp axle
fallow adder
#

if u meant (INetworkInput, (bool, int, Vector2)) yeah it works now

#

first time do I see something like that but aight

rapid plover
#

I am using a character controller, is it possible to use something like character controller instead of collider[]?

sharp axle
rapid plover
sharp axle
#

I mean what problem are you trying to solve here? As far as I know, colliders don't use any network data. Maybe photon is different.

rapid plover
#

I just didn't want a useless second physical engine in my character

blazing lagoon
#

so yea... I'm trying to make 2D multiplayer with procedural dungeon generating with tilesets and thinking how could I send the generated dungeon from host to the client and checked with just the floor tiles how many would I have to send so... Anybody think its feasible to transmit 11 131 x- and y-coordinates. YES I probably should be using some seed based generator but plz no I don't want to touch the generator part anymore.

mental plover
#

What if you just generate it on the host, and the clients will request the neighbour cells as they go?

#

Already got the info in one place, no need to duplicate it in this case

rapid plover
#

why does the billboard not work?

sharp axle
rapid plover
#

I want the UI to look at the camera for the name to be easier to see

rapid plover
empty night
stuck talon
#

Hi, I made a Multiplayer project using PUN2 and Visual scripting. It works perfectly in editor and in unity remote. But the android build is not working, can't create room

gray pond
split hedge
#

Hey! Why do I have this error?

Could not find RPC with index: 5

rocky gulch
#

Im so confused i am not sure what its telling me
(its not the top one i already tried it)

spring crane
split hedge
#

I'm working with photon

stray moth
#

Anyone here using fishnet?

dire axle
#

Whenever I add Network Animator i get error OverflowException: Writing past the end of the buffer
But I am following the same steps as the guy in a tutorial... and he is not getting any error.... Can someone help?

sharp axle
dire axle
sharp axle
#

only other thing might be moving too often? And its filling up the buffer. I dunno

weak plinth
#

how can i record audio from a mic and send it over the network and play it for voicechat?

#

i also want the audio to instantly start sending as soon as you hold down the ptt key

sharp axle
weak plinth
#

would that let me use my own networking solution, or would i have to buy into their servers?

sharp axle
#

Yea. It's network agnostic

#

And it's free for up to 5000 concurrent users

wide ferry
#

I have been directed here

#

so basically unity has deprecated the unity multiplayer tools

#

which seem very needed to allow clients to interact with network transforms

#

is there something I am missing, how are people making multiplayer games without the ability to allow clients to move game objects

sharp axle
wide ferry
#

yes

#

but they also include ClientNetworkTransform

#

which would allow clients to send over data for their transform instead of only the host

#

this is for netcode with gameobjects btw

sharp axle
#

Oh that just got moved

wide ferry
#

it did?

#

to where

sharp axle
#

It's also much simpler to implement now

wide ferry
#

ill see if this works

#

OH yes this works

#

thank you very much

rapid plover
#

Kinda confused on how to instantiate the trail on other peoples clients (using Pun2)

IEnumerator SummonTrail(TrailRenderer Trail, RaycastHit Hit)
{
    Vector3 start = Trail.transform.position;
    Vector3 end = Hit.point;
    float distance = Vector3.Distance(start, end);
    float time = 0;
    float fullTime = distance / (((FirearmInfo)itemInfo).bulletSpeed);

    while (time < 1)
    {
        Trail.transform.position = Vector3.Lerp(start, end, time);
        time += Time.deltaTime / fullTime;

        yield return null;
    }

    Trail.transform.position = end;

    Destroy(Trail.gameObject, Trail.time);
}
thick valley
#

In Photon, if i have a gun which is a child of the player, would i give the gun child its own PhotonView or just acess the parents?

thick valley
rapid plover
thick valley
rapid plover
#

Do using Photon.pun

#

And then just check if pv is mine

thick valley
rapid plover
thick valley
#

Ok thanks

#

So for every child of the “player” I should just use the parents?

#

Photon view

rapid plover
#

Why would you need to use it anyway

thick valley
#

Only shoot if you are the “owner” of the gun

rapid plover
thick valley
rapid plover
wet compass
#

i am getting a null reference in line 377 with networklist on netcode 1.1.0 and 1.2.0 with unity 2021.3.15f1 but the bug is not there with 2021.3.10f1 which was my previous version i was using. anyonye have an idea how i could fix this other than reverting to 2021.3.10f1? I am not sure if it's something that's breaking in my implementation with the unity upgrade or simply something changing in unity's code that breaks it.

hoary pivot
#

I want to use Unity's Relay, but I am not going to enter payment information. I would like to simply have the services stopped if I was to ever required to pay anything.
Am I able to achieve this in some way?

steep sparrow
#

hey, I have a question. If I want to store stats in a database and there are players playing from the whole world. I'd need Database-Server in EU, America etc. right? I cant just host like 1 server here in Germany because the Americans would have connection problems then right? Even if I just store stats in it?

#

Or is there a better way to do it?

#

And of course if I have like a Server in EU and in America, they would have to sync their data or does Steam has some kind of system?

ripe mesa
#

the rest is read-only datacenter

steep sparrow
ripe mesa
#

nope

#

this is kinda wide question

#

simple database can be used from firebase

#

if you need strong database, there is amazon Aurora (SQL)

steep sparrow
# ripe mesa this is kinda wide question

I just want to store some info about players like the level, a players balance, and some more stats about them, probably just accessing and writing once before game and once after game

ripe mesa
steep sparrow
ripe mesa
ripe mesa
#

It's price is acceptable

steep sparrow
silent olive
#

I'm having problems with netcode when building to webgl. When i click connect to server on the example GUI using the websocket transport i get The JavaScript function 'Pointer_stringify(ptrToSomeCString)' is obsoleted and will be removed in a future Unity version. Please call 'UTF8ToString(ptrToSomeCString)' instead. then i get Uncaught ReferenceError: Runtime is not defined at state.ws.onerror
anyone have any ideas on what is wrong?

whole slate
#

Hi, i want to tiptoe into multiplayer. Did Netcode for gameobjects make stuff like fishnet or mirror obsolete? 🤔

olive vessel
#

I suppose you could say it made UNet obsolete, as it replaces UNet as the official Unity solution

#

But UNet was deprecated ages ago

whole slate
#

i see... 🤔 Thanks for the reply. now i have to evaluate wich to choose i guess

neat veldt
#

The problem is that the host/server cannot be on webgl

stray moth
whole slate
#

but also locks alot behind a paywall wich wasnt obvious from their "advetisment"

tidal prawn
#

can you get issues if you give the parent a network object component and the child?

tidal prawn
#

I got a 3 gameobjects that can be toggled on or of (active/inactive) how do I make it that the client sees this? it works fine on the host

sharp axle
restive roost
#

is it possible to do skill based matchmaking with steamworks ?

sharp axle
restive roost
#

i did google it and i saw this answer but i couldnt figure out what was the next step 😅

#

so i figured someone here must have tried it before and could tell me where to start exactly cuz i know how to use steam with lobbies and normal matchmaking

#

but with skilled based am just confused as to what am supposed to do

olive vessel
#

It does show how you can do it

#

You can store a stat for their "skill", and lobbies can have data which includes the "skill" levels of that lobby

restive roost
#

ill try it thx

#

its sounds simpler than i thought

sharp axle
#

The real trick is figuring out how to calculate "skill" sometimes a win/loss ratio just isn't enough

olive vessel
#

True, a person can die in a game but could have also provided a lot of help to the team

austere yacht
#

skill based matchmaking is always an approximation bounded by the ability of a system to measure an individual's contribution to group success

sharp axle
#

If your game is 1 v 1, ELO is fine.

austere yacht
#

depends if you actually want to matchmake skill or if you want to substitute performance for skill (in which case ELO works well), there are many skilled ways to play a game that don't equate to the same performance in winning a game or creating an exciting experience

lyric thunder
#

how would i network photonVR's cosmetics and colour changing?

sharp axle
lyric thunder
#

photon vr is photon but vr

#

im saying photon vr beause im assuming the vr player rigs are different from the two

sharp axle
austere yacht
# sharp axle In team games I agree with you 100%. In 1v1 however, if the most skilled player ...

i'm just saying that performance (winning) is not the same as skill. Its a distinction you'd make when thinking about design and what is important to you creatively, what type of gameplay you want to create. Skill is considerably more complex and multifaceted than "winning". The simplicity of winning is why ELO works as a performance comparison tool. If you reduce your game design to that (which is fine) then ELO is your thing. If you want to make an enjoyable game experience, it might very well be irrelevant... one player might just be excellent at being chased, creating a bunch of exciting situations for their hunter or vice versa, the hunter letting the other narrowly get away again and again... this cannot be captured by "winning".

#

assuming that the trading of these exciting moments happens because of equally matched performance (measured by ELO) is not plausible.

#

if anything, equally matched performance results in a stalemate (in games that include elements of luck, more excitement is possible, chess produces stalemates, matchplay golf produces excitement (for the players))

dire axle
#

If I run the server in my computer and use unity provided relay, will players be able to find my IP address?

sharp axle
sharp axle
dire axle
sharp axle
tidal prawn
#

is there a difference between just calling gameobject.setActive or NetworkObject.gameobject.setActive

#

will the other one do it for all the clients too?

hoary pivot
#

Netcode question:
How do I get the player object of the client that is calling the script?

A: NetworkManager.Singleton.LocalClient.PlayerObject.gameObject

ivory mango
#

Hey can I share my code here?

#

I'm trying to create synced player names

#

I'm following this tutorial, https://www.youtube.com/watch?v=OGVDIu7qOaE&list=PLS6sInD7ThM2_N9a1kN2oM4zZ-U-NtT2E&index=8&ab_channel=DapperDino the code is not entirely same I had to make some changes

This Unity Multiplayer tutorial will teach you how to implement player names. For project files access, check out the repository here: https://github.com/DapperDino/Unity-Multiplayer-Tutorials

Multiplayer Course: https://www.udemy.com/cour...

▶ Play video
#

The individual player names are synced on the server side but on clients side it displays their default text

sharp axle
#

Syncing Player Names

balmy nova
#

I'm using netcode, and for some reason the two games aren't syncing. They connect properly but they don't move on the other screen

balmy nova
#

They both see two objects, but if you move an object in one window it doesn’t move in the other window

sharp axle
#

You need to have a Network Transform on them

balmy nova
#

On all objects?

sharp axle
#

the ones that need to sync

balmy nova
#

Alright

dire axle
#

When they say that Unity give free 3Gb of data per CCU (Relay server) is that 3Gb Egress Data?

#

and ($0.09 per GiB US + EU) is that extra GiB to each CCU or total GiB?

balmy nova
#

I'm not clear on how to script controls for an object. When I try, only the host controls work at all

silent olive
olive vessel
#

A WebGL client should be able to connect to a Desktop Host/Server if you use the right Transport

ripe mesa
hoary pivot
#

Netcode Question:
My player is not animating on the network.
When I select the player in the Hierarchy and look into the animator tab, the blue bar loads as if the animation is playing.
Player has an Animator, animation controller and clientNetworkAnimator

Any thoughts?

urban hawk
#

Hiya, I'm looking to make a card game like Hearthstone/Arena/Master Duel, what networking solution would you recommend? I've heard of Mirror, Netfish etc but which would you recommend?

ripe mesa
#

how much is your budget? what topology do you want (p2p/client-server)?

balmy nova
#

anyone know how to make cinemachine cameras work properly with netcode? Currently all players are stuck in the same camera.

urban hawk
ripe mesa
#

client-hosted & dedicated server

#

client-hosted is not secure because 1 player owns 100% the game authority

#

dedicated is very secure & expensive & require extra work

urban hawk
#

Oh okay, well, what would you suggest to start with if I eventually down the line want the kind of functionality a hearthstone or MTG arena has? Can you start small and cheap/free and go for a more dedicated high performance server later when you have the money for it?

ripe mesa
#

look for pun or fusion share mode from photon

#

servers are managed by photon, but your game will be similiar to p2p

#

but easy to cheat aswell

balmy nova
#

I'm having a pretty serious problem with netcode, it won't register any input from clients at all. It can only see input from the server

ripe mesa
#

look for client-server topology understanding

balmy nova
#

I get that

ripe mesa
#

so your input doesnt get sent to the server?

balmy nova
#

It's just not responding

#

yes

ripe mesa
#

not very clear

balmy nova
#

if (Input.GetKey(KeyCode.E))
does nothing

#

on client*

#

it works fine on server

ripe mesa
#

uhh

#

you didnt get my message

#

hows the code flow?

balmy nova
#

not familiar with that term

ripe mesa
#

ok cool

balmy nova
#

any idea what might be wrong with it?

ripe mesa
#

show code bro

balmy nova
#

only thing I can think of is the networkobject is a parent of the object holding the script, rather than the object itself

#

the comments on that code are from the original source and probably outdated

ripe mesa
#

are you using NetworkTransform?

#

or ClientNetworkTransform?

balmy nova
#

mhm

balmy nova
ripe mesa
#

use ClientNetworkTransform

#

if you want your game: less secure, responsive, easy

#

NetworkTransform is owned by server, so only server can modify It

#

you really didnt get my message

#

look for client-server topology

balmy nova
#

okay, that makes sense

ripe mesa
#

the most logic & secure way in client-server is, Client sends input to Server, wait for latency (ex: 20ms), Server accepts input -> move the transform

balmy nova
ripe mesa
#

so It should be secure

#

unless you are using ClientRPC everywhere

balmy nova
#

there's no client network transform component, is it a setting in the normal networktransform?

ripe mesa
#

It came from a sample

#

becareful using It

#

cheater can modify your game binary & fly, teleport to whenever they want

balmy nova
#

crap

#

any way to stop that

#

it's very likely something like that would happen in my game

ripe mesa
#

look for client-server topology

#

for the last time

urban hawk
ripe mesa
#

client-server, dedicated server

#

difficult to setup & expensive

urban hawk
#

What solutions are there that use that?

#

Also, what is it that makes it so difficult

ripe mesa
#

Mirror, Fishnet, NGO, Photon Fusion, Netick

#

you have to manage multi-regions, deployment, extra backend server

#

dont forget matchmaking

#

its just a very deep rabbit hole

urban hawk
#

Oh okay

#

Wasn't fusion p2p

ripe mesa
urban hawk
#

Oh gotcha

#

Looks like Fusion scales with CCU

#

Which I learned a few minutes ago means concurrent connected users

#

Which client-server option would you say is the easiest?

ripe mesa
#

fusion for agile development

#

its API, QOL, optimization is top notch

#

also look for Netick, Its pretty similiar to Fusion but still lacks some QOL

urban hawk
#

I'll have a look at that, thank you

frail gate
#

Hi im new to netcode and im trying to make some sort of a multiplayer chess game, and im trying to change the sprite for the client player, and im using a server rpc and it changed on the server but not on the client. can someone please help?

ripe mesa
#

show code

frail gate
#
using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.UI;

public class PlayerNetwork : NetworkBehaviour
{
    [SerializeField] Sprite playerClientSprite;
    GridManager gridManager;
    GameObject spawnTileHost;
    GameObject spawnTileClient;
    int tileSize;
    
    void Awake()
    {
        gridManager = FindObjectOfType<GridManager>();
        tileSize = gridManager.GetTileSize();
        spawnTileHost = gridManager.GetSpawnTileHost();
        spawnTileClient = gridManager.GetSpawnTileClient();
    }

    public override void OnNetworkSpawn()
    {
        if(!IsOwner) return;

        if(IsHost)
        {
            CenterCameraToGridHost();
            PositionPlayerHost();
            gameObject.tag = "PlayerHost";
        }
        else if(!IsHost)
        {
            CenterCameraToGridClient();
            PositionPlayerClient();
            RotateClientSprite();
            ChangeClientSpriteServerRpc();
            gameObject.tag = "PlayerClient";
        }
    }

    [ServerRpc]
    void ChangeClientSpriteServerRpc()
    {
        transform.GetComponent<SpriteRenderer>().sprite = playerClientSprite;
    }
}
#

should i use a network variable to store the sprite or something? im really confused eventhough ive watched so many videos regarding netcode

ripe mesa
#

so the late joiner still have the latest update

frail gate
#

but if i dont wanna use a network variable how do i make it work?

frail gate
#

in the picture above

ripe mesa
#

both client & server must have the same playerClientSprite

#

did you change it on runtime? or no

frail gate
#

i put the prefab in the playerclientsprite in the serializefield before runtime

#

and when it run the code will run changeclientspriteserverrpc() to the computer that is the client

ripe mesa
frail gate
#

yea

ripe mesa
#

wait...

#

ServerRPC lets client to execute code in Server

#

ClientRPC lets Server to execute in client

#

so you want have a universal RPC

frail gate
#

how do i do that

#

i just need the client player to have a different sprite

#

thats all

ripe mesa
#

look for RPC thats callable for both & will execute for all

frail gate
#

isnt there only 2 types of rpc? server and client

ripe mesa
#

NGO only have those 2 lol

#

who can change the color?

#

everyone?

frail gate
#

umm yea..?

ripe mesa
#

do ServerRPC & set a id for that Sprite

#

change sprite color on networked variable changed

#

store various sprite with unique id as scriptableObject

frail gate
#

ok

#

so what network variable data type should i make

#

int?

neat veldt
#

byte should be enough

ripe mesa
#

byte is good for small changes & rare access, because it only take 1 byte in memory

neat veldt
#

Yeah and when you don't need numbers above 255

urban hawk
#

How hard is it to implement networking retroactively?

#

Asking for a card game specifically

#

Like once the core game is already done

silent pine
#

It depends how complex your card game is, for a card game it should be fairly simple since you're going to mostly manage the RPCs yourself and there's little work with client side predictions / reconciliation etc'

austere yacht
#

even if you don't actually reimplement "everything" the effort is at least equal to it. If your game design is also incompatible with a direct conversion to networked multiplayer you are looking at making an entirely new game mode.

urban hawk
#

I looked at Fusion and I don't think I can do the price structure they have, but I've heard a lot of bad about mirror as well from googling

#

so I'm struggling to commit to a networking solution

silent pine
#

Why not netcode / NGO?

#

free 😄

#

is your card game lobby based? or host/client?

urban hawk
#

I looked up a review that said it was basically only for small local type of games

silent pine
#

Do you require the game to be secure? i.e. server authoritative everything, not allowing cheating etc'?

urban hawk
#

I don't think it's lobby based, like it'd use matchmaking instead

#

Idk how highly I'm prioritizing it, since it's an indie title and I don't have all the time in the world but cheating doesn't sound great either

#

Especially for a card game where it's not as obvious

silent pine
#

Regardless of which networking solution you choose, you'll need to re-do every player interaction.

Instead of 'Player does A' it'll be 'Player notifies server that he wants to do X, server verifies, notifies players that Player did X'
For some client prediction it'll be 'Player notifies server that he wants to do X, and does X locally, server verifies, if not valid notifies Player to roll back, notify other players that Player did X'

urban hawk
#

Yeah that sounds like a lot 😅

#

Would you recommend NGO if I'm aiming for a (hopefully) sizeable playerbase

austere yacht
austere yacht
# urban hawk Would you recommend NGO if I'm aiming for a (hopefully) sizeable playerbase

the size of your concurrent playerbase is almost entirely unrelated to the netcode library you use for realtime sync, you are going to spawn a separate server instance for every match, and up to 32 players per match you can practically do whatever without worrying about your data bandwidth or CPU performance, if you are making a card game you can run a lot of concurrent game servers processes per single virtual machine

#

any persistence/matchmaking/clan-management you'd have in your game would be handled by a separate server that is not implemented with unity, it would typically be some sort of HTTP based API. A client app would just be an interface to that API.

silent pine
#

What's the card game about?

austere yacht
#

if you need any kind of scale you need a robust system for spinning up and shutting down servers, playfab and unity game services (among others) can give you that

urban hawk
#

Oh okay, so I don't really need to worry about server capacity in that way then

austere yacht
#

you need to worry in the sense that bad implementation leads to fewer server-processes per VM and more VMs cost more money

#

but if you have a card game, chances are your server can be very efficient

#

you could then take another step and maybe implement the gameplay server without unity, opening up a lot of complications but also a large opportunity for optimization

urban hawk
silent pine
#

Also consider that the frameworks for game networks have a lot of abilities that you don't care about - like continuous physics / transform syncing.

you could implement a card game 'server' just by having an endpoint that runs some code, for example an AWS Lambda

#

runs code / keeps state

urban hawk
austere yacht
#

but using a generic solution is very nice for learning about all the details that you may overlook in a custom attempt

#

in any case, i'd pick NGO, its the most integrated with unity, its documentation isn't the greatest yet but you have community support, active devs participating in the support and a model that is very similar to old UNet and Mirror

#

you can use NGO completely free, if you use dedicated servers you can use any transport you like and are free to host your game anywhere you want

#

the other option i'd go for is Mirror

#

mind that none of these netcode solutions give you anything to help with implementing gameplay, there is nothing automatic about them, stuff doesn't sync because of magic. Its all hand made, which is a good thing.

#

You can take that customization all the way down to custom messaging/serialization on top of the transport layer, skipping any inefficiencies in the RPC/SyncVars you might find problematic

urban hawk
#

Sure, yeah I've seen tutorials using mirror, I just don't want to be writing the code twice over if I can help it

#

I'll take a look at NGO

austere yacht
#

if you pick mirror or NGO you will be fine, both are very capable

silent pine
#

Go for NGO 😄

urban hawk
#

Thanks you guys!

stray moth
#

Dont forget about fishnet its also pretty decent,been using it for a while noe

olive vessel
#

Believe me, nobody will ever forget about FishNet...

stray moth
#

Cant tell if u are serious or not XD

olive vessel
#

It's notorious

stray moth
#

Ah

#

Did fishnet do something bad that i am not aware off?

balmy nova
#

I’m having trouble getting a cinemachine camera to follow a net code player prefab.

sharp axle
austere yacht
# stray moth Did fishnet do something bad that i am not aware off?

it (or its author) is caught up in a pissing contest with some other devs and seems to engage in weird self-marketing practices in all the wrong places that make the whole thing very smelly and untrustworthy, paired with exuberant claims of superiority that don't help gain any trust with a sceptical audience.

#

There is nothing obviously wrong with it and other stuff made by the author is indeed quite nice. As to its claims to suitability for production projects, everyone has to make up their own mind, as nobody can actually validate those without doing an actual project.

#

mind that most people who actually make and release commercial games at significant scale do not frequent this channel

stray moth
#

Ah gotcha

#

understandable

azure ember
#

Using fishnet networking, how would I make sure that I only affect the players client, instead of switching cameras, cause I am trying to make my own camera system instead of using the one that I found in order to use raycasting

#

because when I use it, both clients go to view the recently connected player

#

here is my code

if (canMove && playerCamera != null)
        {
            float mouseX = Input.GetAxisRaw("Mouse X") * mouseSensitivity * Time.deltaTime;
            float mouseY = Input.GetAxisRaw("Mouse Y") * mouseSensitivity * Time.deltaTime;
            playerBody.Rotate(Vector3.up * mouseX);
            yRotation += mouseX;
            xRotation -= mouseY;
            xRotation = Mathf.Clamp(xRotation, -90f, 90f);

            transform.rotation = Quaternion.Euler(xRotation, yRotation, 0);
            orientation.rotation = Quaternion.Euler(0, yRotation, 0);
            //rotationX += -Input.GetAxis("Mouse Y") * mouseSensitivity;
            //rotationX = Mathf.Clamp(rotationX, -lookXLimit, lookXLimit);
            //playerCamera.transform.localRotation = Quaternion.Euler(rotationX, 0, 0);
            //transform.rotation *= Quaternion.Euler(0, Input.GetAxis("Mouse X") * mouseSensitivity, 0);
            //transform.rotation *= Quaternion.Euler(Input.GetAxis("Mouse Y") * mouseSensitivity, 0, 0);
        }
#

and yes, I know its very messy

austere yacht
# azure ember and yes, I know its very messy

this is not a problem specific to any netcode library, you just have to differentiate between the local and remote players by some property that is exposed by the library, usually something like "isLocalPlayer" on the library's version of a NetworkObject or NetworkBehaviour and then use that differentiation to grab/toggle the relevant things that you want to be driven by the local client

azure ember
#

ahh, thanks

sharp axle
#

@azure ember You'll also want to make sure that you only have one camera in the scene.

balmy nova
sharp axle
balmy nova
#

Also it’s a free look camera set to orbit the player

frail gate
#

can someone help me?
Im trying to deal damage from one player to another but using server rpc or client rpc does not replicate the new health from the damage dealt to the client can someone help pls im new to netcode

sharp axle
sharp axle
frail gate
sharp axle
frail gate
#

ok let me try first

#

it works but i dont really get the concept behind it.
what i understand is that a network variable will always have the same value across all game objects right..?

so lets say i have 2 players, they both have the same network variable health
if i deal damage to player1 and its health gets updated that means because its a network variable then player2's health should also get updated right..?

or am i getting it wrong

#

nvm its not working it says client is not allowed to write to this network variable

sharp axle
frail gate
#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Netcode;

public class PlayerHealth : NetworkBehaviour
{
    NetworkVariable<int> health = new NetworkVariable<int>(100, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner);
    
    void Update()
    {
        if(!IsOwner) return;
        Debug.Log(OwnerClientId + " health: " + health.Value);
    }

    public int GetHealth()
    {
        return health.Value;
    }

    public void DealDamage(int damage)
    {
        health.Value -= damage;
    }
}
sharp axle
#

By default only the server can write to a network variable

frail gate
#

im calling DealDamage()
on another script in the same gameobject

#

and it says client cannot write to this network variable

sharp axle
#

Only the owner can there. So do an isOwner check before changing the value.

frail gate
#

oh alright wait

#

do i need to change DealDamage to a server/client rpc..?

#

its not giving me the error anymore but the damage still wont be dealt to the other player

#

this is how im calling it on the other scripot

#
else if(isMoving && chosenSkill == "Missile")
        {
            for(int i = 0; i<tiles.Length; i++)
            {
                if(tiles[i].isSelectedMissile)
                {
                    StartCoroutine(SpawnAndDespawn(i));
                    GameObject playerOnTile = CheckIfPlayerOnTile(i);

                    if(playerOnTile != null)
                    {
                        playerOnTile.GetComponent<PlayerHealth>().DealDamage(10);
                    }

                    tiles[i].isSelectedMissile = false;
                    isMoving = false;
                    ReturnTileColorToNormal();
                    chosenSkill = "";
                    break;
                }
            }
        }
sharp axle
frail gate
#

ok

#

it still doesnt work

#

idk what else to do i just need to deal damage to the other player

#

and vice versa

sharp axle
#

I take it this was a single player game?

frail gate
#

umm no but im really new to netcode so idk how to start developing in multiplayer

#

and a lot of the concepts were really overwhelming

#

but i just need to finish this one thing

#

just this dealing damage thing

balmy nova
sharp axle
balmy nova
sharp axle
sharp axle
frail gate
balmy nova
#

I attached that to the camera

#

nothing happens

wet compass
#

in netcode, is there a way to call something once the server starts other than onnetworkspawn? is it safe to do it right after NetworkManager.Singleton.StartServer() or is that process not necessarily end on the same frame?

stray moth
austere yacht
surreal lily
#

does netcode for gameobject have an auto discovery feature for users on the same wifi(PC/Android)?
I want to discover the server and edit the Connection Data's Address at runtime.

sharp axle
# surreal lily does netcode for gameobject have an auto discovery feature for users on the same...
GitHub

Community contributions to Unity Multiplayer Networking products and services. - multiplayer-community-contributions/com.community.netcode.extensions/Runtime/NetworkDiscovery at main · Unity-Techno...

surreal lily
#

I tried it on earlier versions, but found no results using it,
hardly any info was given on it as well.

sharp axle
#

The easiest way is to just use the Relay and Lobby Service

surreal lily
#

would that solve the issue for the lan connection?

#

my app is more automated server/client approach,
I want the client to boot up and get the active server's address without the user having to go through settings/inputs,
for now I either read through a file that stores the IP or sync them through PlayFab, which kind of feels weird.

sharp axle
#

are you hosting the servers on Playfab?

surreal lily
#

just sharing the local IP, i find this approach bad, but fairly automated if set up right.

sharp axle
#

yea thats very bad

#

either use a hosting service like Playfab or Unity Mulitplay or use the Relay service for self hosting

surreal lily
#

would the relay service help?
the IP isn't static.

sharp axle
#

the server/host would start a new relay whenever it starts

#

if you need a persistent server connection, then a dedicated server hosting solution is your only real choice there

surreal lily
#

the operation itself is very simple, that's why this whole things is just overly complicated for hardly any reason.
the server acts as a starter/stopper for a 360 video between multiple VR devices. (so they are all synced up at start)

#

not sure relay would work as you would need to supply a join code

sharp axle
surreal lily
#

nah, it would need to be compatible with VR.

#

it's still quite a heavy project on VR side

austere yacht
#

for simplicity i'd just make this a .NET server and not introduce a whole new tech stack if your project isn't yet steeped in web tech for no reason

surreal lily
#

Different approaches on some android phones failed, this worked.

austere yacht
#

do you know why they failed?

surreal lily
#

Not really, the error was vague.

austere yacht
#

you can always use HTTP/1.1 as fallback that "always works" if you don't need realtime performance

wet compass
#

with netcode, my client id is not being reset after disconnecting a client. it just keeps incrementing. is this expected behaviour? or am I missing out something to make it so that if no one is connected and someone joins they'll always be clientid 1

austere yacht
wet compass
#

ok good to know thanks. so as long as the server isnt reset that number will just keep going up infinitely?

#

this confuses me though :

The clientId generated by Netcode for GameObjects (Netcode) cannot be used, because it generates when a player connects and is disposed of when they disconnect. That ID may then be assigned to a different player if they connect to the server after the first one disconnected.

olive vessel
#

That would suggest they are reused by new clients

wet compass
#

So far I haven't been able to get it to reuse a clientid though, i'll have to do further testing but so far seems to act like Anikki says. Maybe it only start reusing clientid's after reaching a threshold?

austere yacht
#

essentially if you want persistent IDs to identify a player reconnecting you need to DIY that system yourself, usually via the data object a client can send with their connect request (used for something like an auth-token) or barring that, some sort of other Authentication mechanism the player sends once connected.

sharp axle
#

Unity Authentication works really well for that. it guarantees users will always have the same player id

austere yacht
#

is unity authentication tied to NGO in some way?

olive vessel
#

Nope, works standalone

austere yacht
#

how does it guarantee the player/connection ID in NGO?

olive vessel
#

I don't think it does, I think they meant that it would give you a player ID which you could rely on

#

Then do what you said by passing it in with connection approval

austere yacht
#

ah... kinda obvious that a player would be uniquely identifiable by an authentication service

olive vessel
#

You'd hope

glass dew
#

How to fix this error in MS SQL - Unity dedicated server


System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () (at <a6f433c7914f4a8aa11562de443cf6c1>:0)
System.Net.Sockets.Socket.EndReceiveFrom (System.IAsyncResult asyncResult, System.Net.EndPoint& endPoint) (at <a6f433c7914f4a8aa11562de443cf6c1>:0)
System.Net.Sockets.UdpClient.EndReceive (System.IAsyncResult asyncResult, System.Net.IPEndPoint& remoteEP) (at <a6f433c7914f4a8aa11562de443cf6c1>:0)
System.Net.Sockets.UdpClient.<ReceiveAsync>b__65_1 (System.IAsyncResult ar) (at <a6f433c7914f4a8aa11562de443cf6c1>:0)
System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task1[TResult] promise, System.Boolean requiresSynchronization) (at <c2a97e0383e8404c9fc0ae19d58f57f1>:0)
Rethrow as AggregateException: One or more errors occurred. (An existing connection was forcibly closed by the remote host.```
thanks ❤️
frail gate
#

Hi guys im new to netcode for gameobjects, and i was wondering how could i host from any computer? becauase in here i need to set the address to the computer's ip but if i host from another computer then they have a different ip

sharp axle
opaque ember
#

Does anyone know how I can add like an in-game cosmetic with RPCs in photon? If anyone could help, that would be great!

#

like an in-game cosmetic through the network player

robust cypress
sharp axle
mighty whale
#

Any solid documentation on DGS for NGO?

sharp axle
mighty whale
#

Its what I immediately associate to, but I've been pretty deep in the weeds recently

sharp axle
shell nest
#

How hard is p2p to implement?

haughty heart
#

Hard

fallow wharf
#

Is there an easy way to make a HTTP request utilising the new Awaitable in 2023.1?

sharp axle
shell nest
#

I'm kind of intermediate.

sharp axle
shell nest
#

What does the paid tier have to offer that the free one doesn't?

#

Is the Relay service hard to use?

sharp axle
shell nest
#

Would that limit be higher with implementation from scratch?

sharp axle
#

What do you mean?

shell nest
#

If I were to implement P2P myself.

sharp axle
#

Then that's on you. But that's a nightmare to implement.

shell nest
#

But would it?

#

Aren't there any free plugins with a higher CCU?

sharp axle
#

If you do yourself there would be no costs as there is no service you are using

shell nest
#

I mean it shouldn't cost anything since it's the hosts' computers are running the servers.

#

So why is the CCU limit for Unity's relay service 50?

sharp axle
#

Relay servers cost money to run

#

Epics relay service is free to use I believe

#

Steam I think also has a relay service

shell nest
#

Are there any free plugins that have pre-implemented P2P?

sharp axle
#

Nope

#

At least not that I've found

shell nest
#

So to get access to Steam's P2P, you have to pay $100?

sharp axle
#

Pretty sure that's the case

#

But you're paying that to be on steam anyways

shell nest
#

I just wanna create a multiplayer game where you host a server with an IP and a port, and then you join lobbies that way too.

sharp axle
#

You don't want you players giving out IP addresses all willy nilly

olive vessel
#

You could allow players to make dedicated servers

shell nest
#

Yes, that's what I want.

olive vessel
#

People do it constantly for Minecraft

shell nest
#

on their computers.

#

yeah I was gonna say that.

olive vessel
#

If you use a relay, they don't need to port forward. If you don't they do need to port forward

shell nest
#

port forwarding is?

olive vessel
#

Opening a port in their router's firewall

#

To allow external connections

#

They could also host a dedicated server with a company online to avoid that

sharp axle
#

It's also a support nightmare

shell nest
#

and what's a port in a router's firewall?

olive vessel
#

25565 is an example of a port

shell nest
#

That's what I want. You've probably already guessed that.

olive vessel
#

There is a free relay from Epic if you want P2P connections with ease

#

Mirror has an Epic transport

shell nest
#

Yeah, evilotaku said that.

#

but mustn't I use Unreal then?

olive vessel
#

No

#

Mirror is a networking solution for Unity

shell nest
#

Noble Whale?

olive vessel
#

What?

shell nest
#

nothing

#

a p2p plugin.

#

but it costs $80 lol.

#

Could you send a link?

olive vessel
#

Not really, I'm pushing for time before work

#

Mirror is well known though

shell nest
#

ok

olive vessel
#

Anyways, good luck

shell nest
#

thanks

#

@sharp axle Do you have the link to Epic's mirror page?

sharp axle
shell nest
#

"FakeByte"

#

What?

#

Are there tutorials for it?

#

Thanks by the way.

sharp axle
#

No clue. It's a custom transport

#

Mirror has their own discord that would probably help you out better

frank crag
#

hey I'm currently trying to make a basic multiplayer fps game with netcode. I have 3 cubes in my world and I've made a script, which lets the host pick up cubes, carry the cubes around in front of them and drop the cubes. When I try to do this as a client, I can't pick up the cubes.

#

more details currently coming...

#

Components on one of my cubes (besides of transform and mesh renderer)

#

Components on my player (besides transform, client network transform)

#

this is my pickup objects script

#

this is my objects grabbable script

#

if you need more information tell me!

#

I hope somebody can help me!

sharp axle
frank crag
#

Or can I change the ownership, so that everyone can pick it up?

sharp axle
# frank crag Thank you, How exactly can I do that?

https://docs-multiplayer.unity3d.com/netcode/current/basics/networkobject#ownership

You can leave it server authoritative and then send an ServerRPC to have the player grab the cube. It might be a bit laggy that way though

limber holly
#

hello, I just create a multiplayer scene with netcode and I don't really find a guide for hosting my game and start trying it

austere yacht
# limber holly hello, I just create a multiplayer scene with netcode and I don't really find a ...

You can use multiple build or editor instances to test locally. Helped by https://github.com/VeriorPies/ParrelSync for hosting you can use clouds like unity game services, playfab or your own machines. You can find documentation and examples for all of these (except DIY) but straight up tutorials will be less effective.

GitHub

(Unity3D) Test multiplayer without building. Contribute to VeriorPies/ParrelSync development by creating an account on GitHub.

zealous thicket
#

Hi i wanna ask, currently i'm using photon Pun 2 to implementing Recovery connection with ReconnectAndJoin() with CleanupCacheOnLeave = false and it's work properly. But when player really want to leave the game, object doesn't leave or destroying itself.

I've done the manual way with PhotonNetwork.Destroy(playerDisconnect) but it doesn't work and object still alive, in other player

opaque ember
#

can anyone tell me why this code is not networked?

frank crag
#

i'm currently trying to make my game be accessible from my external ip, i'm using unity 2022.2.1f1 and netcode version 1.1.0

#

I have one input field and one button and if i press it, I run this code

#

however, I'm getting this error, when I try to join with my external ip. (I opened the port 5963 in my firewall and forwarded it on my router.)

#

If you need more detail tell me

#

Thank you

vernal pagoda
#

Hey, I am working using Netcode for GameObjects. I currently have a player that is setup hierarchal as such. WHen I spawn it in, its unhappy and states "Spawning NetworkObjects wit nested NetworkObjects is only supported for scene objects", this is fine, I can change my setup. My question is, my Player, TankTurret and TankBody all have network objects.

My question is should I create a class on the parent such as PlayerNetworkManager.cs, and then my TankTurret and TankBody get references to that, so that when they move or rotate, I can call IsOwner on them? Or what is the best course of action here?

stray moth
#

Not sure if this will help since i am using a diff networking solution but i run all my network code on the player empty that i spawn in then put a network transform on it to sync every child on it below

opaque ember
opaque ember
#

hello?

normal estuary
opaque ember
#

monobehaviourpuncallbacks?

normal estuary
opaque ember
normal estuary
opaque ember
#

...

#

ok...

#

I use photon

#

not netcode

normal estuary
#

Oh, I see, then I actually don't know the answer to your question. Didn't notice, sorry

opaque ember
#

oh

normal estuary
#

I saw there is no Unity NGO method for NetworkManager.Singleton.StopClient().

When I want a player that is not the host to leave the game, how do I stop the client and destroy the network manager? How do y'all do it?

#

Oh, just found a juicy Shutdown() method. I'll use this along with Destroying the empty network manager once in a non-networked state for extra cleanup.

sharp axle
sour sparrow
#

i found this class on the internet to validate every certificate:

#

public class ForceAcceptAll : CertificateHandler { protected override bool ValidateCertificate(byte[] certificateData) { Debug.LogWarning("Validating certificate"); return true; } }

#

and im using it like this:

#

`UnityWebRequest webRequest = UnityWebRequest.Get(API_URL);
var cert = new ForceAcceptAll();
webRequest.certificateHandler = cert;

    Debug.Log("getting real datetime...");

    yield return webRequest.SendWebRequest();`
#

but i am not getting "Validating certificate" message in the console so it looks like unity isnt even using the overrided function to validate it

#

how can i get the time from this website with no problems?

#

i am kind of a beginner when it comes to this stuff

dapper raven
#

Does anyone use mirror and steamworks? I have an error im having trouble fixing.

lapis valley
#

Hey, OOTL, is Mirror still the best networking solution? or has unity come out with their own

reposted from another channel

ripe mesa
#

Hello, does anyone knows how good UE netcode compared to unity multiplayer framework?

daring sable
lapis valley
#

Im used to mirror and all of the netcode is written with it but ig im willing to switch if it’s significantly better

daring sable
#

Mirror is ok, fishnet is statistically better than both and workflow is similar to mirror, so I'd give it a shot as well. And idk much about NGO :p

lusty glade
#

fusion is meh, the manual is worse than pun, you need to download an example and build your game around that, or else, you wont even be able to create your own room

austere yacht
#

the netcode library you pick will not be the limiting factor of your multiplayer aspirations

ripe mesa
ripe mesa
austere yacht
#

stuff like NGO is lower level than fusion and therefore more generic/less opinionated

#

with fishnet you also either buy into its way of doing the advanced features or you get zero benefits from picking it

#

Overall, ‘advanced’ usually means prebuilt tools optimized for doing one thing well in a narrow space.

ripe mesa
#

Great Opinion @austere yacht 👍

lusty glade
#

I agree, many 'advanced' tools are way too specific, ue for example, is geared for character based multiplayer, do a racing or physics based multiplayer and you'll have to do more workarounds or make your own multiplayer handlers

#

|| ☝️ speaking of my own experience with ue mp||

austere yacht
#

I’m sure UE multiplayer is good, it drives Fortnite, that’s an amazing benchmark. But that’s also what it’s made for and idk how it behaves in practice since I’ve personally never used UE at scale

lusty glade
#

ue multiplayer is really good indeed, the interpolation, prediction & reconciliation works out of the box (for character)

austere yacht
#

In any case these concerns are way way beyond the scope of any project discussed here. Most people here will never need what any of the libraries offer

austere yacht
ripe mesa
#

is Lag Compensation exist in UE?

lusty glade
#

ah right, I forgot why I am here 😅
I'm using fusion
I'm still figuring out why my code doesnt work on client
it does work on host

    {
        gameObject.SetActive(false);
        Debug.Log("Spawning Player");//Called
        networkRunner.Spawn<NetworkCharacterControllerPrototype>(player);
        Debug.Log("Player Spawned");//Not called
    }
austere yacht
#

that’s what prediction and rollback is

lusty glade