#archived-networking

1 messages ยท Page 79 of 1

weak plinth
#

wait, photon networking is free?

#

oh I see up to 20ccu

tidal zealot
#

I have this problem where if another player shoots in the server, the gun's recoil a little into the air, but never returns to it's original position still... (this is something that works fine client side and it's only when you're watching another player shoot) I know it'll be some way around the photonView.IsMine command lines in the code, but can't seem to figure it out myself
this is the shoot function:

#

and this is where it gets called in the Update function:

jade glacier
#

There is no "server" in pun other than the relay - so I assume you mean the master? If you are trying to code with Pun2 treating the master as a server, you will have some difficulties and latencies to deal with. Probably unrelated to your questions, but sounds like you are already down a bad path there. @tidal zealot

#

Your shoot at a glance is an RPC and is also doing some random spread generation - that is going to not be deterministic unless you are RPCing a seed value as an argument for your random.

#

Are you trying to synchronize your guns random spray pattern? Your questions isn't super clear.

tidal zealot
#

sorry, I'm not too sure how to phrase it so clearly 'server' was incorrect, but I'm not building it as though it is a server, don't worry! haha

#

At the bottom of the Shoot function I have the gun move up and back slightly to make it definitely appear as if 'shooting' is taking place

#

in the game, If I watch another player shoot, the gun just goes up and up and up rotates around the player, rather than going up for whatever fraction of a second before returning back to it's original position at the hip of the player

hard oasis
#

Ooh i think that observable classes require the void OnSerializeView and there it has something to observe,and recoil being just a visual thing im not that sure if it should be visible on other players but if you want that just ignore photonView.isMine for reducing the recoil

tidal zealot
#

yeah, I either want to remove the recoil being observable (for the time being at least) or have it so that the recoil works the same way it does for the player when shooting his own weapon

#

I just don't entirely understand why the recoil is observed at all, yet the return of the weapons rotation isn't, when the recoil is dealt with in the Shoot function, but it's only called if the 'photonView.IsMine = true'

timid vale
#

Hey, I have a question about running a game server in headless mode on a Linux machine, is there any way to give input to control the server like the way a minecraft server works?

#

I know I can redirect the log output to show in the console, does this work the other way around?

indigo loom
#

Is there a way to use Mirror that allows me to choose between UDP and TCP depending on what it is I'm sending information about?

I've seen that there are different transport layers but I can't seem to figure out if I will be allowed to do this or not. It seems base Mirror is TCP only and then some of the transport layers are UDP only.

Can I have multiple transport layers?

gleaming prawn
#

You should not need to worry about which IF they give you a reliable send even over UDP.

#

UDP should be the choice anyway

weak plinth
#

Mirror has an ENet transport, you should be completely fine with that for your reliable/unreliable needs

vapid leaf
#

does anyone know how to prevent a game object from being disabled from the hierarchy once a client leaves the server and has authority over the game object? This is for mirror i asked the mirror discord also

haughty needle
#

Can someone help me out with setting up networking

coarse flare
#

Unity has depreciated the LLAPI and the HLAPI right? and most libraries I've seen like mirror and photon use that or are paid. So are there any up to date alternatives or am I mistaken?

trail parrot
#

Does anyone remember that FPS blog gamasutra(?) ? I'm specifically looking for how to handle grenade throws, when to take client side look direction and the spawn pos at release etc

spring crane
#

@coarse flare Mirror and Photon does not rely on UNet, if that is what you meant by "use that".

coarse flare
#

that is what I meant. Thanks for letting me know.

sharp ember
#

Hello fellas !

I am kinda lost on this one, again. I want to store a score (int) and an email (string) to a MySQL DB. Simple as that. I read many things, some working, some other out of my reach in term of comprehension.
It seems that this : https://stackoverflow.com/questions/39140068/how-to-connect-to-database-from-unity would resolve my issue but I don't know what to do concerning the MD5 / Secret key stuff. Where am I supposed to put the MD5 ? Shall I create an entry in DB ? I am working on a localhost, for a webGL build, for what it worth

golden wigeon
#

Anybody has some tips on Developing with Unity and Photon?
Like, how do I avoid having to create a new game, building the game, and all that, just for testing if moveSpeed is set correctly.

marsh tapir
#

RPC method 'RPC_RPC_GetPlayerTeam0(String)' not found on object with PhotonView 1. Implement as non-static. Apply [PunRPC]. Components on children are not found.
UnityEngine.Debug:LogErrorFormat(Object, String, Object[])

#

why am i getting this error message?

floral turtle
weak plinth
#

looks like a rigidbody controller with local authority

tropic apex
#

How can I make my multiplayer game playble by anyone, I now use localhost for testing, but what I need to do to let "for example my friend join too?"

pale birch
#

port forwarding

pure vector
#

so is unity's unet replacement still being made? or is it basically not a thing now

weak plinth
#

I remember around 2 years ago they announced it and deprecated UNET. Fast forward to today and it's not even in a preview state and to my knowledge tied to DOTS

shy granite
#

not sure the current state

shy granite
weak plinth
#

That chart really says a lot about UNET, oh my

#

'Our only available networking solution for the last 6 years is a good option if: you're targeting less than 25 concurrent players, you don't care about cheating, and you're okay with over 1 second latency'

gleaming prawn
#

You guys know these unity blog posts about netcode are a bit of a joke in the network community, right?

floral turtle
#

the flowchart always confused me. I never took anything to production with UNET, but what was stopping you from running a dedicated server with it? And why is the latency 1 second? It was pretty bottom barrel but I don't recall it having anything built in that forced it to that level. UNET was also a messaging layer at best, there's no reason you couldn't write something fully server authoritative with it, right?

#

and why is latency implicitly tied to whether you have a dedicated server? If your server is in china trying to connect to US east it will be slower than two US people running P2P, right?

gleaming prawn
#

Let me use an analogy

#

Say you know the math to solve a second degree equation... It requires the 3 params for you to solve it....

#

That post is saying the answer is 3 or 4, depending if A is larger than zero...

#

That's the best I can describe it...:)

floral turtle
#

poor unet

gleaming prawn
#

Unet has no feelings.,.

#

Lol

floral turtle
#

thank god. It would be miserable with its existence

low coral
#

hey, could someone help me with some unet/hlapi (ik, im stuck with it) stuff. i tried following a tutorial for it but i need to use a charactercontroller with it and it doesnt see it as being active when the object is spawned on the server

#

@ me or dm if you can help, any help would be appreciated

#

ty

gleaming prawn
#

First you should switch to mirror, as it derived the same API

#

Should not be too complex to replace it

#

Then it will be easier to get help

#

Nobody here really works with unet, it's a dead API, and has several bugs

spring crane
#

Yea curious to know why you are stuck with UNet since you seem to be working on the basics. External requirement?

low coral
#

does mirror require any installation. im stuck with this as i will need to be able to work on it in school, preferably on their computers... which is gonna be a whole other set of issues cos of admin stuffs

gleaming prawn
#

??

#

All of these networking APIs are just added to your Unity project, not the unity installation

#

You are not stuck to Unet at all...

#

You can use anything like Mirror, Photon, etc

#

The worst thing you can do, hnestly, is to use UNet

low coral
#

ahhhhhh, o well

#

in that case i'll probs switch to mirror and see how it goes, thanks!

opaque dew
dapper lily
#

Are there any tutorials for setting up a LAN system that explain networking in simple terms? I'm trying to find one but all the ones I've seen start throwing out lots of complex words that might as well be Klingon for how well I understand them ;_;

gleaming prawn
#

Have you released a single player game before?

#

If not, do not start with a multiplayer one... that's the best you do to yourself...:)

dapper lily
#

Im not making a game, I'm putting together an AR learning environment for my PhD

#

But I need to set up LAN support so I can parse controls from a different machine

gleaming prawn
#

If you don't understand what these tutorials say (they are for begginers BTW), then you should not get into this now

dapper lily
#

Dont really have much choice

gleaming prawn
#

Understood (I've been there)

#

Are you a programmer? I mean, a CS major or so?

dapper lily
#

Unfortunately not, I'm a character artist

gleaming prawn
#

hmm

slim ridge
#

oof

dapper lily
#

I'm not afraid to admit that I'm in WAY over my head but I'm way too late into this to back out now ๐Ÿ˜‚

gleaming prawn
#

I mean, not doubting abilities, you are as capable as anyone in the end

#

But there's a long road if you are not a programmer

#

It's like this:

  • you are asking "how do I play hockey?"
  • I'm asking if you know how to skate... and you do not...
dapper lily
#

For what its worth

#

I've managed to get the entire augmented reality part working and programmed all the interactions myself

gleaming prawn
#

I assume you are able to put together some code for the AR stuff you do at least, right?

dapper lily
#

yeah

gleaming prawn
#

ye

#

Networking games is very programming-heavy though

slim ridge
#

maybe you can get it done with mirror

gleaming prawn
#

Not much I can say apart from this

dapper lily
#

I'm under no assumptions that this is gonna be easy

gleaming prawn
#

Ye, mirror would be the most friendly option

spring crane
#

How much time do you have?

gleaming prawn
#

And given the use case should be simple, I'd go for it

dapper lily
#

About 4 months

#

It's not even anything absurd that I need doing. I just need to be able to move gameobjects on one client, and have them also move in the HoloLens client

spring crane
#

All you need is the object moving visually?

dapper lily
#

(TLDR I'm trying to use a leap motion but theres no way of connecting it to the HoloLens, so I need to instead connect it to a different machine and have the interactions parsed over)

#

LAN networking is the only way I can think of to make that happen ๐Ÿ˜ฆ

slim ridge
#

4 months plenty of time

dapper lily
#

Let me get my diagram

shadow stag
#

I wish I had 4 months for any job I do.. ๐Ÿ™‚

marsh karma
#

Can someone help me with a VERY annoying pun issue?

gleaming prawn
#

Ask Michael

#

a lot of devs from photon are in this Discord

marsh karma
#

ok

dapper lily
#

You can't connect the HoloLens to the Leap, even if you could theres no way of running the leap drivers on it. My compromise was to get a micro pc instead (it fits in a backpack with a power supply quite easily) so you can still walk around and maintain all your mobility without being tethered to a desktop

sleek blade
#

@dapper lily Have you looked into using PUN2 for the Hololens

gleaming prawn
#

He needs to run on LAN

#

I'd go for the simplest possible solution

slim ridge
#

mico pc is the server or client?

dapper lily
#

Client, HoloLens is the server

marsh karma
#

I'm making a team death match but adding score to one of the teams when someone gets a kill isn't working even though i think it should be

gleaming prawn
#

not sure if Mirror works on hololens, I guess yes

dapper lily
#

And apparently PUN2 only works on the HoloLens 2?

#

I have the original model

#

Trying to convince my university to buy the new one but unsuccessful so far ๐Ÿ˜‚

sleek blade
#

Does it need to run on a LAN?

dapper lily
#

Is there a different way of parsing inputs that I dont know about?

#

If the MicroPC had enough graphical power I'd skip the networking entirely and just run the build from editor mode in Unity on the MicroPC, but unfortunately it chugs a bit heavily

gleaming prawn
#

I'm making a team death match but adding score to one of the teams when someone gets a kill isn't working even though i think it should be
Ask a more specific question

stiff ridge
#

The devices should possibly be able to open a listening socket. That makes the device a server you can connect to.

marsh karma
#

Can someone help me fix kills not adding to the total score of their team pun2?

#

is that specific

gleaming prawn
#

The answer to the question ABOVE is:
yes, maybe

#

maybe someone can help you

#

If you ask a technical question

#

Just being straight

marsh karma
#

well that is my issue

#

u want me to just post the code

#

?

slim ridge
#

yes

marsh karma
#
[PunRPC]
    private void RPC_Shooting(Player player)
    {
        RaycastHit hit;
        if (Physics.Raycast(rayOrigin.position, rayOrigin.TransformDirection(Vector3.forward), out hit, 1000))
        {
            Debug.Log($"Hit: {hit.transform.name}");
            if (hit.transform.tag == "Avatar")
            {
                int enemyHealth = hit.transform.gameObject.GetComponent<AvatarSetup>().playerHealth -= avatarSetup.playerDamage;
                hit.transform.gameObject.GetComponent<AvatarSetup>().playerHealth = enemyHealth;

                if (enemyHealth <= 0)
                {
                    Debug.Log("I killed someone.");
                    pv.RPC("RPC_AddPoint", RpcTarget.AllBuffered, player);
                }
            }
        }
        else
        {
            Debug.Log("Did not hit.");
        }
    }

    [PunRPC]
    public void RPC_AddPoint(Player player)
    {
        if (player.GetTeam() == PunTeams.Team.red)
        {
            GameSetup.gs.teamRedScore += 1;
        }

        if (player.GetTeam() == PunTeams.Team.blue)
        {
            GameSetup.gs.teamBlueScore += 1;
        }
    }
#

the the addPoint function does get run but it doesn't add any "score" to any of the teams

gleaming prawn
#

Start by logging/debugging the values you have

#

for player.GetTeam(), log that the method is called

#

etc

dapper lily
#

I tried looking up a listening socket for the Leap and I found something called a Websocket? Is that the same thing?

slim ridge
#

no

#

wish i knew more about holo lens

#

what can you run on it? or what runs on it? maybe you do need a websocket :S

marsh karma
#

magically it is working but it adds two points to the team rather than 1

#

why

sleek blade
#

whats your debug say before and after you add it?

marsh karma
#

it should only be running once cus its on button down

dapper lily
#

the HoloLens is basically running win10. Any UWP programs can run on it

gleaming prawn
#

adds two points to the team rather than 1
You are probably triggering it twice

#

Maybe from two different clients...

#

I suggest the "calling" of the RPCs be done from the master client only...

#

this: pv.RPC("RPC_AddPoint", RpcTarget.AllBuffered, player);

marsh karma
#

yeah

gleaming prawn
#

wrap it with an if to only trigger this from the MC

dapper lily
gleaming prawn
#

UNet is DEAD

#

Unet is dead baby

dapper lily
#

Like actually unusable?

gleaming prawn
#

it's abandoned...

sleek blade
#

@dapper lily You're gonna wanna look at Mirror instead

gleaming prawn
#

Use Mirror, which is the open source, still maintained version of it

marsh karma
#

game setup is a singleton in the team death match scene, does that mean that if just the master client updated it, it would update for everyone else automatically?

sleek blade
gleaming prawn
#

When you call an RPC, it's called on all clients (assuming you set the target to all, like you did)

#

BUT, what you are doing is:

  • every client calls RPC
  • each one of the calls gets called on EVERY machine
slim ridge
#

man all the tutorials on this subject are awful

gleaming prawn
#

As I said:

  • call pv.RPC("RPC_AddPoint", RpcTarget.AllBuffered, player); ONLY from MC
#

The actual AddPoint will be called on all clients (like you requested in the param)

weak plinth
#

really you can use almost any UNET tutorial and apply it to mirror

gleaming prawn
#

This is pretty much how RPCs work by definition

dapper lily
#

oki ill take a look

#

"Network Transform to sync position, rotation, and scale with interpolation" so that means if I make a translation from the client side, it wont instantly pop to its new transformations on the server side, right?

sleek blade
#

right

dapper lily
#

Just making a backup of my project files, then I'll try adding the Mirror assets

sleek blade
#

Mirror has a pretty active discord too if you need further help

dapper lily
#

Thanks!

dapper lily
#

Im speculating right now but I think your mirror suggestion may have saved my phd

marsh karma
#

i guess this is more networky
multiplayer fps, when someone's health is <= 0 this DOES run and it DOES reset the health, but it DOESN'T teleport the player back to one of their own spawn points, any help?

    public void respawn()
    {
        if (pv.IsMine)
        {
            playerHealth = 100;

            if (PhotonNetwork.LocalPlayer.GetTeam() == PunTeams.Team.blue)
            {
                int spawnPicker = Random.Range(0, GameSetup.gs.spawnPointsTeamBlue.Length);
                if (pv.IsMine)
                {
                    transform.position = GameSetup.gs.spawnPointsTeamBlue[spawnPicker].position;
                    transform.rotation = GameSetup.gs.spawnPointsTeamBlue[spawnPicker].rotation;
                }
            }

            if (PhotonNetwork.LocalPlayer.GetTeam() == PunTeams.Team.red)
            {
                int spawnPicker = Random.Range(0, GameSetup.gs.spawnPointsTeamRed.Length);
                if (pv.IsMine)
                {
                    transform.position = GameSetup.gs.spawnPointsTeamRed[spawnPicker].position;
                    transform.rotation = GameSetup.gs.spawnPointsTeamRed[spawnPicker].rotation;
                }
            }
        }
    }
gleaming prawn
#

first: why are you checking pv.IsMine in 3 places?

#

You only need the outer one, rest is redundant

marsh karma
#

because i coppied the transform.position... if statements from a different class, forgot to remove them

#

i do have to add

#

when this runs

gleaming prawn
#

that it is not eleporting the player may mean you are controlling this from another script as well?

marsh karma
#

it looks like it teleports the player, but then it instantly teleports back

gleaming prawn
#

well... looks like there's another script that is controlling this

marsh karma
#

no other script taking control tho

gleaming prawn
#

like a character controller or so?

marsh karma
#

that would teleport it back?

gleaming prawn
#

well, depends on how it's implemented

marsh karma
#
private void PlayerMove()
    {
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");

        Vector3 move = transform.right * x + transform.forward * z;
        controller.Move(move * movementSpeed * Time.deltaTime);

        if (Input.GetKey(KeyCode.LeftShift))
        {
            movementSpeed = Mathf.Lerp(movementSpeed, runSpeed, runBuildUpSpeed * Time.deltaTime);
        }
        else
        {
            movementSpeed = Mathf.Lerp(movementSpeed, walkSpeed, runBuildUpSpeed * Time.deltaTime);
        }

        if (Input.GetKeyDown(KeyCode.Space) && !isJumping)
        {
            isJumping = true;
            StartCoroutine(jumpEvent());
        }

        velocity.y += gravity * Time.deltaTime;
        controller.Move(velocity * Time.deltaTime);
    }
gleaming prawn
#

Assuming that pv.IsMine means this object is controlled locally.

marsh karma
#

that is on the player object

#

and it only runs if pv.IsMine

#

imma debug it

gleaming prawn
#

that's the first thing to do always

marsh karma
#

also, this aint got anything to do with untity, but why the heq is the warzone update downloading at 1 byte per second for me

#

again now magically it works

#

but

#

when adding a point it is very random because sometimes it hads 1 somtimes it adds 0.5

#

also sometimes people are 1 shot 1 kill

gleaming prawn
#

well, these are probably things about the RNG function

#

or the way you compute damage

#

Not really a network API issue

marsh karma
#

k

tropic apex
#

Anyone able to help my team with some Matchmaking?
We are using U Net Mirror (updated version)

west loom
#

hi everyone

#

does someone know how to make webrequest api calls github -> iotaledger/goshimmer/wiki/Client-Lib:-Interaction-with-layers

#

for this lib

#

PLEASE!

tropic apex
#

Anyone able to help my team with some Matchmaking?
We are using U Net Mirror (updated version)

wind fjord
#

Does anyone know of an offical PUN discord or is this channel as close as it gets?

coarse flare
#

Are there any standards when it comes to designing your replicating game objects? how do I decide what I need to replicate within the class and how to design my game objects? does anyone know any resources?

weak plinth
#

Not sure what you mean, also what network library are you using?

coarse flare
#

Mirror

#

Its hard to explain I guess. But I'm just looking for standards that I should know when programming multiplayer games.

next sedge
#

@coarse flare there are a lot of best practices. I'd say the most important thing is to send as little across the network as you can, even if it means a compromise. It would help to know what you're targeting. Also, there is a Mirror discord if you are not in it already.

#

Which I apparently cannot post a link to

coarse flare
#

Okay, I'm just curious in general as I've tried to tackle networking a few times but always flake out. But lifes changin' for me!

coarse flare
#

When I'm changing code it seems like I have to build every time to test the multiplayer aspects which takes a minute or two... every code change with URP... is there a better way?

floral turtle
coarse flare
#

thanks... seems janky but alright...

coarse flare
#

Something about doing that breaks something in mirror. so RIP that solution. tried both hard & soft links. Guess I'm just SOL.

next sedge
#

I just build a lot

gleaming prawn
#

We use the softlinks a lot with quantum, works perfectly

steep wolf
#

@coarse flare symlinks work with mirror

#

Packages, assets & projectsettings is the folders you need

west loom
#

Why does this work in unity but not in standalone? ``` public void InitWallet()
{
Process process = new Process();
process.StartInfo.FileName = "Assets/dll/cli-wallet.exe";
process.StartInfo.Arguments = "init";

    process.StartInfo.UseShellExecute = false;
    process.StartInfo.RedirectStandardOutput = true;
    process.StartInfo.RedirectStandardError = true;
    process.Start();
    //* Read the output (or the error)
    string output = process.StandardOutput.ReadToEnd();
    print(output);
    responseText.text = output;
    string err = process.StandardError.ReadToEnd();
    Console.WriteLine(err);
    process.WaitForExit();

}```
gleaming prawn
#

I'm not sure this related to Networking...

#

So, it'd be difficult to find help in this channel

#

You need to check on more general channel (or ask Unity support) to see if they strip out system process classes from build, etc)

west loom
#

it's about networking

gleaming prawn
#

IMHO, this could be better done with native lib integration than to try to run a process

#

it's about networking
No, you are running a local process and reading the output of it...

west loom
#

the thing is the lib is not avaiable

gleaming prawn
#

This has nothing to do with communicating in between game clients for multiplayer games.

#

the thing is the lib is not avaiable
Well, maybe the unity build is stripping out the file, etc

west loom
#

I want to implement IOTA. Which is a DAG

gleaming prawn
#

Nice acronyms...

west loom
#

which is for multiplayer ๐Ÿ™‚ at least for me later ๐Ÿ˜„

gleaming prawn
#

The particular issue you are asking for help has nothing to do with MP

west loom
#

I made a .exe of the repo

#

how can I use this lib=

#

?

gleaming prawn
#

I know what you are trying to do... But what I can say is:

  • IMHO, I'd go for a different approach (run a native lib, not a process)
  • Ask the question in the general programming channels
west loom
#

is that a lib?

gleaming prawn
#

I do not know... It's a lib/program you are using

west loom
gleaming prawn
#

I have no idea what it is... Just saying running an exe process from the unity client has not strictly to do with networking

#

This is related to: running native libs/processes

undone sigil
#

@west loom are you using il2cpp? if yes, Process is not implemented there

west loom
#

I was on mono and switched now to il2cp ๐Ÿ˜„

#

@undone sigil I will change back than : D thx

undone sigil
#

i still don't recommend launching a process though, always better to use a dll

gleaming prawn
#

he needs it on Android... This approach would not work at all

west loom
#

hmmm

#

so how ๐Ÿ˜„

gleaming prawn
#

first google hit for IOTA C#:

#

there are others, etc

#

you need a .Net implementation, that's it... Anything else you are wasting time.

west loom
#

this I have already implemented. but will not work soon

#

that's why I'm looking for other solutions

dapper lily
#

Let me try that again without a picture of a cat on my clipboard ๐Ÿคฆโ€โ™€๏ธ

dapper lily
#

Wait hold up, even if I've registered this cube as a spawnable prefab, do I still have to instantiate it manually in the code?

wintry mantle
#

Hey everyone! I'm new to Unity's networking system. I'm currently exploring using Mirror to make a game that can either be played in single player or with friends. For the single player side, do I need to code game mechanics twice, essentially? One for single player and another for the Network manager? Or can single player run on the Mirror components in offline mode? If you guys could help me understand networking a little more, I would be so grateful!

weak plinth
#

You can use Mirror and code your game in a player-is-listen-server setup

#

In that case, single player would run as normal. The player is just a 'server' that is instantly processing its own input

#

Then for online, if using a dedicated server, just don't spawn a player for the server

wintry mantle
#

oh great! So single player is basically just a local host processing commands to the only player in the game which is also the host? I hope I'm understanding properly since I'm very new.

weak plinth
#

yep. You don't even need a connection or anything it's all done in the same process

wintry mantle
#

amazing! I was worried I'd need a bunch of scripts just for single player, or constantly check a bool for every game mechanic. This is sweet haha

#

Thanks so much Nate!

harsh lava
#

Hi, I was wondering what best way to implement an authorization key in code so that it's difficult get a hold of.

weak plinth
#

I would consider the value of the string and why it needs to be protected, possible attack vectors etc

weak plinth
#

UNET (the default network stack that comes with Unity) is abandoned and buggy. It is recommended to use third-party networking such as Photon and Mirror

#

ugh

#

so i have to do everything over again?

#

Mirror is designed to be a near-seamless transition from UNET

#

so go with mirror and keep my code?

#

yes most if not all of your code should transfer over

#

aight cool

#

dang its mmo scale its perfect

#

... open in unity ain't working

#

oh finally got it

#

i had to go to package manager

gleaming prawn
#

Mmo scale? Rsrrs

#

Here we go

pliant trench
#

Hey, i am trying to use play-games-plugin's Nearby functionality. I wanted to know if it still works ? I tried the sample, but it doesn't discover any rooms. It says that I dont need to configure a play console for Nearby, so I havent, but is that true or do I need to configure it ?

hallow locust
#

Weapon has "isServer" true, but the bullet has "isServer" false. (Mirror Networking)
I'm spawning the bullet from a script attached to the weapon. Am I missing something? ๐Ÿค”

weak plinth
#

is the bullet spawned with network instantiate? Regardless I believe there's a static call to check is server. Something like NetworkServer.active

hallow locust
#

It's first Instantiated on server and then NetworkServer.Spawned

hallow locust
#

I've figured out the issue, I'm spawning an object that has children, so the parent's "isServer" is true but children are not having neither their "isServer" or "isClient" true.

Is there a quick fix or I'll have to unparent them, spawn them seperately, and then parent them again?

spring crane
#

Nested networkidentities are not supported afaik

#

If you wanna treat these objects as separate network identities, I would consider just replicating the parented behavior manually

#

Which probably means just managing the transform

wind fjord
#

Hello all. Using PUN and, conceptually, I need some simple help. I'm struggling with how (mechanically) to make two players that have been loaded into the same scene see different things. For example, lets keep it simple and I say I want players to see a message that's "You are PlayerX" (where X = PhotonNetwork.Player.PlayerID).

My initial thought is that I could instantiate a text box (with a PhotonView component) for each player and set the Text.text field to something like

("Player" + TextBoxObject.PhotonView.Owner.PlayerID.ToString())

This would definitely create what I need, but how do I hide the boxes (from the perspective of a given player) that the given player doesn't have ownership of? I know I could normally do something like

Update()
{If PhotonView.IsMine == false... SetActive.False}

but my concern there is that I'm not explicitly setting the "Active" field relative to a player so I feel like each player's Update component would just be in a war setting an unsetting things to active. Any help would be great!

gleaming prawn
#

Why don't you run UI just locally

fervent flower
#

UNET is no longer in use, but are there any networking packages for 2020.1 yet?

#

Mirror looks like it's only updated for 2019 versions.

#

I noticed there's a preview netcode package from Unity for the latest versions, using ECS. I'm not sure if that's worth looking into?

steep wolf
#

@fervent flower most of them work anyway, did you try?

shy granite
#

@fervent flower there are some low level networking packages, nothing too fancy like mirror/photon/etc

wind fjord
#

@gleaming prawn how do you run a UI "just locally" ?

shy granite
#

both in preview

tropic creek
#

Hi guys, I want to ask if someone knows how to see if a player is enters to a room in photon 2 unity

wind fjord
#

@tropic creek, you can do an override of OnPlayerEnteredRoom(Player newPlayer) to include a debug

#

so something like...

#
        public override void OnPlayerEnteredRoom(Player newPlayer)
        {
            Debug.Log(newPlayer.ToString() + "has entered the room")
        }
keen steppe
#

Thanks

safe lynx
#

im using photon and im having problems

#

i want a way to debug everythign

#

is there a way to get the "id" of a lobby?

#

ID being a custom number assigned uniquely to each lobby created

devout fable
#

hello , have someone a good tutorial for using mysql as a database ?

rigid heron
#

Hey I am new to networking, which sort of platform would you recommend me, I want to make a simple third person shooter? I think Photon would be good, but Photon has like 5 versions?

dark ether
#

Hey, everyone! I have a nodejs udp server based on dgram. My question is how to efficiently store types of client-server messages, So I don't need to have 2 code bases in typescript and c# of the same things...

slim ridge
#

you could compile it into a plugin so it's all in one place

#

nothing wrong with having them in both places though. that way you can optimize it for the language.
If the number of msgs becomes unmanageable you need to rethink your protocol anyways

dark ether
#

@slim ridge compile what into plugin ?

#

I already have message types written in typescript

slim ridge
#

your messages and their serialize/deserialize

dark ether
#

Do you mean make a dll that would serialize/deserialize messages and use it both in unity and nodejs ?

slim ridge
#

yea

dark ether
#

dll would not be a cross-platform solution ๐Ÿ˜ฆ

spring crane
#

@rigid heron PUN is the easiest one. Is peer to peer over relay.
Mirror is quite nice if you are looking for the classic server <-> client setup. Strong community.
Photon Bolt would be one the strongest out of the box solutions for more serious shooters.

rigid heron
#

Ok thank you ๐Ÿ‘

marsh karma
#

is there a way to check if your ip (and/or hardware) has two clients in the same photon room?

gleaming prawn
#

IPs are not exposed at all

#

This is privacy information, from a room it's not possible to obtain the IPs of others (photon)

#

You can use photon's custom authention hooks though, so to prevent the same user to connect twice from different locations simultaneously, efc

slim ridge
#

@dark ether it certainly is, it just means you have to build a lib for each platform.

livid island
#

I'm just getting started with unity and networking. Looking at Mirror - does anyone know if it is compatible with Unity 2019 LTS or only 2018 LTS?

weak plinth
#

both

weak plinth
#

what things should I look into for webgl and mobile networking?
I currently have my own networking system with system.net.sockets but apparently that doesn't work with webgl. idk if it does for mobile either

pliant cliff
#

Hey guys! I have a weird problem with the editor, I'm trying to write my own networking with TCPClient and TCPListener, but when I try running a client from the editor and a server from a build the editor does not connect to the server. If I run the server from the editor and client from build it works. It also works if I run both client and server from builds. Anyone knows what causes this?

gleaming prawn
#

@weak plinth webgl can only use websockets or webrtc

#

AFAIK you need to use a library that implements hooks to those features from the web-browser

#

That's what we do with the Photon client library on WebGL builds...

weak plinth
#

oh

#

okay thanks

dapper lily
#

[Mirror] I have a cube that has a network identity and network transform component on it. It is set to client authority. If I move it on the client, the movement does not happen on the server and I'm not sure why

#

I tried googling it and im not finding any straight forward answers, but I am seeing a lot of discussions about rigid bodies? Does my cube need a rigid body component for the network transform to work?

#

I just want to be able to move objects on the client and have them move on the server too why is this so hard ๐Ÿ˜ญ

dapper lily
#

update: tried doing it the other way around and it works. For my project, running the server on my micropc instead of the hololens is totally fine

#

I am happy now

round shadow
#

hello everybody im coding in bolt i have a problem in which the error says that the axis arent set up properly i have no idea how to fix it i fixed something like this before but im not sure what the hell did it

weak plinth
#

how can I debug webGL networked clients? I can't place breakpoints?

slim ridge
#

use logs

weak plinth
#

makes sense

round shadow
#

hello everybody im coding in bolt i have a problem in which the error says that the axis arent set up properly i have no idea how to fix it i fixed something like this before but im not sure what the hell did it please help me

gleaming prawn
#

@round shadow please ask in the bolt discord server

frosty crystal
#

Hello. In network game Should every player have their own gamemanager or just one which network object

#

What do you do when you hold score in network. Do you use single gameobject which has photonview? or you doing other way

round shadow
#

fixed ma problem the axis were inverted

gleaming prawn
#

cool then

vapid leaf
#

anyone here know how to integrate steam works to create a lobby to invite ur friends?
I Want to make a co op experiance like risk of rain or borderlands

weak plinth
#

anyone here that has implemented a https server + unity game? I'mm trying to figure out how to get my app to connect to a https server

slim ridge
#

what does error say?

dusk forge
#

Hey, im new to using Photon, has anyone had any experience with this error before ?
Assets\Client.cs(4,14): error CS0234: The type or namespace name 'Pun' does not exist in the namespace 'Photon' (are you missing an assembly reference?)

frosty crystal
#

Hello. I created a map with randomize in PUN2. How can I send my dictionary which holds the vector3 to remote player? I get error. Primitive type is needed, it says

frosty crystal
#

Please there is nothing information about sending Dictionary<Vector3,GameObject> through the photon2 on the internet

#

I am going to die ๐Ÿ™‚

weak plinth
#

your dictionary is using Vector3 as keys?

frosty crystal
#

your dictionary is using Vector3 as keys?
@weak plinth yes that is right

#

according to these values, my remote player's scene will be created with nested for loop

#

My goal is to send the data of randomize created map to remote client. there is 2 daha that I have to send. One is Vector3 which is the coordinate of the cube, second is the type of the cube.

#

game was made of kind of cubic world.

weak plinth
#

sounds like you want a struct instead

frosty crystal
#

yes, I tried to send vector3 bur it supposed to be primative value of variable for sending with RaseEvent

#

I could not figure it out after that.

frosty crystal
#

Hi. I can not send data of the map creation seed which are consist of keys are vector3, values are gameobject.

#

How can I send through the clients who get in the same room, will take the seed to create the map

#

Pun2

gleaming prawn
#

you can NOT send a game object itself

#

a full game object is not something you can serialize

tropic creek
#

Hi guys I am using pun 2 and I want friends to be able to join each other party, I have the friend list already, but how can I do that if you press on your friend it will join his room?

silent zinc
#

Can anybody tell me why my network system works in editor, and doesn't work in built version?

#

Only the client that runs on editor can receive certain messages from the server, while the built version doesn't...

#

I really don't know what i'm doing wrong...

#

Is it a Unity Bug or some intentional feature?

slim ridge
#

no idea what you're doing so how can we tell u what the problem is?

high night
#

@silent zinc These things are hard to figure out without debugger, you'll probably need to debug the build version to see whats up

silent zinc
#

how can i do that?

high night
#

You ever used debugger?

#

vs debugger

silent zinc
#

i used to debug my C programs with gdb

high night
#

visual studio has debugger and you can connect it to debug the build

silent zinc
#

ok, what should i look for?

high night
#

@silent zinc you build the project with these options enabled:
-development build
-script debugging
-wait for managed debugger (if you have it)

#

and then vs debugger will see the game in the dropdown menu, you'Ll be able to select it to debug

#

if you dont have that last option, you just gotta be fast to connect the debugger before you miss the error

#

your error probably occurs after connecting to server or hosting so you probably dont even need it

#

you can connect the debugger just before you host/join

silent zinc
#

thanks

#

i'll see if i can find the problem

silent zinc
#

@high night can u help me pls? I've done all the steps u said, i have a debugger session, i can even attach vsd with Unity Editor, but i don't know where and how to look for...

#

i mean, is there a way to see all the functions called in real time while the game plays?

frosty crystal
#

you can NOT send a game object itself
@gleaming prawn then can I sent Hashtable<Vector3, int> then?

gleaming prawn
#

these are serializable structs AFAIK

silent zinc
#

@frosty crystal i don't clearly know ur problem, but i would suggest u to use json to send gameobjects, and to convert that Vector3 to an array of 3 elements, and do the conversion on the other endpoint

gleaming prawn
#

So, not sure if just like that as a Shashtable, but definitely the types can be sent

#

Please, do NOT use JSON

#

๐Ÿ™‚

#

Way tooo slow... Not really for realtime.

silent zinc
#

why not?

#

oh

#

well then raw bin?

gleaming prawn
#

We#re talking about realtime, possibly alloc free data transfers

#

Raw Bin is NOT cross platform

#

PUN has build in serialization for most of these types...

#

I'm just not one of PUN devs (I am one of Photon Quantum core devs)

#

But I'm sure there examples in the docs and tutorials about sending serializable objects and structs

silent zinc
#

@gleaming prawn so what does Minecraft use? :\

gleaming prawn
#

I know you can send them via RPC even

#

so what does Minecraft use? :
I guess it's a custom system by their own.

#

I'm not a minecraft dev...

silent zinc
#

i've red the protocol

#

they use hex

gleaming prawn
#

what ishex?

#

hex

#

๐Ÿ™‚

silent zinc
#

and varint and varlong

gleaming prawn
#

oh, ok... but it's a custom binary protocol that uses these types

#

Could be anything, I do no know...

#

Just saying .net bin serialization is NOT cross platform

silent zinc
#

cause it's .net, obviously you can't hope to have a code that works in all devices/OS.

gleaming prawn
#

well

#

That's what WE do

#

you can't hope to have a code that works in all devices/OS.
This

#

But serialization is code-generated for every type

#

and we only use memory aligned structs with explicit layout, etc

silent zinc
#

Side problem idk if i should recieve / send in while loops with Task.Delay(1);...

high night
#

@silent zinc debugger is for stopping execution of the code at your brakepoints

#

just place some brakepoints around suspicios areas

#

or

#

try to find issue like you do a binary search if you know what i mean

silent zinc
#

๐Ÿ‘

high night
#

place brwlakepoint as line 100 for example

if errs has occured there, next brakepoint on line 50

#

if not, next brakepoint on line 150

#

.
i mean you can do this if error is a logical error that doesnt print out and console errors

#

some values are wrong for example

frosty crystal
#

How can I send my Dictionary<Vector3,int> as adding to object array? I could not convert it. Sorry it may seems very basic bur, I am dieing ๐Ÿ™‚

#

My dictionary holds these values. But PhotonNetwork.RaiseEvent is accepting just object type of data.

#

I could not cast it. how to cast.

#

Very appreciated for your help!

shrewd glen
#

Consider using an array?

#

Or... what are you trying to send?

slim ridge
#

the keys and values are both object
send Keys then Values

frosty crystal
#

how Can I convert object[] array to a dictionary

#

I tried to cast but it says InvalidCastException: Specified cast is not valid.

weak plinth
#

Why send as <object, object> when Vector3 and int are serializable types?

#

I believe you can simply use Photon's own Hashtable. However I feel like there is a much better solution than using Vector3 as keys

#

It seems like you're just trying to send vector3 and int as a data pair. if that's the case then you should create a serializable class

frosty crystal
#

Why send as <object, object> when Vector3 and int are serializable types?
@weak plinth I can send data, but when I receive data as object, i have not been casting them to proper variable. For example, I receiving photonEvent.CustomData as object. What should I to cast it as a new Dictionary for example? I am sending a dictionary which is Dictionary<Vector3,int> and receiving object. But I can not cast object to new dictionary

weak plinth
#

I am assuming it doesn't know how to deserialize your Dictionary<Vector3, int> so it's just handing you a byte array

frosty crystal
#

yes that is right

#

how can I do that anyway?

#

It returns null

weak plinth
#

can you try just sending your keys and values as two separate arrays, and creating a new dictionary from that?

#

there's also Hashtable which I mentioned earlier but I haven't used PUN in years

frosty crystal
#

that is possible but, I am storing data where is being created by nested for loop as Vector3. It is hard to iterate the timer of the array.

#

I use hashtable now. My problem when I receive. I can not cast hashtables also. 10 sec send a picture.

#

Hashtables belongs to Pun.

jade glacier
#

Pun2 and most of the core Photon libraries cast all things to objects to make it easy for less experienced devs to serialize all sorts of things. But its not a good practice for anything heavy duty.

#

If you want to avoid the garbage creation and just have more control, you will want to write your own data to a byte array and send that. If you want zero allocations then you will want to use the NonAllocByteArray that is part of Pun2 now.

frosty crystal
#

Yes, I will have to learn that. But I have lost 2 days to figure it out and I have to do something appear for my project. No one read codes

jade glacier
#

The object[] are there for less experienced devs who just need things to work - you can use those yeah.

frosty crystal
#

Thank you all of you. Ill try again.

bronze knoll
#

I am not sure why they switch, and also it seems that the first players movement gets slowed for some reason

jade glacier
#

Sure your objects are switched? And you don't have the wrong cameras being made active?

weak plinth
#

hm, my ipad 2 with ios 9 is connecting to my server online but not my iphone 11 on ios 13.
Strange thing is, If I download my app from the app store on my iphone 11... it does work.

bronze knoll
#

Each player will have their own camera, am I able to just have each player prefab have a camera attached to it and spawn it in?

jade glacier
#

I typically include cameras with my player prefabs, and use code to enable/disable them.

#

Usually in the form of a camera manager

#

Since you may want things like death cams and such, but no idea what you have going on so there is no one answer for that.

bronze knoll
#

I have no plans for any other cameras, just one for each player. But yeah when I load in two players their controls get mixed up

jade glacier
#

The IsMine usage looks correct, so that makes me think something else is just making you think they are backwards, when you are actually controlling the correct one.

bronze knoll
#

As a note in the console it is constantly saying there are 2 audio listeners. I assume this is due to the 2 cameras but I don't think this should cause any issues

#

Also this is how I spawn the player, maybe this could help

 private void CreatePlayer()
    {
        Debug.Log("Creating Player");
        PhotonNetwork.Instantiate(Path.Combine("Player"), Vector3.zero, Quaternion.identity);
    }
jade glacier
#

It sounds like you have the right player under control, and your camera code is missing

bronze knoll
#

Yeah it could be that the cameras are switching, could using [SerializeField] to declare the Camera object cause issues?

jade glacier
#

The camera object will typically be a static, and gets assigned at runtime

#

so that does sound suspect

#

Ideally you would have a basic camera manager, that starts with the scene camera as the active, and when a player joins, its camera should have a component that registers itself with the manager, letting it know there is an active player camera now and the manager should disable the scene camera.

#

And when the player camera gets removed, the manager should re-enable the scene camera, or the other players camera... or whatever it is you want to happen.

bronze knoll
#

Alright I played around with it a little more and I am 90% sure it is because the cameras are switching. I tried setting Camera by using GetComponentInChildren but I get the same result. I am kind of lost right now

#

Also I am switching scenes from the menu to the game, so I wouldn't have to disable the scene camera

bronze knoll
#

Yeah I am not sure what to do anymore. If anyone has the time to help feel free to message or ping me, going to take a short break. To summarize, after instantiating the player it seems like the cameras are being switched resulting in player 1 viewing player 2 and vice versa. https://pastebin.com/dPePMxSV Here is my playercontroller where I initialize the cameras.

safe lynx
#

im using photon and im having problems with instantiate

#

do you have to be the host to do PhotonNetwork.instantiate

jade glacier
#

There is no actual host in Pun2. There is just the relay and clients. There is one client that is given the Master Client role, but that role mostly is up to the dev to make use of.

#

Be aware that any client that uses .Instantiate will become the creator of that object. When they leave the game, that object will get destroyed with them by default. Typically any objects you want to stick around even if the person who called that instantiate leaves - you will want to use InstantiateRoomObject

bronze knoll
#

Is there a specific way you have to use raycasts to detect an instantiated object? When I place the object in the scene my raycast can detect it, however if I instantiate it, it won't work.

 GameObject block = PhotonNetwork.InstantiateRoomObject("DiamondBlock", new Vector3(0, -1, 5), Quaternion.identity);
jade glacier
#

Typically you use GetComponent<PhotonView>

gleaming prawn
#

@frosty crystal you are trying to send images through photon?

#

That's not what it is made for... If you send too much data you will get.into the bandwidth caps (or pay a shot ton of money)

#

All these networking techs are for sending small realtime data (fast), like positions of objects, inputs, etc....

#

For sending content like video, images, etc, you should be looking for other types of tech like CDNs...

#

I'm saying this because you said 10s to send a picture...

frosty crystal
#

@frosty crystal you are trying to send images through photon?
@gleaming prawn No Eric. I am trying to send data Vector3 and value of the element. You are right.

gleaming prawn
#

LOL; I read again

#

apologies... YOu said send-picture because you would send a screenshot... My mistake

frosty crystal
#

And I have another afterlife question for you ๐Ÿ™‚ How Can I get custom room properties to my local dictionary withouth using trygetvalue

#

apologies... YOu said send-picture because you would send a screenshot... My mistake
@gleaming prawn ๐Ÿ™‚

gleaming prawn
#

I still have no idea why you want to send a dictionary where a vector is the key... totally boggles me

#

You could technically save in player properties, ye

#

Depends on how BIG this is

#

How many entries

#

BUt as I said, I do not work with PUN, so I'm not the person to ask..

frosty crystal
#

In bomberman game, when master client creates room, all the data stores inside of an dictionary which keys are vector3 (position), values are type of box.

#

so the remote client can create his game according to master's creation.

#

I still have no idea why you want to send a dictionary where a vector is the key... totally boggles me
@gleaming prawn not much at most 20x20 map =400 500 vector3 and int values

gleaming prawn
#

Ok...

#

Is it you who talked to me about bomberman?

frosty crystal
#

yes that is right

gleaming prawn
#

This looks like the totally wrong way of building such game...:)

#

But...

#

Are you using vector as the grid coordinate?

frosty crystal
#

yes.

gleaming prawn
#

You can use an Int16

#

it's a grid

#

UInt16

#

that's it...

#

Vector is a HUGE waste of data

frosty crystal
#

hmm. Ok. Ill change it now.

gleaming prawn
#

And also... you do NOT need to exchange the whole map at all

#

Just send an RND seed

#

and make all clients build the same grid based on that... Simple

#

You just need to send ONE int

#

that's it... Save it in the room properties

frosty crystal
#

I do not know how to rnd seed being send will check it now than.

#

but. am I right? My master client creates a dictionary which hold the box locations and types and sends it to the PhotonServer. All the clients comes, takes and builds their game (what we called seed is the data that master send right?)

jade glacier
#

yeah, please don't ever use a float as a key

frosty crystal
#

yeah, please don't ever use a float as a key
@jade glacier ok ๐Ÿ™‚

jade glacier
#

Is your grid size fixed?

frosty crystal
#

yes. master client selects with slider

jade glacier
#

And seed is pretty basic, you set the seed right before doing your random map generation stuff.

#

And you just set that exact same seed right before the exact same generation code on clients

#

And if you did it right, you will get the same results.

#

In networking you are ALWAYS looking for determinism where you can find it, because sending results is expensive vs sending causes.

frosty crystal
#

yes I hold the seed in dictionary and send it with setcustomroomproperties in a hashtable

#

but, in creatiation process, I can not take the custom room property

#

because I do not know how to cast it

jade glacier
#

Trying to get it from string back to an int you mean?

frosty crystal
#

no I want the seed inside of Dictionary<Vector3, int>

#

Like that. Clone works but I could not cast it to in a dictionary

jade glacier
#

I am not sure why the seed would be in a dictionary of any kind - rather than just a single room property

#

What is that dictionary of?

frosty crystal
#

according to dictionary, all client will create their maps

jade glacier
#

That looks all very very wrong

frosty crystal
#

because it holds location of box and type of box

jade glacier
#

The vector3 key right out of the gate is trouble

#

But aside from that, the seed doesn't need to be part of any dictionary, its just a single value that is used prior to random generation

frosty crystal
#

hmm. I do not know than what is a seed

jade glacier
#

I suspect you probably don't want to be doing networking or multiplayer just yet. This is going to be VERY difficult if you haven't gotten a solid handle on Unity and C# already.

#

Have you finished a single player game of a similar type to this MP game you are trying to make?

frosty crystal
#

Yes I got some courses. and made fps kinda counter game in pun2.

#

but every game have different approach.

jade glacier
#

You'll want to read up on seed and random

frosty crystal
#

I am lack of kinda experience

jade glacier
#

Because what you are after is a way to recreate the entire generation using a single seed.

frosty crystal
#

You'll want to read up on seed and random
@jade glacier I am starting to have a look now. Thanks!

weak plinth
#

Anyone know how I can do an authentication system with Mirror?

#

so like sending and checking username and password then saving and loading data to server

gleaming prawn
#

Anyone know how I can do an authentication system with Mirror?
Is there any? Honest question

jade glacier
#

I think maybe.

weak plinth
#

@gleaming prawn nop not a built in one

#

Does photon have one?

#

I was about to check out PUN

#

I'm getting tired of all this networking hassle

#

I already wrote my own system that works perfectly fine

#

only problem is that it's limited in it's own way

gleaming prawn
#

Photon can hook up to external Auth services, including custom ones

#

Because photon itself does not offer.player profile storage services, there is no point in having a "built.in" Auth...

#

What is built in is the ability to hook to external authentication services...

urban sonnet
#

i need help

#

in PUN2

#

so i want to make my child animator component observable

#

how do i do that

jade glacier
#

Do you have the latest version?

#

I have changed observables recently, but not sure if its in the current store version.

#

But the new changes should allow for you to put animator and transform views on children

urban sonnet
#

HOW

#

@jade glacier can you please show me in dms

#

ive been trying for an hour

jade glacier
#

Can you screenshot your photonview?

urban sonnet
#

ok

#

opening

#

wait

jade glacier
#

Either you haven't updated to the most current Pun2, or its not in there yet.

urban sonnet
#

wait

#

ill see

jade glacier
#

You should see "Find Observables" if its up to date and supported.

urban sonnet
#

wait

jade glacier
#

Get the latest. If it has that option, set it to Auto

urban sonnet
#

updating

#

thanks for the info

jade glacier
#

And it should find your AnimatorViews

urban sonnet
#

ok

#

thanks so much

jade glacier
#

If it doesn't have that option, then its not in the release yet.

urban sonnet
#

ok

#

eyyyyyyy

#

it works

jade glacier
#

excellnt

#

Pretty sure they will all work correctly. It was recently added and I didn't test it all that heavily.

urban sonnet
#

ok

#

thx again

frosty crystal
#

@jade glacier I am starting to have a look now. Thanks!
@frosty crystal Oh my gosh. How easy was it. I am keep forcing myself hard all the time. All the time, I think differently and that causes problems. I do not know if I become a good programmer

#

just 4 line code and it is ok. I spend 2 days, days and nights!

subtle sphinx
#

Hello

#

I'm going to make a online game with matchmaking, any tips on what framework to use?

#

MLAPI and Mirror looks like doest not supports matchmaker

spring crane
#

Yea those types of services tend to work separately from the actual gameplay server networking solution

#

In theory you can just register bunch of game server with your matchmaking server and then the client requests a server from the matchmaking server

random pier
#

Is this the place to talk about netcode?

slim ridge
silent zinc
#

Guys, i'm in desperate need of help for my new game network system, it's a 2D shooter game, i'm having trouble synchronizing the players positions, and also i don't know how to properly register bullet collision ( loss of health ), i know that it must be done all server-side, in order to accomplish this. For now, it's all client-side, the client send a status object (with player's X and Y coords, and other values that represents what the player is doing ) to the server, and the server forwards it to the other client. The result is messy, there is lag in the opponent movement, sometimes the events don't get caught, and other buggy stuff... What is the correct way of doing this? Could you link me some online resources that i can read in order to understand what i need to do? I would really appreciate that : ) Thank you in advance!

frosty crystal
#

Guys, i'm in desperate need of help for my new game network system, it's a 2D shooter game, i'm having trouble synchronizing the players positions, and also i don't know how to properly register bullet collision ( loss of health ), i know that it must be done all server-side, in order to accomplish this. For now, it's all client-side, the client send a status object (with player's X and Y coords, and other values that represents what the player is doing ) to the server, and the server forwards it to the other client. The result is messy, there is lag in the opponent movement, sometimes the events don't get caught, and other buggy stuff... What is the correct way of doing this? Could you link me some online resources that i can read in order to understand what i need to do? I would really appreciate that : ) Thank you in advance!
@silent zinc Ufuk Demirbas The photon lectures are avaliable on Udemy

#

My question is :

My game manager is networked object in photon scene. I want both of the clients (remote and master)to get referance. Is it possible to get two referances on to an object?

Thank you!

prime dawn
#

I want to register when every player have chosen their team and when everyone's ready, send an RPC from the master client that starts the countdown

#

it doesn't matter how many players choose their team, it only shows that 1 player (local) is ready out of e.g. 3

verbal current
#

Question: When Unity will solve the complication around the security issue of reading a JSON file with a WebGl Build ?

#

only Firefox allow to open webGl with a localhost but not reading data as JSON.

#

at least post a workaround it or the right way to build the WebGl that include json files so people will know...

digital girder
#

Hi all! I am new to networking. Am working on Photon for multiplayer integration. I want to instatiate two players like each facing another player. For that I need to change one of the players x scale or I should flip the sprite. How can I make it show across network.

trail parrot
#

Should servers really disable Animators in players?
Is this a significant optimization?
I would just disable renderers and keep Animator, bcoz i'll need it for.. animation-based hit collision melee

Also, anyone got good resource about animation collision melee for multiplayer?

graceful zephyr
#

@trail parrot disable all rendering, but u need the animators if you use animations or game logic

trail parrot
#

Is it worth it tho(for server's cpu, say in an mmo)? Should i try another approach like tweens, shape-casts, that only happens when a melee is triggered?

graceful zephyr
#

ยฏ_(ใƒ„)_/ยฏ

trail parrot
#

I knew it

jade glacier
#

Relying on a unity exe as the server for an mmo? I would say if you are even considering that... You might not want to make an mmo. Making an mmo is your networking thesis, not your networking 101.

trail parrot
#

Umm im just asking?
And i'm making a multiplayer, with unity exe, and i dont see what's wrong with that

#

I dont get what u mean by thesis and 101 btw

safe lynx
#

ok does anyone have any experence in storing data on a server using unity?

#

because im 100% brand new to networking and want someone to help and answer questions

safe lynx
#

WhO gOhst pinged me

shy granite
#

not sure if storing data in a server is considered "networking", but you have a lot of services for storage, you just need to interact from c# with web requests probably (or even using those services API like firebase for example), it depends on different factors, how frequently you need to access that data?

jade glacier
#

Usually you keep the simulation sync aspects of networking totally separate from data storage of any kind. It is networking, but typically that has nothing to do with the server/clients connections our state transfers. Usually that kind of stuff is pulled from databases or content servers asynchronously.

lapis vapor
#

Guys, I'm making a multiplayer using photon. I created a scene like if two players joined a room, the next scene starts. My problem is when a new scene created everything in previous scene is destroyed right, so the connection also disconnects. How can I keep the connection alive between client if new scene loaded

spring crane
#

Connections shouldn't really be tied to scenes in any way

lapis vapor
#

@spring crane so the Rpc calls I made in scene 2 will execute in the 'other client'?

spring crane
#

A bit unclear what the situation is. If you are just changing the level in the match, using the Photon load scene methods probably handles it nicely for you

lapis vapor
#

@spring crane , I did it using this function

PhotonNetwork.LoadLevel(1);
spring crane
#

Yea, so do you actually have some problem that you are observing?

lapis vapor
#

I was working on my creating and joining room scene. Now I wanted to integrate it with my game scene. So I just wanted to know is it something that photon handles on it's own or do we have to find any alternatives for that

spring crane
#

Prematch scene should be fine

lapis vapor
#

Okay, thank you @spring crane

urban shadow
#

I did it!

#

I found a channel where they talk about Photon

#

I am so happy I could cry

#

So I have a map where players can run around and see each other. Think... Runescape. But als there are NPC cars because there's traffic.

#

I have players bumping into traffic that's local, but the traffic for the other players is not synced. So it's weird to see someone blocked by hidden obstacles or indeed plowing right through a car

#

How can I sync those objects without having someone own it using a Photon Transform View?

slim ridge
#

somebody gotta own them

#

or you have to program their behavior in a deterministic way

urban shadow
#

Can't I have a server own them?

slim ridge
#

probably, but i dont know much about photon

urban shadow
#

The people I spoke to said I probably should use photon for anything multiplayer

#

When I started, I thought I'd have to use websockets and just send the new transform props and an object ID

slim ridge
#

there are multiple photon products it depends which one you're using

urban shadow
#

Afaik only PUN is useful for what I want?

#

But I still don't know what photon does that I can't do with websockets

slim ridge
#

makes it easy and handles more cases

jade glacier
#

It handles the management of spawning/despawning over the networking and managing those objects by ID and such.

#

As well as loadbalancing, etc.

urban shadow
#

Doesn't sound too scary tbh ๐Ÿค”

jade glacier
#

You mean to write yourself?

urban shadow
#

Yeah

jade glacier
#

Go for it

urban shadow
#

Might be fun ๐Ÿ˜„

#

And might actually be good, because then I can make it so it doesn't require an "owner" by playing a prerecorded script server-side

jade glacier
#

Give it a shot

urban shadow
jade glacier
#

No idea, I never touch anything transport or lower. There are some in here who may have some ideas.

#

It is going to limit you to TCP I believe, so not sure what you long term plans are.

#

Though you should abstract whatever net lib you create from your transport anyway.

grand shard
#

Does anyone have experience with Agones?

gusty sphinx
#

Can anybody help me with getting a prefab to spawn so that it spins?
Instantiate(foodToSpawn, foodSpawnPos, foodToSpawn.transform.rotation);
gets it to spawn fine within my code, but I can't figure out how to get it to rotate

#

(not just set the rotation; I want it to constantly rotate)

gusty sphinx
#

nvm. I just wrote a separate script to do the spinning and put it on the prefabs

jade glacier
#

yeah, just make it spin OnEnable. I assume it doesn't actually need to sync that rotation

#

Don't network that, waste of data

gusty sphinx
#

I'm REALLY new. I'm not sure what "don't network that" means. haha

#

do you know how I'd make it so the rotation is relative to the world, not the object?
I'm doing:
transform.Rotate(Vector3.up, spinSpeed * Time.deltaTime);

#

but adding * Space.World doesn't work

slim ridge
#

it already is

#

Vector3.up is in world space

#

did you mean transform.up?

gusty sphinx
#

one of the objects is spinning on its own Y axis, but I turned it before placing it, so it's like rolling instead of spinning

slim ridge
#

Vector3.up = world's idea of up
transform.up = transform's idea of up in world space

gusty sphinx
#

Hmm. it's definitely not behaving that way

jade glacier
#

I would REALLY avoid doing any kind of networked game as your introduction to Unity.

gusty sphinx
#

it's not networked

#

OMG. I just realized I'm in a "networking" channel. I'm so sorry

#

My apologies. I'll head to a more general channel

slim ridge
#

๐Ÿคฃ

opaque dew
#

@rigid heron I know I'm late to the party but I would strongly discourage you from using Photon Bolt as a networking solution. It's not very intuitive, closed source, and the only features worth talking about (auth movement and hitscan rollback) are clumsy and don't work well.

#

Just trying to save you from the pain of using a solution that's honestly, speaking from experience, not great.

jade glacier
#

Bolt is a pain, but it is the ONLY full stack option of its kind.

#

Quantum will eventually replace it, but that isn't really accessible to the hobbyist.

#

Pun2, Mirror, MLAPI, Forge etc aren't complete stacks and have zero integration with simulation. You have basically write your own tick engine for them if you want to not make hot garbage.

floral turtle
#

semi-related tangent, but how well does FPS work on Quantum? I've wondered how FPS (or any precision shooters) hold up without attacker's advantage, and whether shots would miss often. Could see it being really frustrating to hit a snipe locally, then have it rolled back

jade glacier
#

You have to understand how deterministic lockstep works to get it really.

#

Everything is extrapolated rather than interpolated

#

So the player lives in the present, rather than how most state transfer systems work where the shooter lives in the future.

#

I haven't played any FPS sims with it, but I could see if you set the input lag to nothing, that the extrapolation could make the predicted enemy positions turn out to be incorrect enough to cause shots to miss. That is more a question for @gleaming prawn

floral turtle
#

yeah I get determ extrapolation, I'm mostly curious if it's something that's come up

#

though I suppose in theory you could send a "I shot a player" event to referee (along with the predicted inputs that were being used when you made the shot). Then the referee could roll back/resim with the inputs you sent and validate that the "I shot a player" event is replicated. It would change the sim from being "determistic with the same inputs" to "deterministic with the same inputs and events" or something

rigid heron
#

@opaque dew Ok, thank you, but what service would you recommend then?

prime dawn
#

I would use PUN2 for FPS games with 2-10 player per room and Mirror for MMO. The biggest problem with PUN2 is that you can't make a dedicated server for it and PUN is probably more expensive. Photon is peer to peer with cloud assistance. Mirror is server based.

#

I don't know much about the other services

gleaming prawn
#

Extrapolation for enemy players on fast-paced FPS is never really good, no matter if you use determinism or not, SPECIALLY if you have snappy, o-lag local prediction for the player character

#

In practice you require lag compensated raycasts.

hidden edge
#

hello! is it a good idea to learn C# .Net TCP/IP and UDP before diving into Unity networking? I have 0 experience in networking.

stiff ridge
#

It's never bad to know some background but if you don't intend to create a new networking layer, don't bother with UDP and TCP too much.

#

As usual: Do a first mini project and or tutorial for networking. Get a grip on how to think about it. Then you can start your project.

carmine nacelle
#

Can someone recommend on good multiplayer tutorial, I prefer p2p networking.

#

I'm getting confused everytime I start a new tutorial...

weak plinth
#

learn mirror or photon

#

photon is probably a bit more documented

#

but I think mirror is cheaper

carmine nacelle
#

wdym

#

cheaper?

weak plinth
#

if you want more than 10 players at once in photon, you have to pay

carmine nacelle
#

i mean

#

p2p

#

you don't have to pay for p2p

weak plinth
#

not sure what you mean with p2p

#

just two players?

carmine nacelle
#

peer to peer

#

you have a host

#

which is also a client

#

and the host connected to other clients

#

like in haxball

weak plinth
#

I think you still have to pay for more than 10 concurrent users

#

but not sure I'm not that experienced

#

just know some basics

#

PUN is your only complete solution for that

#

Mirror does the same thing

#

mirror does not have a relay

#

there's an asset I believe but it's more of a guy running his own thing rather than it being officially mirror

#

true

#

idk I tried mirror, didn't like it that much, but when I look at photon I don't like the prices

#

I tried making my own solution with sockets and liked that the best, but I don't know how to implement websockets etc so don't really have a good solution myself right now.

#

photon costs money but you do get things like support, hosting etc. that you don't get from open source

#

they set up a dedicated server for you or you have to run your own?

#

when I started unity 3 years ago PUN was the only thing that was basically drag and drop networking

#

I don't know the specifics but iirc it's similar to a relay server that they run, however I believe there is an option to host it yourself

carmine nacelle
#

...

#

I need something simple

#

Not going to pay

#

so p2p is the only option

weak plinth
#

yeah, the options aren't that great imo

carmine nacelle
#

I tried PUN, I got confused quickly

weak plinth
#

but that's all you have

#

PUN and Mirror

carmine nacelle
#

also sockets

weak plinth
#

yes but it also takes a lot of time to do everything yourself

carmine nacelle
#

yep

gleaming prawn
#

@carmine nacelle real-real P2P (direct connection between two machines) only works 100% of the time in a LAN...

carmine nacelle
#

I am gonna do some research

gleaming prawn
#

You can go for mirror in that case

carmine nacelle
gleaming prawn
#

If you are going to play over the internet...You need a library to help you:

  • punch through (when possible)
  • fall back to a relay service (you need to pay or host the relay servers yourself, AKA paying for them)
carmine nacelle
#

haha

gleaming prawn
#

Punch would work in about 85-89% of the times...

carmine nacelle
#

I am just learning

gleaming prawn
#

There is STEAM networking (if you plan only for Steam/PC/Mac), it does that for you (both punch and relay).... And you "only" have pay 30% of your revenue....;)

carmine nacelle
#

oh like terraria?

gleaming prawn
#

So, that's pretty much it... There's no free lunch, people don't give you server capacity/bandwidth fully for FREE

carmine nacelle
#

I will do more research and I will decide thank you.

gleaming prawn
#

oh like terraria?
Have no idea what you are talking about here... I know there's a game called Terraria

#

I will do more research and I will decide thank you.
There's more

carmine nacelle
#

I think it's steam networking

gleaming prawn
#

You should NOT come straight away just asking for P2P... It's not YOU who decide the best architecture for your game.. It's the game itself...:)

#

And game networking is a LOT more than just being able to send messages between the clients (p2p) or client and server

#

That is just the very very basics...

#

Libraries like the ones from photon (PUN, Bolt, Quantum) or Mirror, or Unreal Networking solved a lot more than just sending raw data.

carmine nacelle
#

Never said I am going to use that straight forward.

gleaming prawn
#

If you are NEW to networking, start with one of these (Mirror is free, PUN is free up to 20 players, same for Bolt)

#

Just clarifying as much as possible (sorry for the CAPS)

carmine nacelle
#

I know only sockets, so I guess I am new...

#

thanks

#

bruh

gleaming prawn
#

yw

weak plinth
#

isn't pun only up to 10ccu free?

gleaming prawn
#

20

#

or 100 for the one time payment of 95

weak plinth
#

hm weird last time I checked it said 10

#

yeah u right damn my brain must be fried or something

weak plinth
#

Is it normal that I can't run my game on my AWS free server?

#

I think it's giving me an error because it only has 1GB RAM but I'm not sure

#

idk the specs of the AWS free tier. But you shouldn't need 1gb of ram for a simple headless unity instance

#

what is headless again?

#

also it uses up to 800MB just for running windows server

#

so I only have 200MB left for my game

gleaming prawn
#

headless = unity with the rendering

#

the free tier also has very bad performance, it will NOT be enough for a realtime game IMHO.

#

But sure, go ahead...:)

jade glacier
#

Have you guys worked out how lag compensation would work with Quantum? Seems like no matter how you unwrap that it will lead to some kind of trust of the shooter's client that would have to circumvent the nature of determinism? @gleaming prawn

gleaming prawn
#

no trust on client...:)

opaque dew
#

@gleaming prawn @prime dawn @rigid heron I'd just like to mention that Mirror is not MMO ready, despite what they advertise. Don't get me wrong, I really really like Mirror. But there's performance things they need to work out first.

weak plinth
#

how does Quantum interact with middleware? or does it not use any?

gleaming prawn
#

We know that... By design it's not something would work for MMO... But that's not a problem...:)

jade glacier
#

Does the client just let all others know how far off the shooters timeframe was then? And they reconstruct somehow a best guess of what the shooter had extrapolated? Or is extrapolation reduced or removed?

opaque dew
#

Secondly, lag compensation is the easy part. Heck, I have an asset that was designed for Mirror but is more-or-less universal and it's whole job is to roll back colliders, and it works very well.

gleaming prawn
#

how does Quantum interact with middleware?
Can you be more specific?

opaque dew
#

The hard part is server auth movement.

jade glacier
#

Lag compensation is a BIG term really, and not all answers to the problem are equal.

opaque dew
#

well, most people I think mean raycast 'prediction' or rollback

gleaming prawn
#

@opaque dew about this:

but is more-or-less universal and it's whole job is to roll back colliders, and it works very well.
The problem is at what cost

opaque dew
#

like.. dirt cheap

#

I sell my assets in a bundle for $2

weak plinth
#

if I wanted to integrate some third party library or like an asset that could potentially break determinism

jade glacier
#

Without a tightly integrated simulation/controller/networking arrangement - most "lag compensation" is mostly a sloppy rewind based on something of a millsecond based guess.

gleaming prawn
#

because you need to do that for EACH separate client...:)

opaque dew
#

They're all Mirror assets though.. but as I said the logic used to rollback colliders is universal

#

yeah its a time rewind on colliders using packet travel time

#

the issue isnt that the calculation is sloppy, its fairly precise

#

the problem is that how long it takes for the attacking player to get updates from their target, not how long it takes their shot to get to the server

jade glacier
#

I've written that kind of rewind before - it was "passable" but it creates problems.

graceful zephyr
#

@weak plinth Note possible with quantum, any 'game logic' assets for unity are 100% incompatible with it

opaque dew
#

I tested mine with a 120+ ping and all the testers said it felt really good.

jade glacier
#

Ping isn't the issue so much as loss and jitter

opaque dew
#

oh well?

#

if your connection sucks don't be playing a FPS

jade glacier
#

1000 ping with stable RRT times will be perfectly accurate

#

stable RTT goes out the window on say mobile

opaque dew
#

I don't know of any FPS games that build their netcode around poor connections

jade glacier
#

Any good net stack should

opaque dew
#

but a lot of that is based on the transform interpolation

#

not the collider rollback

jade glacier
#

Tick based systems do better for that reason, time isn't loosey goosey, its quantized

opaque dew
#

tick based

#

as in?

jade glacier
#

Vanilla Pun2, Mirror and such are all time based, so they all have limitations and are very squishy

#

fixed numbered ticks

graceful zephyr
#

@opaque dew as in fixed time steps

#

that are numbered

jade glacier
#

Same answer, words in different order ๐Ÿ™‚

gleaming prawn
#

Ye, proper lag compensated raycasts need the exact number of "ticks" you need to "rollback" to

#

An that implies your whole sim is fixed-tick based (like quantum or Bolt)

#

Not sure how mirror works... so

jade glacier
#

time based

gleaming prawn
#

ye, so it's a loose lag compensation...

jade glacier
#

My SNS stuff is tick based, and I had to write an entire callback system to make it happen with Pun2 and Mirror

opaque dew
#

Okay so what you're describing doesn't at all interfere with time based rollbacks.

graceful zephyr
#

@opaque dew basing rollback on ping milliseconds = joke, nobody actually does that.

jade glacier
#

Nothing internal plays nice with simulation

gleaming prawn
#

Also what happens if the characters you are "rolling back" moved direction... Do you store the ring buffer of their transforms? etc

graceful zephyr
#

well, nobody outside hobbyists building unity games do that.

gleaming prawn
#

Bolt actually stores the ring buffer of the colliders for that...

#

Quantum we have the actual full data for that,e tc

opaque dew
#

Yes...I do

jade glacier
#

SNS runs ring buffers as well

#

It is the only answer to get past the problems with time based

opaque dew
#

It's not really a hard problem to overcome.

gleaming prawn
#

@weak plinth editor tools (like Odin inspector) are ok-ish to integrate...
Input managers like Rewired are FINE, no problem
Anything implementing gameplay (like asset store KCCs) are useless in Quantum

opaque dew
#

You just store states and move between appropriate states.

jade glacier
#

Time based is just terrible, it indicates a complete lack of understanding of how Fixed and Update should be used, and what they mean really.

opaque dew
#

again, not related

gleaming prawn
#

Anything view-only, like shaders, effects, materials, as long as they do not change anything gameplay, no problem

jade glacier
#

Internally Unity is Fixed based. Update is just for lerping... Fixed is for simulation logic.

opaque dew
#

I feel like we're talking about something completely different because fixed/regular update have absolute no affect on my rollback code

jade glacier
#

we are talking the same thing

#

Its just that a time based method is inherently very very wrong for networking

graceful zephyr
#

@opaque dew no what i mean is that nobody serious that's building high end FPS games are doing time based simulation, rollbacks, etc.

opaque dew
#

describe a time based method please

graceful zephyr
#

everyone uses discrete ticks

jade glacier
#

moving your stuff in Update(), and sending it at arbitrary ms based intervals is pure time based.

opaque dew
#

@graceful zephyr the best way is to probably rollback based on frames or an index sent from the server

#

eg: server sends a packet with id 10, client fires on 10.. server knows where to roll back to

jade glacier
#

Moving your stuff in Fixed, and sending Fixed results is tick based. Using update ONLY for lerping. That is tick based.

weak plinth
#

that makes sense, thanks

jade glacier
#

Anything involving determinism or sending inputs... fixed becomes even more of a must.

gleaming prawn
#

erver sends a packet with id 10, client fires on 10
That is a description of a tick (number) based sim

#

Not time based

opaque dew
#

@jade glacier I've seen your work and it's good work, so offense intended when I say, you're understanding the relation wrong.

jade glacier
#

I mean, feel free to correct me - but I am not seeing what I am getting wrong here atm.

opaque dew
#

how you handle your movement and all that jazz has literally no relation to collider rollback

graceful zephyr
#

yes it does lol

#

and if you think it doesnt

#

you are wrong.

opaque dew
#

no it doesn't.

jade glacier
#

You might be talking about the ability to do things off tick?

gleaming prawn
#

how you handle your movement and all that jazz has literally no relation to collider rollback
Not for the collision rollback, but it does with position correction from server (client side predictions)

#

These are ALSO tick based...:)

opaque dew
#

the only thing that matters is how you determine to rollback colliders.

#

not how to update your players movement.

jade glacier
#

which I advise against. I would round your actions like weapon fire to the nearest tick or even subdivision

graceful zephyr
#

i can, without a doubt, say that you are wrong here @opaque dew ... but w/e

#

internet arguments

#

ยฏ_(ใƒ„)_/ยฏ

#

im out

jade glacier
#

If a user fires a gun, that shot NEEDS to align with a tick or an even subdivision, or else you are in non-deterministic hell.

opaque dew
#

I think it's a misunderstanding if anything.

graceful zephyr
#

it's not

#

you're wrong

opaque dew
#

it needs to align with a frame.

#

or logged tick of some sort.

#

so yes, using fixedupdate for that makes sense.

jade glacier
#

If you are time based, that is what you do yes.

#

You log it as a specific float value (which is expensive)

gleaming prawn
#

Align-with-frame = tick based (not time based). Putting time in the equation just adds poop to the thing

opaque dew
#

the difference is solution which is universal vs one which is designed specific to a game

#

you cant drag and drop a universal solution

jade glacier
#

The point we are making is to NOT be time based, it adds huge amounts of efficiency and sanity - and removes frame rate dependency from the system.

gleaming prawn
#

No, the difference is:

  • one solution is exact and generally accepted
  • other is inexact and will give a lot of issues in edge cases (and it's been abandoned several years ago for that reason)
opaque dew
#

I never said the first solution was bad

#

Even said it was the best way to go earlier.

jade glacier
#

You can do it however you want, but you are arguing with 3 library makers who have all produced working engines, and we all abandoned time based early on, and are just explaining why.

opaque dew
#

but my point is its less about using fixed/update and more about including the server tick into the fire call.

jade glacier
#

Time-based works, its just less than ideal in nearly every way

opaque dew
#

I agree....I never said it was better. Said the problem isn't that complicated, first most, and it's not.

jade glacier
#

Sure, that is the world Mirror operates in. "Good enough"

But then someone says "how do I do server authority over player movement with client prediction"?

#

And the whole system runs into a wall.

opaque dew
#

I'm not a spokes person for mirror ๐Ÿ˜› I do make tutorials for mirror and assets but it definitely needs improvement.

#

I actually only started making tutorials for mirror because there were none at the time

jade glacier
#

Mirror, HLAPI and MLAPI STILL to this day don't have a built in transform or animator sync that work correctly - because of the difficulties involved in syncing time based.

opaque dew
#

How do you feel about Smooth Sync ๐Ÿ˜„

jade glacier
#

It is flawed in its approach, but it does gloss over the problem better

#

It just goes all rubberbandy and operates outside of any timing system

#

So it will look smooth, but add an animator sync... and the two will be in massive disagreement on timing

opaque dew
#

I see what your problem is now...

#

You have unrealistic expectations from the asset store ๐Ÿ˜„

#

Networking code can never be perfect and be a 1-size-fits-all solution.

jade glacier
#

I mean, I made a sync that does this... and its on the store.

#

So I am not talking out of my ass here.

opaque dew
#

does yours work with mirror or anything I throw it into?

gleaming prawn
#

There's a difference between one-size-fits-all unrealistic expectations VS plainly bad/wrong

jade glacier
#

I don't officially support Mirror because the keep making breaking changes, but yes it runs on Mirror currently.

gleaming prawn
#

smoothing animations is just throwing the dust under the carpet...

opaque dew
#

Would you mind throwing me a copy of the package(not a voucher) so I may test it out?

gleaming prawn
#

Really does not server anything serious

opaque dew
#

before you answer..

jade glacier
#

I've hit my limit for the year, they only give 12

#

or whatever it was

opaque dew
#

just the package as a unitypackage

jade glacier
#

The pun version BETA is free though

opaque dew
jade glacier
#

But nothing to see really, its just an execution of what we are talking about

opaque dew
#

I understand. I just want to see how it holds up.

jade glacier
#

I don't want Mirror users so I don't want to advertise it as supporting mirror

opaque dew
#

okay, well I'm not remaking the video haha

#

I just want to run it to see how it compares

#

your inspector looks well made though, kudos to that

jade glacier
#

I work for Exit now, so what I am developing are extensions for Pun2 based on a tick timing system. Mirror/MLAPI support is just there for existing users so I don't bone them - but I really want the asset to die.

opaque dew
#

yeah, I understand that.

#

I've pitched several improvements and they usually get passed by.

gleaming prawn
#

I did not know SNS worked with Mirror as well @jade glacier that's nice

jade glacier
#

yeah and MLAPI and Pun2

#

Mirror support is and was hell though, those guys make breaking changes like no one else I have ever seen.

opaque dew
#

one of the main reasons I had to make my mirror tutorials for supporters only

#

spent more time fixing tutorials than making new ones

jade glacier
#

Making a video can't be fun, breaking changes are a real problem for video

opaque dew
#

was a time drain

#

I also really really enjoy PUN2, I won't recommend Bolt though.

#

It's workflow is awful everything.

jade glacier
#

That is pretty much why I want to Tobi and asked if they would be interested in me working exclusively with Pun. They NEVER broke anything on me. And when Tobi did once he messaged me letting me know, and when I suggested how his change could avoid a break he happily made that change. Zero headaches supporting Pun2.

opaque dew
#

yeah my tutorials from years ago are still valid

#

it's nice

jade glacier
#

Mirror team, they usually just would tell me how stupid I was for doing things like bitpacking, or wanting to send my own events rather than using their RPCs, etc.

opaque dew
#

I've been looking for a nice networking solution to make tutorials on but there would currently have to be a lack of tutorials

gleaming prawn
#

I won't recommend Bolt though.
It's still the only complete one, by far

#

for client-server, state transfer on Unity

opaque dew
#

@gleaming prawn yeah but..Id rather write those systems myself than use bolt.

jade glacier
#

Bolt is restrictive, but for a reason. It has a tight integration of Tick/Simulation/Controller that is needed for server auth to "just work"

opaque dew
#

I had to use bolt for a paid job and it slowed down development soooooo much

gleaming prawn
#

That's odd

#

in general it speeds up because you do not have to write it yourself

#

Which would take you 2 man/years to complete (assuming an excellent programmer)

opaque dew
#

I guess....far as frameworks go it was hard to work with.

gleaming prawn
#

Looks more like a case of not having been on the other side, so you think the grass is greener

jade glacier
#

If you are trying to make something outside of what it wants to be it can really be a headache. And the compile workflow and such can be cumbersome, but that is the price of getting codegen - which brings speed.