#archived-networking

1 messages Β· Page 71 of 1

sullen steppe
#

if i try to send an RPC from Player A

#

that says "Player B took 10 damage"

#

it literally won't work?

#

or it's a bad idea

jade glacier
#

If the hit is happening, then yes your previously posted code will work. As long as the health change is coming from the OWNER of the health object

#

You can do that too sure

#

if you want to bake in the critical hits and such. Wide open for hacking with all of this, but that is the nature of client auth

sullen steppe
#

right i see

jade glacier
#

PUN2 without server plugins should only be used for games where you aren't expecting or inviting hackers

sullen steppe
#

okay yeah i was just trying to distinguish the actual mechanics

#

from like

#

best practice

#

for now this is really just a hobby game

jade glacier
#

The main thing is to establish ownership

#

and work backwards from that

sullen steppe
#

so im not too too worried about it

jade glacier
#

The shooter has authority over its weapon and its own health

sullen steppe
#

ah okay

jade glacier
#

The person being shot has authority over their health

sullen steppe
#

and i have to design my code around that

jade glacier
#

so the conversation is A tells B "I hit you"

sullen steppe
#

around what a player can say

jade glacier
#

B tells all "I took damage"

sullen steppe
#

i see

#

right right that's like the architecture

jade glacier
#

A telling all that B has a new health value... will be fragile

sullen steppe
#

i was conflating the like actual API with what you were suggesting as structure

jade glacier
#

because now you have both A and B acting as authority over B's health... so avoid that

sullen steppe
#

i see

#

so i have like

jade glacier
#

That being said, you can cheat some of this for prediction purposes

#

down the line

sullen steppe
jade glacier
#

Rather than see a weird delay between the shot and the players health dropping on other players, you can have other clients lower the health in expectation that B is going to report that change

#

As long as if that prediction is wrong it doesn't break anything

#

and is just cosmetic

sullen steppe
#

so i can pass i hit you here with this weapon

jade glacier
#

yeah, perfectly valid

#

I personally pass a list of hit objectIDs along with a mask for HitGroups (head, body, critical etc)

#

Its all bitpacked for my stuff, so I can get pretty verbose

sullen steppe
#

so

jade glacier
#

Typically for games you favor the shooter, so recreating the shot on the health owner will lead to annoying results for the shooter.

#

So best for client auth, to just take the shooter at its word

sullen steppe
#

RPCs generally look like this:
<photonViewToCallMethodOn>.RPC(<method name>, <args>)

#

or sorry there's another param which is like <which clients>

#

so when the shooter reports a hti

jade glacier
#

You are welcome to peek at the SNS code, it handles all of this but in a much more deterministic manner

sullen steppe
#

it calls an RPC on itself?

jade glacier
#

The demo scene and tutorial has hitscan and projectile weapons and health systems

sullen steppe
#

like what object is the "PlayerHit" thing come from

#

what's SNS?

jade glacier
#

Its the extension library I am contracted by Exit to make for PUN2

sullen steppe
#

oh nice

jade glacier
#

Is Beta, so not pushing it on anyone, but it does exist and it addresses a lot of this kind of stuff.

sullen steppe
#

cool i'll take a look

tribal vessel
#

C# program on server to talk to clients(process/validate user actions), and to talk to SQL also on server (store player-state data). Is there a name for this kind of program (looking for search terms to do additional research)? Follow-up question: can such a c# program access/use the Unity API (like say.. Vector3) if I DON’T build it with Unity, but with visual studio as a system β€œservice” program?

prisma girder
#

Unity is more of an ABI than API. It's not externally accessible by default, you need code in linked assemblies to be able to access functions and data.

#

You can of course write your own API in Unity that can talk to external programs

sacred patrol
graceful zephyr
#

UnsafeUtility.Free

sacred patrol
#

Oh roite. I was looking for a line like that in the code.

graceful zephyr
#

this is just a small example

#

out of a larger thing

#

it might not have all methods etc

sacred patrol
#

it might not have all methods etc
Yeah this is why I was wondering like "where's IDisposable implementation or something"

jade glacier
#

I think FSE_Vince has a pretty complete library available

#

I have a couple as well, if you catch the bitpacking bug @sacred patrol

tribal vessel
#

@prisma girder "you need code in linked assemblies to be able to access functions and data." Right.. so even if I reference these in a non-unity project, I will NOT be able to use them? (this DOES work when I generate DLL's.. course I've only used those dlls in unity so far.)

jade glacier
#

The unsafe stuff won't get you great gains unless you are doing a a pretty long set of bitpushing wrte/read ops, but if you are doing a lot (like serializing your entire state in one shot) or if you are running IL2CPP - unsafe bitpacking definitely is faster.

sacred patrol
#

I have a couple as well, if you catch the bitpacking bug @sacred patrol
Haha, thanks but I'm not that much into hardcore optimizations yet. Just using a good ol' sloppy [Flags] enum and a built-in Photon serializer got me far enough.

jade glacier
#

The pinning cost for small writes negates your gains from the testing FSE_Vincenzo and I did on our libraries.

#

Just ping me in the channel if comes to that, I can look up his libs and link mine

#

I learned all of this from a lib fholm made public like 4 years ago when I asked him if he knew of any good bitpacking libs. So everything comes back to him πŸ™‚

#

Some of my code still has has MIT header and credit on it.

sacred patrol
#

Alroite

sullen steppe
#

I'm like doing something very wrong

#
 void Update()
    {
        if (photonView.IsMine)
        {
            if (Input.GetButtonDown("Fire1"))
            {
                Debug.Log("I am shooting");
                photonView.RPC("Shoot", RpcTarget.All);
            }
        }
        
    }
#

when i have two players

#

and i click

#

the other player shoots

jade glacier
#

Ignoring the wrong part of that being that you are capturing what is a state/simulation operation in Update rather than Fixed, that looks right on the surface.

#

What object is that one? and in what Class?

sullen steppe
#

this is in a "ShootingController" class attached to the player prefab

#
   [PunRPC]
    void Shoot()
    {
        Debug.Log(transform.name + " is shooting");
        AudioSource.PlayClipAtPoint(tempRevolverShot, transform.position);
        if (photonView.IsMine)
        {
            RaycastHit _hit;
            if (
                Physics.Raycast(
                    fpsCam.transform.position,
                    fpsCam.transform.forward,
                    out _hit,
                    equippedWeapon.range,
                    shootableMask
                )
            )
            {
                Debug.Log("We hit " + _hit.collider.name);
                string hitTag = _hit.collider.tag;
                Transform hitTransform = _hit.transform;
                bool hitPlayer = hitTag == "PlayerHead" || hitTag == "PlayerBody" || hitTag == "PlayerLegs";
                if (hitPlayer)
                {
                    PhotonView photonView = PhotonView.Get(_hit.transform.gameObject);
                    photonView.RPC("RpcGetHit", RpcTarget.All, equippedWeapon, hitTag);
                }
            }
        }
    }
#

the idea i had here is that

#

it should tell everyone that it shot

#

so they can all play the audio

#

and then in another IsMine block

jade glacier
#

Very fast glance I see a problem with that IsMine check in your RPC

sullen steppe
#

it'll do the raytrace and potentially sned out the "GetHit" RPC

#

i'm treting IsMine like isLocalPlayer in UNet which ihad sort of working before switching to proton

jade glacier
#

Without the wall of code, what are you doing here?

sullen steppe
#

okay so here's what I'm trying to do

jade glacier
#

Why is your raycast inside of the RPC body?

#

that body is meant to execute remotely

sullen steppe
#

i guess i thought that the RPC would execute on every client right?

#

including the one it orginated on?

jade glacier
#

That I don't know. I literally don't use RPCs

#

I would check that assumption

#

and see if it does fire, is it delayed by the trip to the server and back

sullen steppe
#

"Call a RPC method of this GameObject on remote clients of this room (or on all, including this client)."

jade glacier
#

But typically that shot call would be done locally by the owner, not in the remote code.

#

You fire locally, get the result, then RPC out the result.

sullen steppe
#

right

#

okay i'm changing the RPC to just a normal method call

#

i deal with the audio later

jade glacier
#

having it in the body, I cant comment. That is odd.

sullen steppe
#

moving is also

#

like flipped

#

well

#

here's the weird thing

#

when i'm alone

#

like only one client on the server

#

i can move fine

#

then if someone else joins i start controlling them

#

πŸ€¦β€β™‚οΈ

jade glacier
#

You got bugs yeah

sullen steppe
#

i'm like not grok'ing something

jade glacier
#

I'm mobile now going for a walk

sullen steppe
#

sure no problem ty for all your help i really appreciate ti

jade glacier
#

Litter debug all through it

#

Assume nothing, check every step

sullen steppe
#

oh wait it's working again and i don't know why

#

classic

amber trench
#

@tribal vessel maybe take a look at magiconion or asp net core generally?

tribal vessel
#

<- reading Magic Onion "What is it?" docs for the third time, lol/cry.

amber trench
#

lol

#

it is written by an ESL speaker yes

tribal vessel
#

best line from docs so far: "Here is the sample filters, you can imagine what you can do." lol.. but seriously, this looks great!

faint goblet
#

i asked this on another section thingy and there was anothere problem going on. Then i relized this is the proper place to put it. So is there an easy way to pass a Vector3 threw unitys networking?

burnt axle
#

@faint goblet You mean UNET? If so, you can use the networked transform component from the UNET package or serialize it with UNET's message API in scripting. Do you know UNET is deprecated?

jade glacier
#

yeah, be sure to indicate Netcode vs UNet when talking about built in networking

faint goblet
#

oh thanks

untold sentinel
#

Hey guys should I use Mirror for my unity game? Ive been trying it out and I think I'm getting the hang of all this command and clientrpc stuff, but is it the best option? I'm new to multiplayer.

#

@sullen steppe you can fix controlling other clients by checking if local player on the movement script and disabling it if it isn't the local player

#

Or checking hasAuthority might be better actually.

graceful zephyr
#

@untold sentinel mirror is fine if you are starting out, it's not the best but has a lot of documentation and an active community

jade glacier
#

@hallow fractal Here would be ideal

hallow fractal
#

@jade glacier here we meet πŸ˜…

#

Ok, wait i have to include you asset because i removed it, than i tell you where im stuck

jade glacier
#

So my capacity to really dig into stuff is a bit limited right now, since I have a pile of dev work to get done for Exit, but we should be able to figure out where you are going off the rails

#

Can hold off on using SNS

#

Would be fine to just try to figure out what was going wrong with Vanilla PUN, to find the bug in your code or setup

#

Basically step one is to back things up until you can get things spawning correctly, before adding any extra code/components

hallow fractal
#

Yeah, im at that point now, i mean now i will include your asset again in my project that tell you when the issue appears

jade glacier
#

So right now you can have 4 players join, and all 4 show up correctly?

hallow fractal
#

Without your asset yeah, everything does work, just let me test it again to be sure 100%

#

@jade glacier yes i tested with 6 players

#

It works

jade glacier
#

great, so right now there isn't any kind of controller code in place?

#

or there is?

hallow fractal
#

Ony the players controller

jade glacier
#

Almost all issues tend to result from controllers that are fighting with the syncs

#

So next step is to add a transform sync, TransformView or my SyncTransform

#

Have the editor be the last player to join, so you an see in the inspector where all of the players are, and what their transforms are doing

hallow fractal
#

Soo i show you the video i made before if you remember

#

Just to see the problem i had

jade glacier
#

Yeah, things go sideways, we have to dig into what the conflict is

#

If adding a transform sync makes them vanish, remove the controller code but leave the transform sync

#

We are trying to isolate down to where the conflict is. The most likely candidate is the controller is fighting with the syncs on players that don't have IsMine

hallow fractal
#

Yeah alright, just have to include you asset, than tell you when im ready

jade glacier
#

Does it break with TransformView as well?

#

Can just use that for now if so

hallow fractal
#

Wait, i have to try

jade glacier
#

An issue in that video if I recall is you seemed to have both SyncAnimator mixed with PhotonTransformView. So trying to avoid any weird mess like that yet.

hallow fractal
#

soo imported the project

#

getting this now, i know i had this before but forgot how to slove it

#

Assets/emotitron/SimpleNetworkSync/Assistants/Editor/LauncherAssists.cs(43,18): error CS1061: Type Photon.Pun.UtilityScripts.OnJoinedInstantiate' does not contain a definition for AddPrefabToList' and no extension method AddPrefabToList' of type Photon.Pun.UtilityScripts.OnJoinedInstantiate' could be found. Are you missing an assembly reference?

#

@jade glacier soo should i remove this line from the code?

#

i have already a instantiate script

jade glacier
#

I am recalling that as well, forgot the conflict there, let me look

#

Yeah,that is just an assist - its not critical. Not sure why the conflict but will fix that if I already haven't

hallow fractal
#

so i remove the line ok

jade glacier
#

yeah, won't affect this.

#

The latest PUN2 had some changes to OnJoinedInstantiate so I need to sync up for that is all.

hallow fractal
#

soo ok, now i imported the project, i havent done anything yet

jade glacier
#

No errors in the log now?

hallow fractal
#

no

#

btw, does my character need a rigitbody?

jade glacier
#

Shouldn't, the sync accounts for that

hallow fractal
#

ok, i have a character controller, i heard its better for leg

jade glacier
#

Basically the sync leaves the object RB as is if IsMine is true, otherwise it turns it into kinematic

#

CCs often use an RB that is kinematic

#

shouldn't matter

#

the sync is just capturing the tranform state every tick on the owner, and broadcasting that over the network. All non-owner versions are turned to kinematic if they have an RB, and they are moved by their transform.

#

So what your RB setup is and how you move it shouldn't matter

#

So first thing now is put a sync transform on the root of the player object where the PV is.

#

See if that breaks things

hallow fractal
#

so this is now at my character inspector

#

just to show you

jade glacier
#

there are a lot of controller looking things on there

hallow fractal
#

only the character controller is waht i need

#

i disabled the others, just to be sure

jade glacier
#

might want to add AutoOwnerComponentEnable

#

Will auto disable a bunch of that without you having to go in by hand and add IsMine to everything

hallow fractal
#

soo i converted my character to player

jade glacier
#

Yours will be a bit different since that beta is older, but it should create a list of unrecognized components, that you can tell to auto enable/disable based on ownership

#

take off the sync animator

#

lets go a couple components at a time

#

adding too much stuff at once makes debugging futile

#

You can try that for giggles since you just did it

hallow fractal
#

alright

jade glacier
#

Give that a shot and see how it breaks or doesn't break

hallow fractal
#

ok

#

yes it happend again

#

when i joined with the player 5

jade glacier
#

yeah, you have a wall of components there which is a rough place to start testing networking

hallow fractal
#

let me log in now hrough the builder

jade glacier
#

I can't debug all of it without your project in front of me, but I would back WAY up with this and get rid of all of those components.

#

You have like 8 components on that player already that were added before you had networking working - so you have a large pile of sand to dig through.

#

For networking you need to get the networking lib in place first, and then slowly start building up your code, testing every step of the way.

#

So I would back up first to just a basic movement controller on your player, and trying to spawn/sync that.

hallow fractal
#

hmm something weird is happening, now i joined the room through the console and it worked, i mean i can see the other players, but the 5 player that didnt work before that coulnt see no one now its seeing only the one that joined from the console/editor

jade glacier
#

Backing up on that, did you join last with the editor?

hallow fractal
#

yes

jade glacier
#

Did the editor show all players present?

hallow fractal
#

yes, it do

#

well i have some errors

#

wait i show

jade glacier
#

Errors are helpful yeah

hallow fractal
#

but i think these errors have nothing to do with my issue

jade glacier
#

Errors have to go

hallow fractal
#

all errors are for the ui

#

Object reference not set to an instance of an object
emotitron.Networking.VitalUI.LateUpdate () (at Assets/emotitron/SimpleNetworkSync/SyncVitals/UI/VitalUI.cs:184)

jade glacier
#

errors mean code didn't execute and that can do all kinds of messed up things

hallow fractal
#

these are for the armor and health, i dont need them

jade glacier
#

Just remove the Vitals stuff

hallow fractal
#

ok, soo it means i have no error

jade glacier
#

At this point we just want your movement code, and a transform sync

hallow fractal
#

ok,, now i will have to remove everythink, i mean these components

#

and try again

jade glacier
#

which of those controller components actually matter? You have like 3 of them

hallow fractal
#

only the character controller

jade glacier
#

Get rid of everything, you are putting yourself in debugging hell with all of that on there

hallow fractal
#

soo removed these also the ui ones

jade glacier
#

lose sync state for now, lose mounts for now. I wouldn't do the whole ConvertToPlayer assist thing yet until you debug this conflict

hallow fractal
#

the player movement controller if for mobile

jade glacier
#

Just your original player, with the most basic controller... and add SyncTransform

hallow fractal
#

ok

#

should i try now

jade glacier
#

Still not thrilled with all of those controller components (3 total), but sure give it a shot

#

May still need/want to add the AutoOwnerComponentEnable if your scripts aren't all wired up with IsMine checks.

#

Join with the editor last, look for warnings, and check the transform values of players that seem to be not where they should be.

hallow fractal
#

ok, soo when i joined with 5 it worked, but than the sixs one that joined it didnt work, than i joined through the editor and it didnt show other player,,,,

#

but this errror is showing up

#

No Object found for viewID 3001.
It is not unsual with PUN2 for messages sometimes to arrive before their target gameobject is ready at startup.
UnityEngine.Debug:LogWarning(Object)

jade glacier
#

over and over, or just a few times?

hallow fractal
#

it wont stop, i mean the error is just repeating

jade glacier
#

How large is your project? That might indicate an legit bug I should open up your project in that state.

hallow fractal
#

should i send it to you?

jade glacier
#

No previous warnings or errors?

hallow fractal
#

no

jade glacier
#

That indicates a failure to spawn the object

hallow fractal
#

its a small project,

jade glacier
#

Yeah, export a package if you would for me

hallow fractal
#

its the same message

#

ok, i upload and send it over

jade glacier
#

So in the editor, none of the players show up as spawned in the hierarchy?

hallow fractal
#

no

jade glacier
#

Yeah, going to be easier for me to open the project and see than try to guess.

#

Failure to spawn is typically a PUN thing, so for SNS to somehow cause that... worth looking into.

#

How are you sending it?

hallow fractal
#

wia megaupload, its the best

jade glacier
#

pm me the link when its up

#

Which Unity version?

hallow fractal
#

2018.3

#

Im afraid to update, see too many people are having issues after updating

jade glacier
#

I only have 2018.4f for that, but shouldn't matter.

hallow fractal
#

When this works im gonna name a npc after you πŸ˜‚

jade glacier
#

It will eventually work, you aren't doing anything exotic here

#

just have to sort out what this bug is

#

I still need a link btw

hallow fractal
#

Sure, just putting into rar and than upload

jade glacier
#

The exports from unity should be packed already

#

Did you just do that?

hallow fractal
#

Oh, im sending the whole project

jade glacier
#

yeah, please dont LOL

hallow fractal
#

Alright, i usually do this with friends ahah

jade glacier
#

If you do that, just share a git - otherwise just export a package

#

if its small enough, can just drag it into a PM here

#

Uncheck all textures and sounds, I don't need any of those

hallow fractal
#

its 73 mb

#

just uploading

jade glacier
#

will take a few mins to rebuild. Will let you know if I can reproduce the error.

hallow fractal
#

alright πŸ™‚

jade glacier
#

In the meantime if you want to try stuff, try removing all controller code and see if just the sync on your object results in any issues.

#

Things fall apart at 6 players you said?

hallow fractal
#

sometimes at player 5 or 6

#

its not everytime the same

jade glacier
#

This version of PUN looks old btw

#

that was the error with OnJoinedInstantiate

hallow fractal
#

old?

jade glacier
#

outdated

#

not current LOL

hallow fractal
#

just opened the asset store, its dosent show any update

jade glacier
#

very odd, because this OnJoinedInstantiate component is definitely old

hallow fractal
#

will i have error now when i import the new?

jade glacier
#

No idea. You have a lot of assets in this project already, so you already have a pretty messy stew of stuff. The log is like 100 lines of warnings when I opened your project.

#

So you are really not in a great starting place to begin networking. πŸ˜•

#

But I would get the current PUN before getting too far, there will be bug fixes and such that you might end up dancing around needlessly with an older one.

#

I can't even get my demo scene in this project to connect, so not sure what is up.

#

Be sure to delete the old folder, and import the latest PUN2 Free (unless you paid) in clean

#

I'm trying that now with your project

hallow fractal
#

i imported the new one, and build the game, its works, i mean its again the same issue,, all the ones that i opened through the build do work good with each other, but when i joined through the editor i coulnt see the other players in the room

jade glacier
#

yeah, working on recreating that here - first have to get even my demo scene working and sort out why my builds aren't connecting from this project

hallow fractal
#

well, now i notice one of the ones i opened through build its the same like in editor one

jade glacier
#

If the editor is showing player objects as having not been created, there is something serious going wrong

#

If they are there, but in wrong places or have messed up scaling, that is a different issue

#

Until I get a working repo happening here, I can't even guess

hallow fractal
#

this error still shows up

#

No Object found for viewID 4001.
It is not unsual with PUN2 for messages sometimes to arrive before their target gameobject is ready at startup.
UnityEngine.Debug:LogWarning(Object)

#

but the nr like 4001 changes

#

2001, 6001 and so on

#

open the build like 5 times, and than join through the editor, you will see

#

the player setup error hase nothing to do with it, it shows becuase i removed the components

jade glacier
#

yeah, that indicates an object has not been spawned

#

I got my test scene working, so where is our scene?

hallow fractal
#

?

#

can you make the game run?

jade glacier
#

I got my demo scene working in that project to make sure things are firing right, now need to try your scene

hallow fractal
#

ahhh

#

thought you tryed that already

#

in the scene folder are the ones

jade glacier
#

Nope, still trying to untangle why this project after import is having so much trouble

#

first step was updating PUN2

#

Firewall is being weird with this project. Will poke at it more a little later.

hallow fractal
#

hmm? you build it, i mean did you reproduce the same issue that i did?

jade glacier
#

Other issues to resolve first

hallow fractal
#

alright :/

#

what do you suspect the issue can be?

jade glacier
#

No idea, I haven't gotten to it yet - have to first resolve why this imported project is getting blocked by my firewall

hallow fractal
#

just to note, i am using only 2 assets on that project, BattlePhaze and AllInOneGameKitELC

jade glacier
#

So where is your scene that I need to build and run?

hallow fractal
#

at the scene folder

#

there are 2

jade glacier
#

Lobby and GameScene both needed?

hallow fractal
#

one for the lobby and than the game scene

jade glacier
#

That transition is suspect for getting started

hallow fractal
#

really? but most if not all games do use multy scenes

jade glacier
#

Second client trying to join room is just hanging at trying to join

#

First client seems frozen

hallow fractal
#

ohh i know

#

you need t go to the gamescene and put my character prefab at the game manager

#

it happens alot, never know why

#

this character from the resources : Player character contro

jade glacier
#

You are creating the players characters before being connected to the Room?

#

Or is it spawning those after the scene change or something?

hallow fractal
#

hh?? i cant follow you,,, in my game scene i have a instantiate script, than put my character from the resources on it

#

can you join the game?

jade glacier
#

I am recreating the issue, but there is a wall of other issues I have to parse through first.

hallow fractal
#

Do the other issue have something to do with my project or are these from your asset site?

jade glacier
#

Are you using buffered RPCs or anything like that in this project?

hallow fractal
#

I think i have one at the shooting script

#

You mean these that are used laser's

jade glacier
#

Its just slow trying to test things because the process of getting 5 players connected takes 2 minutes of having to type in names and click buttons

#

I would suggest for network testing to remove this whole lobby thing and add that later

hallow fractal
#

Dont know how to change that, you saw on that video i posted, it was really fast

jade glacier
hallow fractal
#

Ohh alright, you can do this if its easier

jade glacier
#

Then you just run it, and it will create a room and spawn players for you without all of the clicking around

#

You will go mad trying to debug networking if every test takes 5 minutes

hallow fractal
#

I thought code changing is needed

jade glacier
#

You have to break thigs into small bits for networking

hallow fractal
#

Yeaa, i really had problems with that

#

But than i got used to it

jade glacier
#

you literally will spend a month on this stuff if you don't streamline how you iterate

#

Networking is 90% of the time broken

#

and is already slow to test because of the need to build out

#

so anything you can do to shorten the test cycle is good

hallow fractal
#

I really never thought if it, but this can only been done with that one script of yours that you showed

jade glacier
#

I would start there, and just get your players spawning and moving right

#

Then replace the prototyping stuff with your more advance systems for matchmaking and such once you are happy with your mehanics

#

As you are seeing, stuff that should have been resolved in hours is taking you weeks here

#

Too many moving parts in play at one time

hallow fractal
#

I will make this in the future projects, but you need to know that i only noticed this problem after i played with my cousin, he told me that the animation like attack are not sync, and than it was too late to simplify the project for testing,

#

I would never thought that animation would be my biggest issue

#

I watched soo many tutorials, and followed them

#

Until i got across your asset

jade glacier
#

There may be a bug in the asset, but I can't get to that until I get this cleaned up and iterating tests quickly.

#

I would nuke all of the shaders and such too during testing

hallow fractal
#

This is a issue that you also didn't came across

#

Everything fine?

jade glacier
#

Will let you know, I have to tear the scene apart and strip this down to something that can tell me something.

#

All I can say so far is you have WAY too much complexity going on here for the level of testing we are doing.

#

But that isn't the cause, it just makes finding the cause very hard.

hallow fractal
#

You can delete these if you can, everything except the character itself πŸ˜…

jade glacier
#

already doing all of that. I have the scene auto launching and spawning players, and I have removed all of the controllers.

#

And moved the camera so its easier to see instantly if other players are all showing up

#

The editor is having issues, but so far the builds are all seeing one another.

hallow fractal
#

How many builds have you opened?

#

The issue shows at player 5 and above

jade glacier
#

there is some odd behavior of the charaters showing only after the next client opens

hallow fractal
#

After the second you say? What kind of behavior, not the issue right?

jade glacier
#

Editor is having the usual PUN region issue of finding a different region, but resolving that

hallow fractal
#

I only did for Europe,

jade glacier
#

I'll just get back to you with my conclusion when I have one

hallow fractal
#

Alright than, hope everything will go well :/

jade glacier
#

removing all of the lobby code, and all of the controllers and other stuff from the player objects and just sticking on the animator sync and a transform sync... everything spawns correctly.

#

The editor gives a dozen or so warnings about updates arriving before object spawn, but they don't keep coming. The spawns happen and its all correct.

#

in your MobileFPSGameManager that timing for spawning characters is suspect

#

Typically I would put character spawn in OnJoinedRoom.... Not in a Start() method

#

May or may not be related, but there is a lot of headscratchy stuff like that all throughout

hallow fractal
#

Soo what was the issue?

#

I mean you removed almost everything, so somewhere must be the issue

slim ridge
#

add them back one at a time until you notice πŸ˜„

hallow fractal
#

I hope it isn't something that can change my project

jade glacier
#

yeah, that is kind of the problem with having so many moving parts

#

My guess is as good as yours without going through the task of slowly adding them back and seeing when it goes off the rails.

hallow fractal
#

Are you still looking for the issue?

jade glacier
#

As best I can

#

I only have so many hours I can put into this though, I have work slated to get done this weekend

hallow fractal
#

Ahh, I thought if not, so that you could send me the package so i can continue

jade glacier
#

If I don't find it, you will either have to give up on the components involved, or go through this process yourself of slowly adding things to a working starting point

#

yeah, I can export it

hallow fractal
#

Alright, than i can add stuff back till the issue appears

jade glacier
#

I just put everything back onto the player object and its spawning on all clients and the editor

#

so looking more like an issue with the whole lobby/room handoff/spawning mechanism, or how and where you are spawning.

hallow fractal
#

☹️,,, stupid bug

jade glacier
#

I did just see a player fall through the floor, so that isn't good

hallow fractal
#

Really?? Never happened to me

#

Can i ask you something different from your asset?

jade glacier
#

A bunch of things got lost in the export, so anything is possible

#

I am not concerned with any of that, I just want to see that all of the objects are spawning

#

and they are

hallow fractal
#

So the reason why im looking to make this work is making my animation sync over net

#

Can you export it differently?,

jade glacier
#

It has all the lost tags and such, but they don't matter for this

#

I stirpped out all textures and shaders as well

#

long build times are bad when doing networking tests.

hallow fractal
#

Can you export the whole folder project?

#

Like i wanted to do in the beginning

jade glacier
#

nope

hallow fractal
#

So how did you open the one i send you? Just made a new project and that import it?

jade glacier
#

just imported it

#

you can drag them right into unity

hallow fractal
#

In a new project right

#

Because i never did this

jade glacier
#

yeah, in this case use a new project

hallow fractal
#

Alright

jade glacier
#

this isn't meant to be a working game, this is to find the problem

#

strip out all garbage

#

cosmetics, whatever else

hallow fractal
#

Soo this now works

jade glacier
#

you want fast fast fast build times and scenes that start up showing you what you need to see without having to enter a bunch of text and click a bunch of buttons in the game

#

It works because its using the prototyping launcher atm

#

Or at least is working for me.

hallow fractal
#

Alright than, you can pm me the package back and i hope i can find the issue

left ruin
#

Which is more affective?
Photon, or Mirror?

slim ridge
#

depends on what it's doing.

jade glacier
#

Keep in mind Photon is actually 3 different libraries, but I assume you mean Pun vs Mirror?

#

Pun is cloud relay based, and Mirror is Unity exe server based.

#

Pun hosting is handled for you, with the downside being you have no server authority unless you write plugins for it. Mirror you need to host a server, or do some work to allow players to host, but you have control of the server and it can simulate normally, as it is a Unity exe.

sacred patrol
#

Which is more affective?
Photon, or Mirror?
@left ruin TL;DR: Mirror for flexibility and control, Photon for just getting stuff done.

#

Personal experience: I was recently writing netcode for a pretty big title using UNet, and I can't recommend it or any derivatives based on that library.

#

I still have PTSD from all the reflection hacks I had to write in order to make it work the way employers expect. They had a strict technical vision and their own way to do things. I had to adapt.

jade glacier
#

Once you advance with any library you will want to get away from the wrappers they provide and go right to the byte[] serialization and send/rcv of.

#

Pun and Mirror are both incomplete stacks, they get you messaging wrappers like RPCs and handle things like ownership and object IDs, but they both don't touch simulation or even encourage good practices when it comes to syncing simulations.

#

Unet/Mirror does use weaving at least with their RPCs and Syncvars to avoid runtime reflection

#

But it does create a lot of "blackbox" where stuff magically happens without really giving the new to networking dev any kind of clue what they are doing behind the scenes.

#

And they are all adhoc timing, encouraging treating messages as simulation - which always devolves in to tangled race conditions late in the production of any game.

nimble eagle
#

I have an odd issue; (I'm using Photon PUN II)

So, I've had Photon PUN set up in my game for a while now. (The intent of the game is to put everyone in the same big room.). A weird glitch has been happening: Sometimes, some players join one randomly created room, and then another player can't find that room. It's hit or miss when it happens: Normally, a lot of people can join the rooms, but one person is "Locked out", it won't appear for that person at all, even if they shut the game down and re-open it. The only way to make the glitch go away is when ALL open rooms for the game close, it re-cycles things somehow. It's not like room limit or size is hit; It's just like one person randomly can't access a Photon-created room, it won't appear or show for them at all.

When this glitch happens, one person can't get into the room no matter what they do; The room doesn't appear in the lobby at all.

#

I'm having a lot of trouble reliably reproducing the issue too: But it still happens pretty often, and it's an issue when people are getting locked out of the game's main "room", and can't join other people, and no one can join them 😦

#

To the right, I have another "player" already in a room they made normally (I checked and they were int he default lobby when they made it). On the left, I am trying to show a listing of all the rooms: But in my editor version of the game, the room the other player is in just won't show up during this run! Also, even if this player in the editor tries to make a room, no one can find or join them!

#

Even stranger, in this second issue above (Same run, the game on the right is the same one open earlier), in this second image on the left, I have another executable for the game open: And the room shows up!

#

The issue is this: The room will show up every time when I pull up this second executable window, but it will never show the room in my in-editor window until I close all in-game rooms and try anew!

#

The issue isn't editor specific: Most of the time, the editor works fine and finds rooms, and so does the executable. But when this glitch happens, it can happen either in the editor, or on the executable on a player's computer: And when it does, there is NO way for the open rooms to show for them until all rooms shut down; It's like they are locked out somehow, even though they are all in the same lobby and have access to the same stuff!

#

I'm totally stumped with this... does anyone have any ideas? I would greatly appreciate any help you can give! πŸ˜…

lunar nexus
#

Hi, I had a problem with photon here is my error thank you for helping me

jade glacier
#

The latest PUN added Dev Region to settings, to force a region in the editor and all development builds. Or you can set the fixed region. Either will ensure that all players are using the same region. @nimble eagle

nimble eagle
#

@jade glacier OMG, that totally fixed it! You're the best, thanks so much!!

#

This issue was driving me crazy πŸ˜…

jade glacier
#

It's a common problem. Are you running the latest PUN2 btw?

nimble eagle
#

I am not! But my version includes the feature to set a fixed region, which I had not been using before!

#

It's hard for me to update to the latest version on Assets, I'm the only programmer on the team... πŸ˜…

#

Is there something important I'm missing from the latest update?

jade glacier
#

Just remember if using FixedRegion rather than the new Dev Region that you have to remove that when you publish for real.

#

Or all users around the world are going to connect to the US

#

The new Dev Region only applies to the Editor and Development builds and is ignored by release builds, so you don't have to remember.

nimble eagle
#

Okay, thanks @jade glacier ! Is there an issue with having everyone connect to the US when the game is still relatively small? I'd prefer to have everyone in the same room / interacting with each other even if there is more lag, since our playerbase is still pretty small!

jade glacier
#

If they live in Africa... might be a bit of a problem for those people πŸ™‚

#

You can do a bunch with the region settings, to reduce the number of zones

nimble eagle
#

Oh okay, good to know! I'll look into that later

#

Oh, by the way...

#

@jade glacier , I wanted to ask you about another issue I had! This may be a long shot since I haven't been able to do much testing on it yet, but when I ran an Alpha the other day, players from Germany and (Poland I think?) could not load the game (At that time it was auto joining / creating rooms, so I don't have as much data from then); No matter how much they tried and re-opened the game, Photon would never spawn their player- I don't know what the exact issue was, but it was almost like they were not even connected to Photon somehow.

My Co in the Czech Republic had no issues, and it worked fine for him, so players in Europe can access the game; But I'm not sure why those players in Germany / (Poland too I think?) had issues, and the game wouldn't even spawn Photon Objects or let them make their own room?

jade glacier
#

That's a wall of text I don't actually have time to read closely, but it sounds like more of the Region vs Room stuff.

nimble eagle
#

TL;DR: people in Germany can't play XD

jade glacier
#

Players when they connect automatically do some pinging for the first time to find which region they should use

#

Once that is picked, they connect to a master in that region

#

and that master will only matchmake them with people in that region.

#

They will only create and see rooms that exist in that region

#

You can give the user the ability to pick a region in their starting menu if you want to make that less automatic

nimble eagle
#

The issue was, they were not even creating their own room: It was like they could not connect at all?

jade glacier
#

That I don't know about

nimble eagle
#

I may need to do more testing, I don't have a lot of info on the issue yet ^^'

jade glacier
#

They connect to master?

nimble eagle
#

Thanks for your help!

#

I'm not sure about that yet, I'll need to test that!

jade glacier
#

Yeah, you need to debug every step of the operation. Turn on all of the debugging log stuff in settings

#

and see where its breaking.

gleaming prawn
#

There's is no official unet.replacement. the new netcode is a totally different approach, aiming at a different kind of developer. You should take a look at mirror

#

Which continued the unet approach

jade glacier
#

If you are going for the LLAPI stuff there are a bunch of transport options out there

#

MLAPI I think has some variant of Unet's transport still going

#

Can't speak to the transport layer currently being used by netcode

jade glacier
#

But might be just fine for what you are doing.

#

Transports are dime a dozen these days. The main thing is to abstract your own higher layers from them as much as possible so you can change your mind later

stray scroll
#

How should I think about when syncing like visuals. I have a projectile which can move thought multiple shields, and each time it does it will create a visual effect, and then finally an effect when it hits an object. So in a server authoritive setup, what is the way to go? I was thinking of having some rolling buffer on the shields or projectile, with something like {tick, pos, (effectID)}? I'm a bit hesitant to throw in the collision logic to the clients, and let it simulate the visuals of the info it has, if there would be some diff from server which would indicate wrong info to client...

slim ridge
#

As long as nobody's steering the projectile all the server has to share is where, when, and physical properties.
If the simulation is 100% deterministic this is all clients should need. If the server needs 100% authority then it would run the simulation too and correct any out-of-sync clients. In some cases reducing server authority in favor of anti-cheat mechanisms is favorable

jade glacier
#

Does this projectile bounce or deflect in any way that is unpredictable?

#

If you avoid the determinism problems with bouncing off of players or player affected objects, you can cheat quite a bit just by shifting the projectiles timeframe into the local players timeframe

stray scroll
#

Some are homing on ships controlled by players..

wild flicker
#

Good evening,
I am not sure if this belongs here, but I hope somebody can help me out at least a bit :)
Right now I am creating a geo-map Game with multiplayer,
I got the geo-map running and instantiating a player with gps etc works fine. The map is also running. That is for Singleplayer testing purpose.

But now im absolutely unsure on how to implement the multiplayer part. I have done multiple hours of research allready and somehow cant figure it out.
I have read about Photon Pun quiet a lot, and the 100 ccu seems like a great deal for starters. It seems like it saves much effort aswell.

How do you manage for example Enemy NPCS health? And how do you handle the positioning?
Does it have to be in a server database? Do I have to rent a Server just for that purpose?
Regarding the database, I would have help from a programmer if necessary.
Also, how do you store player-account-info, like LVL, EXP, Items, etc.
Is there any Asset that could help with that?

My plan was to let enemy npcs Spawn around a certain radius after players enter the Server,
loot should directly appear in ones inventory.
The instantitation itself shouldnt be the problem, but I would like the npcs to share the same life to every player if they are nearby.
Also, how much work-effort is it to differentiate between no players nearby -> dont have to upload current hp , so you save data
and players nearby -> share hp

jade glacier
#

Smart objects definitely throw a bit of a wrench in things, but might still be worth making some experiments with advancing their timing into the local players timeframe. @stray scroll

#

Basically it involves simulating the projectile forward 1/2 RTT between the client and the authority

#

And then deciding if that works, how to cheat the timeshift. Without some lerping you will basically be spawning the projectile on other clients already well ahead of the launcher, which might be undesirable.

jade glacier
#

Homing logic would have to act differently based on if your are the target, or someone else is the target, since you would want to put that missile into the the timeframe of the object it is chasing

cloud meadow
#

I'm using Photon for a 2D turn based multiplayer combat game. I'm running into an issue where if the master and client machines have different screen resolutions the scene objects get created in the position set by the master. Is there a way to make the objects be placed in the same relative position on the master and client machines?

jade glacier
#

It sounds like you are trying to sync UI elements using photonTransformView or something?

#

The main thing would be whatever you do doing, is getting your 2d elements into a standardized/normalized space that scaling has no affect on.

#

Definitely don't be moving them in screen space

cloud meadow
#

If I put them the characters in world space and use photon transform view would that keep them in the same relative locations?

#

I have the UI elements working correctly as they are using screen space - camera canvas. The characters are created dynamically at run-time using PhotonNetwork.Instantiate.

#

The player on the left is the master and the played on the right is the client. If the larger resolution player is the master it's using that as the coordinates on the client and vice versa.

jade glacier
#

No matter how you sync them, with the view, by hand or with the SNS extension... you are going to need to get them into a space that is screen independent

cloud meadow
#

what are the SNS extensions?

jade glacier
cloud meadow
#

do I need to insantiate the objects via Photon to a wold-space canvas?

jade glacier
#

You need them to exist in world space, one way or another

#

I can't speak to Unity basics, I can just tell you that until you are in a space that is screen rez independent, you are going to have trouble.

#

If you stay in screen space, you will need to normalize all of your values.

cloud meadow
#

almost have it working, have it so it doesn't sync the transform position and sets the position on the client to its correctly scaled spawn point.

jade glacier
#

Once you get your translations between spaces shorted, it should be pretty easy

cloud meadow
#

I got it working now, just need to fix some other pvp issues now, heh

jade glacier
#

excellent

weak hound
#

can someone give me a easy tutorial to make a multiplayer game

#

pls

#

using LAN

stray scroll
#

@jade glacier thanks for the input, when you say; "you can cheat quite a bit just by shifting the projectiles timeframe into the local players timeframe" do you mean simulating them locally on each client?

jade glacier
#

Somewhat. Projectiles are deterministicy if you limit not deterministic interactions. Typically you just need the starting position/rot/velocity, and then you just simulate them without syncing their transforms.

#

It's mostly a question of what timeframe you want to show them in

#

Assuming you are doing snapshot interpolation. With interpolation and client prediction, every player exists in their own timeframe, that is in the future compared to the unopened entities around them.

stray scroll
#

Yeah, right now I think I'm modding things so they spawn at nozzle, but interpolate to where they should've been shot from and towards.

#

So since there will be these kinds of hacks, I'm wondering if I should really "simulate" to create visuals locally, or get them from server by some buffer I told about.

agile nexus
#

Morning, I’m new to game developing and have unity 2018. I’m making a FPS game since I’m stuck in quarantine. I want to add basic multiplayer what’s the best what of doing this?

gleaming prawn
#

You do not "add" it.... Multiplayer is something you develop the game for since day 0.

#

Honest advice (you'll hear from others): do NOT start with a multiplayer game. Create something simple, single player first.

jade glacier
#

I would say make a handful of small proof of concepts, each testing out some mechanic you might eventually want to try in a real game. Complexity compounds so quickly with networking, any large early undertaking is going to be a miserable demoralizing defeat.

#

@stray scroll If I am trying to push it into the players timeframe, I spawn it at the indicated spawn point, and then simulate the number of ticks or the time delta between the local player and the authority

#

That will move it closer to the timeframe relative to the player as the authority will see the projectile in relation to that player.

#

The issue is that if that bullet isn't meant for you, it is now not in the timeframe of other players

#

So you start getting into the voodoo part of networking in trying to decide how to cheat the timeframes. Like you could split the difference between the local timeframe and the authority timeframe, or you can do some educated guesses about whether that projectile is an actual concern to the player and only advance its timing if its something that player is likely to need to dodge or is likely to get hit by.

#

The other option of course is to move away from interpolation and into extrapolation, so everyone is in the same timeframe, but then you obviously are now going down the path of a different model and you will need to constantly resimulate.

agile nexus
#

Alright, thanks for the help

stray scroll
#

@jade glacier I think I understand what you're talking about, but I'm not sure if how I would work with things like shields, if the shields shield points go below projectile damage it will pass it, and above - not. This shield points value will be synced, if I would sim the projectiles locally I feel like I would need a state from the server and a local state and at some point update the local if the simulation didn't turn out to be correct locally. Because I can't really assume my simulation on client and server will turn out the same if not using something like quantum? πŸ˜›

#

What I'm going on about here is that if I would simulate the projectiles locally, and only have one state for shield points. If I would get the updated shield points value (reduced) and let projectile pass by it, while on server it didn't it would sim wrong. So it feels like it either shouldn't happen (if destruction of entity was in that package as well as shield poitns), or simulating projectiles for this setup is bad idea n' should not be used.

light harness
#

Hi all, so I am standing in between two tables right now and I could really use some advice. We are planning on developing a general VR Multiplayer platform that we plan to use for multiple VR projects in the future. Therefore we are trying to make a good solid base. But like many of you I can't figure out what network layer to continue with

Right now I struggle between using Photon Quantum or Unity's Connected Games solution. However, I know very little about Unity's connected games and, from what I can read, it seems like there is still a long way to go before it is ready?

What are your opinion on the above mentioned systems? How would you figure out is the "most"-future proof solution?

jade glacier
#

There servers would definitely be cosmetic only on the non authority versions.

gleaming prawn
#

@light harness I'm one of Quantum core devs, so I'll refrain from saying much about Unity's, unless you have questions about our tech.

gray pond
#

Unity's Connected Games is a long way out (2021?) and not in any usable state now or soon. If Quantum is a technical fit and in your budget, do that.

cedar marlin
#

hello has anyone connected unity with a node red server ?

tropic adder
#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;

public class MinerSpawn : MonoBehaviour
{
    [SerializeField] private Miner Prefab;
    [SerializeField] private List<Gold> goldSources = new List<Gold>();
    private PhotonView photonView;
    public void Summon()
    {
        GameObject ParentGameObject = GameObject.Find("Player1");
        GameObject ParentGameObject1 = GameObject.Find("Player2");
        Miner miner = Instantiate(Prefab, new Vector3(-2000, 190, 0), Quaternion.identity);
        photonView = GetComponent<PhotonView>();
        if (photonView.IsMine)
        {
            miner.transform.parent = ParentGameObject.transform;
        }
        else if (!photonView.IsMine)
        {
            miner.transform.parent = ParentGameObject1.transform;
        }
            // miner.AddComponent<Miner>;
            // Miner m = gameObject.AddComponent(typeof(Miner)) as Miner;
        miner.MoveTo(goldSources[0].transform.position);
    }
}```
#

Error:

#

NullReferenceException: Object reference not set to an instance of an object MinerSpawn.Summon () (at Assets/Scripts/MinerSpawn.cs:17)

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;

public class MinerSpawn : MonoBehaviour
{
    [SerializeField] private Miner Prefab;
    [SerializeField] private List<Gold> goldSources = new List<Gold>();
    private PhotonView photonView;
    public void Summon()
    {
        GameObject ParentGameObject = GameObject.Find("Player1");
        GameObject ParentGameObject1 = GameObject.Find("Player2");
        Miner miner = Instantiate(Prefab, new Vector3(-2000, 190, 0), Quaternion.identity);
        miner.transform.parent = ParentGameObject.transform;
            // miner.AddComponent<Miner>;
            // Miner m = gameObject.AddComponent(typeof(Miner)) as Miner;
        miner.MoveTo(goldSources[0].transform.position);
    }
}```
tropic adder
#

There it works

tropic adder
#

I would like that if I spawn a miner from my point of view, it should be from GameObject "Player1" as a child. And if it is not my view, then the miner should spawn as a child from Player2.

round ferry
#

Hello, anyone knows how to use NetworkAnimator in Mirror?

#

My animations work only on Host

#

and i can't find any tutorial or smth about NetworkAnimator in Mirror

jade glacier
#

You will want to get into the Mirror discord for better Mirror help. But the thing they will ask if you are disabling your controller code using if (!ni.hasAuthority) return; and such.

round ferry
#

Yeah, i know

#

Im there now xd

jade glacier
#

And that your NetworkAnimator is pointing at the correct Animator, since the sync has to be on the root of the object, even though the animator may be on a child.

round ferry
#

NetworkAnimator is in Root of player(?)

#

I just need one line of code to sync everything

#

and i need something like that or smth

jade glacier
#

I don't know what changes they have made to their animator sync, but typically animator syncs all just work. The main exception being that you do need to use passthrough methods for like Play(), SetTrigger() and other things that can't sync well or at all as states/parameters

#

@round ferry

round ferry
#

Thanks for help

#

I just made stupid mistake

neat salmon
#

hello!

#

I have a question

#

I want to add multiplayer to my game, but I dont know what FREE soulution should I use for it. I already tested dark rift2 but the problem with it is that it isnt open source, and also It is hard to implement. another solution that I tried was forge networking remastered, but It had some problems with rpc and syncing position, rotation or stuff like that looks like a mess on clients screens

#

so what other solution can I use for it?

stray scroll
#

Multiplayer is no easy task, and is not something you add to game alter, but something you start with in mind. If this is your first game try make some single player games first.

#

But if you want to go down the multiplayer route, you can check mirror or photon.

neat salmon
#

also, what is ccu, how much players can join a match??

#

which one is better?

#

I guess photon, it is used by a lot of games

stray scroll
#

they are different, you should check them out yourself. Also I doubt Forge Networking has any problems of get go, but the problems you see are problems you've created.

neat salmon
#

okay!!

#

the forge problems that I had were mostly about syncing positions and rotations

#

with interpolation it was too slow, even with interpolation at a higher values

#

and with out it, it was like stop motion

gleaming prawn
#

well @neat salmon you have the following choices:

  • send state and interpolate;
  • send input and do deterministic predict/rollback;
  • a mix between the two (send state + input, run with extrapolation);
    You cannot get around the speed of light... With forge (or PUN) you either interpolate or you get stop-motion or you extrapolate...
gray pond
#

Not to nitpick, but it'd be speed of sound, no? πŸ™‚

gleaming prawn
#

considering most data transmissions are fiber optics and radio, it's light...

gray pond
#

ain't no light in that copper we get from Comcast πŸ™‚

gleaming prawn
#

But in REALITY, it's more about the Router delays when, well, routing packets...

#

Lol

#

Took me a while to get the joke

#

Sound-speed brain at this late hour

gray pond
#

πŸ˜„

gleaming prawn
#

Nobody seems to be venturing into network programming with unity anymore...:(

chilly parcel
#

I plan to πŸ˜„

#

Did anyone try unity built-in multiplayer system/server? I mean, is it okay to use that?

stray scroll
#

<--- NetCode

#

@chilly parcel talking about NetCode? It's preview like everything with dots, not production ready.

chilly parcel
#

I don't know what it's called, while back I found out that Unity offers free servers for testing a multiplayer game, at least for small number of players. I kinda more of a meant is that still a think and is it still available for learning. Will I have difficulties when switching from it etc

indigo stratus
#

So what really are the options for a C# server and client for unity

#

If I dont want to code my own that is

#

I guess I could wait until unity comes out with there new multiplayer in the year 2030

gleaming fossil
#

DarkRift

#

Probably the easiest to use low level solution there is

#

And one of the best performant ones

indigo stratus
#

Huh. Ill check it out

stray scroll
#

It's more of a socket wrapper is it not? One would code quite a bit to go with DarkRift.

graceful zephyr
#

It depend son what you want to do

#

If you just want to play around at a hobby level, do some multiplayer programming... use whatever it doesn't matter.

#

If you actually want to ship a quality multiplayer game, pick some tech that other people and studios have shipped games on.

indigo stratus
#

Yeah it seems to make a scalable networking solution youd have to do quiiite a bit of coding atm especially if your game is pretty physics based.

#

Which I figured at the beginning but I havent attempted networking in 3-4 years and figured maybe something had changed

gleaming prawn
#

Well @indigo stratus do you want to write a game or a tool? Because as said before, there are existing solutions that are good for production, including for physics-based games

#

Since 3 4 years a lot have changed... Unity still does not have an in house solution, but external ones evolved by quite a bit

indigo stratus
#

Want to build a game with a max player count of 4 per server

#

I've looked at mirror and it looks promising but it may not scale well due to it being run in the unity client and not from a console app

jade glacier
#

Max player count of 4 has no scaling concerns, unless you are planning to spin up lots of game instances on a server or something. Then yeah, you want to avoid your server instances running Unity.

night plover
#

I think he's talking about scaling in terms of servers. Even with 4 players there could be a lot of stuff networked, depending on the implementation

jade glacier
#

Yeah, if he is spinning up instances - Unity EXEs should be avoided unless he really only knows how to dev using the built in Physics.

#

That or if his game type is right for it a relay setup like PUN2 to avoid spinning up at all.

gleaming prawn
#

4 player games, spinning a unity headless server is the wrong way to go in any situation...

#

Well, if it's a LAN game fine

#

Online, it would be a waste of resources

jade glacier
#

We have a lot of "just for fun" devs in here where a untiy based server is fine, because its never going to scale. But if it has to spin up instances... Unity bad.

#

Everyone is weighing in with the same answer... not sure the original asker is around to hear it πŸ™‚

gleaming prawn
#

Does not matter... The answer is always: see what successful games with Unity use...

wanton scroll
#

Anyone here ever used the SteamWorks.Net to invite a friend to your game? I'm having a bit of trouble.

jade glacier
#

yeah, I would recommend not really getting lost in any "just for fun" traps with game making.

#

But hard to convince people a lot of times to not take those shortcuts. Whatcha going to do.

gray pond
#

I've looked at mirror and it looks promising but it may not scale well due to it being run in the unity client and not from a console app
@indigo stratus Just going to mention since you've been away from networking in general for a few years...Unity has a "Server Build" option in Build settings that does produce a console app headless server. For 4-player matches, it depends on what all the game actually does, but it may well be possible for a single game server to run multiple isolated concurrent matches. Mirror does support this in a couple ways, but again, it depends on what the game is.

indigo stratus
#

Thank you for all of this discussion. The game would basically be 4 players (all rigid-body physics) interacting with each other.

#

Just coded the basics and then realized I should probably network before I go too deep into mechanics.

#

I didnt know unity had a server build option so it seems like that would allow it to be more lightweight.

#

@gleaming prawn is there no other alternative though? I definitely dont want to implement a physics engine to keep it as its own console app

gray pond
#

Rigidbody physics over the internet is going to be the biggest challenge. Quantum is the Cadillac solution there. Below that, having the server do all the physics and just sharing position/rotation updates to clients is probably the next best option. Rewind, prediction, extrapolation, correction...there really isn't a good free solution that does this really well.

indigo stratus
#

I was thinking of doing just thag and having the server share the position/rotations and send that to the clients

gleaming prawn
#

What kind of game play do you plan?

indigo stratus
#

Robot building game where you can vs your friends

#

but think battlebots

gleaming prawn
#

Because quantum ticks pretty much what you say you want. Decoupled.from unity, designed for accurate physics

#

What you are asking for is some.of the most difficult things to build

#

This is why you would not find something read... And it's not something you can build alone

indigo stratus
#

Unity physics seems to handle it well but I see how desync and things could be issues

gleaming prawn
#

A fighting game in 3d with building...

jade glacier
#

From another channel... this feels like one of those "spot all of the things wrong with this picture" puzzles.

gleaming prawn
#

Unity handles in single player

#

For multiplayer is a totally different story

#

You want to have the state of the art thing... Maybe you do not have experience with multiplayer u guess

#

I*

indigo stratus
#

It wouldnt have to be state of the art

gleaming prawn
#

:)

indigo stratus
#

Look at brick rigs. Guy built it himself in unreal

rotund burrow
#

Is Unet still available in Unity 2019 and Unity 2020?

gray pond
jade glacier
#

It can be accessed as a package still, but that is just really there to support legacy projects that use it. It also stripped out the NetworkTransform and Animator and who knows what else.

#

If our intent it to stick with Unet, Mirror and MLAPI are going to be preferred avenues.

rotund burrow
#

its deprecated in 2018 as well, but you can still use it, im curious because of a project that has already been completed in 2018 but used UNet, I'm curious if that project could be moved to 2019 or 2020 and still be able to function its Unet code

#

I know there are numerous other challenges involved

jade glacier
#

Its a package that I think will auto add itself if your project already had it and you move to 2020

#

just make a copy and try

brave forge
#

Hi, i'm having so much troubles with networking in unity, i want to make a "win screen" appear but i can't ...

elfin mantle
#

can someone help me with playfab player stats

#

it wont update

gaunt smelt
#

Hi, does anyone have any experience of implemeting Amazon web services into unity?

amber trench
#

@gaunt smelt sure, what are you looking to do

wanton scroll
#

Anyone here used SteamWorks to invite a steam friend to a PUN2 room and start a match ? I'm currently using FacePunch's sdk implementation .

flat shore
#

Hello guys, does anyone know how to do a multiplayer messaging system ? like sending mails between players ? Thanks (I use Photon / Pun)

wanton scroll
#

I would create a network event that has the messege and receiver ID in it's data and raise it. Then on receiving the event check if my id matches the receiver ID in the event and process the message .

#

or do want messages to stored even if users are offline cause I dont think PUN can do that

flat shore
#

i can do that with playfab, thanks

wary elk
#

Hi, is anyone using mirror networking here?

#

I'm very new to it, I got the room project example working on the network in p2p. Now I want to be able for any player to join at any time while the server is running. By default in this example scene players have to hit 'Ready' and then you have to manually 'Start Game' in the host application. I don't want that I want anyone to join at anytime and spawn. Can someone point me to some ressources to learn how to do that?

jade glacier
#

@weak plinth You'll want to add a bunch of debug.log calls at the various points. And put a debug into an OnTransferOwnership calback (or whatever the correct name is for that callback) to see that it actually fired.

fair cosmos
#

@wary elk , join mirror discord, they have a help channel guys will help u

wanton scroll
#

Anyone here used SteamWorks to invite a steam friend to a PUN2 room and start a match ? I'm currently using FacePunch's sdk implementation . Re-asking my question hah.

lean sand
#

Hello, I've recently picked up Unity for school and have also recently started using Photon to do multiplayer, but I've come across this issue:
At seemingly random points throughout development, I'll start to get this error message (even though I haven't changed anything relating to my networking code) and the only way I've found to fix it is to go back to a previous commit. I've tried searching on the internet but most problems were from people whose client wasn't connected to Master Server in the first place...

#

has anyone had this problem and might know how to fix it ?

gilded pollen
#

Is there a large, comprehensive tutorial on getting introduced to making online games?

I saw a brackeys fps tutorial but it's quite old and I'm sure a large portion of it is no longer relevant

I'd like to be able to get knowledgeable about making online games but I'm sure it's a big beast to take on and I'm hesitant about it

graceful zephyr
#

@gilded pollen no there isn't really

gilded pollen
#

lmao. damn. brutal.

#

so i imagine its a pretty lengthy journey to figure out good networking practices, etc

graceful zephyr
#

yeah it's a long journey usually

oak flower
#

Specific networking API's usually have their own tutorials with example projects. It's a good way to start.

graceful zephyr
#

Huge diffeence between learning a networking API, like UNET or Mirror or Photon, and knowing how to network a game from scratch

gilded pollen
#

could most games accomplish what they want to simply via unet / mirror / photon

and making one from scratch is more for advanced cases?

#

basically im wondering why someone would want to make their own when there is options

#

unless the options are all like... shallow

#

i guess is the word

graceful zephyr
#

completely depends on your ambition and game scope

gilded pollen
#

okay, thanks. ill do some googling into them, and their pros/cons, etc

#

overall im just wanting to make an fps with mp

#

whcih im sure those will be able to do

#

which*

bleak crag
#

@gilded pollen I would recommend checking out Mirror, Photon, playfab. They are very high level solutions

gilded pollen
#

thanks

jaunty ocean
#

@gilded pollen I came here because I'm in the exact same boat trying to make networked fps but I think the tutorials I found were old they were from early 2018

gilded pollen
#

im just reading about general networking overview articles right now, because after doing some reading, it definitely seems like some prerequisite knowledge i need to know

jaunty ocean
#

I've done networking before with javascript sockets but I'm new to unity trying to make it multiplayer

gilded pollen
#

and then, idk, im just gonna go with either photon or mirror for my little current small use-case for now. and hopefully in the future, unity's new "connected games" is finished and i can transition to that

#

ah

jaunty ocean
#

If I'm going to be finishing this project in the next few months can I just use a LTS version of unity and use the deprecated UNET multiplayer to make it work?

#

Only trying to do basic P2P stuff

gilded pollen
#

πŸ€”

#

also im just curious what state unity's new networking thing that they're working on is at. Is it out? Announced? Alpha? its kind of hard to find concrete info on it

jaunty ocean
#

I'm reading the blog posts about the switch and it seems like I can just use the old systems which should work for a year or two more

gilded pollen
#

yeah but im just curious if the new stuff is out yet, or is soon, or what

jaunty ocean
#

This image is on FAQ

gilded pollen
#

ahh, do you have a link to that page?

jaunty ocean
gilded pollen
#

so i guess a chunk of it is already out

jaunty ocean
#

This too

jaunty ocean
jade glacier
#

Any one tutorial that does it all correctly, we be so long and unfinishable it would hurt anyway.

#

And there would have to be like 5 of them for the wildly different architectures

#

Mirror and Mirror tutorials will get you familiar with the concepts of dealing with a messaging layer and the concepts of networked objects. It won't get you the high level AAA concepts involved in syncing input/states and simulations though. No single path will get you it all i one shot.

#

You have to learn a part, and that will reveal why you really need to learn a couple other more complex concepts... which will reveal the need for even more complex concepts....

#

So I would just start with a basic tutorial... and see where it leads you.

stone herald
#

I have a low level networking system thats built upon unity transport UDP library

#

thats what I use personally

#

whys it gotta show my face everytime

#

Ima change it to something more anonymous lmao

#

Usage example ``` /// <summary>
/// Packet received
/// </summary>
/// <param name="c">The network connection</param>
/// <param name="packetId">The packet ID</param>
/// <param name="packetBytes">The bytes to process</param>
private void OnPacketReceived(NetworkConnection c, int packetId, byte[] packetBytes)
{
if (packetId == 2)
{
//Read packet
LoginResponse_2 packet = new LoginResponse_2();
packet.readPacket(packetBytes);

            LoginResponse(packet.accept, packet.errorResponse);
        }
    }```
slim ridge
#

are you mr dinnertime?

stone herald
#

Me? No im new here

violet belfry
#

So in conclusion, is it best to use Mirror/Photon for networking at the moment?

stone herald
#

Photon seems the best for most yeah

#

or your own system

violet belfry
#

I just wanted to work out a simple solution for just 2 player multiplayer for a driving game

jade glacier
#

For first games PUN2 has the advantage of you not having to work out hosting. The disadvantage being that that is made possible by it using a relay server - so your are going to be writing it with full client authority - which isn't always the ideal answer.

#

However, if you are just learning, that in itself is a good lesson. You kind of have to see the issues latency creates for authority and prediction in order to even start thinking about them.

#

If your design requires server authority and hosting is not a concern, something like Mirror will do.

#

If you want to make it legit and are doing this for an actual release and you need server authority, you should look into Bolt and see if it fits your game type.

versed cliff
#

Hi guys, I'm learning PUN2, and I'm having a hard time getting a grasp on how to determine which player is which. Like if I am creating a 2v2 game, and I have the four players in the room, how do I sort them to be Player1, Player2, etc. which then has access to whatever they should have access to?

#

If that makes sense. I understand that on load the player instantiates an object to represent himself, but as for how to actually assign which player # he is in the game scene, I haven't figured that out.

tired raptor
#

here is a common question, I've been trying to figure out what is the best networking approach for an fps shooter. I am very much confused. Should I use PUN2? should I use Mirror? if UNet is deprecated and Connected Games is not out yet, what should I do?

vivid owl
#

I use MagicOnion for everything

tired raptor
#

hmm

#

does it work well? fit for a shooter with req of less than 80 ms?

vivid owl
#

not really sure, I haven't built a shooter yet

#

I've mostlybeen building turn-based games

tired raptor
#

ty

gleaming prawn
#

@tired raptor consider photon Bolt, it's built for that type of game.

tired raptor
#

@gleaming prawn looks good, ty

flat shore
#

Is annyone know how to call cloudscript when a playstram event is called ? (Playfab)

#

nvm i dound it

#

found*

tired raptor
#

@tired raptor consider photon Bolt, it's built for that type of game.
@gleaming prawn
Thinking it over,I think I want a dedicated server so I have to go with PUN2, unless this is also achievable with Bolt?

jade glacier
#

PUN2 would be the opposite of a dedicated server though.

#

PUN2 is all based around using a relay instead of a game server.

gleaming prawn
#

If you want dedicated server, go with bolt

prisma girder
#

Keep in mind Bolt Free does not allow you to run your own custom dedicated server with direct IP connection, that's a Bolt Pro feature, which they claim requires directly contacting them and is part of their Enterprise offering

#

They don't advertise this fact on the feature splash page, and it's not super clear under the pricing splash page, but if you drill down into the docs you get this:

fading pawn
prisma girder
#

Fair enough. Would be nice to see a bit clearer breakdown on the photon site, with various SDK integrations in mind

frank leaf
#

how do i delete a bolt state/other thing?

#

cant find a button for that

#

and i created that state by accident

#

i dont want it anymore

fading pawn
#

hold ctrl

#

We have a Photon Bolt Discord if you're interested

frank leaf
#

oh cool

#

invite me please

versed cliff
#

client-side prediction with PUN2: pain in the ass?

gleaming prawn
#

Not really

#

Local player movement is already local...

#

Maybe you should take a look at @jade glacier 's SNS extensions to PUn2

#

I think he handles this

versed cliff
#

@gleaming prawn on the asset store?

gleaming prawn
#

have no idea

#

Wait for him

#

It's not mine...:)

versed cliff
#

I'm trying to set it up so that the master client keeps the authoritative game state and all commands are sent to the master client and the current game state is sent back

#

if there are any packages that can streamline this that would be amazing

gleaming prawn
#

if you are going that route, using master client as server

#

You should just use Photon Bolt instead

#

It's designed as clients vs authoritative server

#

with server being a unity instance of the game (wither listen server or dedicated server)

#

And works both over photon rooms (bolt free in relay mode) or direct connections (punch-through with bolt free, direct IP connections with bolt pro)

#

Bolt's API will be what you need

versed cliff
#

I'm worried that will be even more complicated than using PUN. I'm pretty new to all of this

gleaming prawn
#

Designing this over PUN2 is just reinventing Bolt

#

Well... PUN is easy

#

But you want server authority, which pun is NOT designed for

#

So it is complicated

versed cliff
#

Hasn't been easy for me so far πŸ˜…

gleaming prawn
#

Well

#

If you've never done multiplayer games before, do NOT try to do something complex

#

Start with something much much simpler

#

If have never done a GAME before... Do not even try multiplayer

versed cliff
#

Yes but I still want to be on the right path. I'll start simple. Photon Bolt is better for authoritative state?

gleaming prawn
#

Right path: start with a simple game

#

You will throw it away anyway

#

Do not think what you will write today will be useful for a complex game in 6 months, it will NOT

#

Start with a simple game, try to FINISH it

#

And "release" it even if just for friends and family

#

Then start over after you learned a few things

#

That's my only advice

versed cliff
#

Alright thanks

tired raptor
#

We have a Photon Bolt Discord if you're interested
@fading pawn invite

#

What happens If Bolt sounds better for my project, but I would also like a dedicated server in a month or two?

#

Will I need to add PUN2 as well and rewrite everything?

#

support both? I feel that it could be clearer ...

spring crane
#

Like people have said, PUN2 is peer to peer over relay, so hacking a dedicated server in there is a bit backwards way to go about this.

#

Hosting PUN or Bolt on your own server infrastructure requires you to make it rain on Exit Games afaik, so I would just pick the one that makes the most sense in the first place.

jade glacier
#

They are totally unrelated libraries. Bolt and Pun2 aren't mix and match. I would do tutorials for both and get comfortable with understanding what they are before even trying to decide these things.

gleaming prawn
#

Bolt can be hosted in your own infra, no need to "make it rain" on us @spring crane

#

That's what bolt is designed for... You do not host photon servers, you host your bolt servers

spring crane
#

Yea meant completely off Exit Games servers, so direct connection

gleaming prawn
#

You can..

#

Bolt PRO

#

Designed for that

#

That's not really "make rain"....:) It's our product, you can license it and have just like that

spring crane
#

Only available directly through us to select customers. Access to SDK via subscription.
Wording makes it sound like "make it rain" situation πŸ˜›

gleaming prawn
#

Nah

#

We have several customers using it

spring crane
#

Well I don't doubt that considering the studios that work with Exit Games πŸ˜›

jade glacier
#

I don't get the fear of Exit's pricing. The quantity of active titles using all of the libraries should be some kind of an indicator that the models aren't abusive.

#

I don't touch that side of things so I can't speak to pricing, but a LOT of small developers seem to be happily operating using Photon.

spring crane
#

Probably partly because people don't know the actual cost and time required for these sort of things

tired raptor
#

Bolt can be hosted in your own infra, no need to "make it rain" on us @spring crane
@gleaming prawn
From my understanding, Bolt aims for a player to host a server, this means that if he goes out, the server is closed.
Still didn't understand if this means I can use that as a Dedicated server and just ignore that player that is hosting it?
Will I be able to achieve Dedicated & Player to player connection with Bolt?
What I am trying to achieve is kind of like Half Life, you can create a dedicated server and you can also host your own game.

graceful zephyr
#

@tired raptor bolt can be ran both as a dedicated server or one of the players hosting it

#

I'm the guy that wrote bolt originally, so I'm pretty sure I'm correct πŸ™‚

gleaming prawn
#

lol

#

And in either case (player hosted, or dedicated host), even bolt free would use direct connections whenever possible (via STUN punch through)

tired raptor
#

Awesome! so there are some people who explain this the wrong way and they are very misleading.
They say that PUN2 is used for dedicated server and Bolt for Player to player connection

graceful zephyr
#

PUN/PUN2 = relay based, with a central server that facilitaties connections and data between players. But no logic on the server by default - and no unity process running on server

gleaming prawn
#

Did you see that in our website, or from any of us?

graceful zephyr
#

Bolt = uses the same relay as PUN/PUN2 to perform punch-through and form a direct UDP connection between the server and it's clients.

gleaming prawn
#

I'm not aware of anybody who says PUN2 has anything to do with dedicated servers...:)

tired raptor
#

Did you see that in our website, or from any of us?
@gleaming prawn I will check it right now and verify

gleaming prawn
#

If yes, please let me know

#

I can ask the guys to review stuff that is not clear

tired raptor
#

Should have notices that:
"In Bolt however, one of the Bolt clients needs to act as a server, a true dedicated server or real host"

gleaming prawn
#

But the wording is wrong on that section headline

#

I'll poke the guys here

tired raptor
#

Cool tnx, I will make sure that next time I will read the entire paragraph and not just the title lol

gleaming prawn
#

It's not wrong, it's just a bit misleading

tired raptor
#

Agreed

gleaming prawn
#

The server is there (the relay server), and it is dedicated to that, all clients connect to it directly, etc

#

It's NOT a simulation server with authority (which is a completely different thing)

#

The thing is that in that particular case, PUN has a slight "advantage":

  • because the relay server is always dedicated, if the PUN master client disconnects, the game can still continue for others (as long as you did not try to write the master client as an authority "host"). Master client role will be passed to one of the still connected clients, etc...
  • Bolt does NOT offer host migration... If the Unity client that acts as the Bolt HOST disconnects, game is over (unless you implement host migration yourself, which is not easy)
#

I should also mention that Quantum doesn't suffer from this at all. Game keeps running normally for connected players, no matter who disconnected or got back in, etc

tired raptor
#

Yeah but what I understand is that you are able to achieve kind of the same behaviour (in a different way) with Bolt so that if the host leaves the server shuts down.

#

Also I am not familiar with Quantum

gleaming prawn
#

If the bolt host leaves, game is GONE

#

Bolt is client-server (in which the server is a unity instance)

#

pretty much like Unreal, CS, or Unity's ne netcode or Mirror (I think)

tired raptor
#

hmm ok

#

clearer now

gleaming prawn
#

by gone, I mean:

  • all game clients will notice their game host/server (not photon server) times out, so they "quit"
tired raptor
#

Yeah

gleaming prawn
#

Just like a regular client server game would do

#

PUN and Quantum would NOT...

tired raptor
#

"Master client role will be passed to one of the still connected clients"

gleaming prawn
#

Quantum because no unity instance is a "host"

jade glacier
#

Bolt is based on CS:GO - so if you know how hosting locally and with dedicated servers works with that.. you know how Bolt works.

gleaming prawn
#

For PUN because it is client authoritative, and most of the time the sim can "survive" recorver from a master-client disconnect, unless you do something very specific

jade glacier
#

Yeah, for PUN authority is just a virtual baton that gets passed around

#

All clients should have the same info, the Master is just the one that is flagged as being the current final word if you need that behavior.

#

Though your code isn't required to respect that its literally just a flag on a client that says "I'm the leader", and that flag can easily get passed to any other client.

#

The common mistake in understanding is that that is NOT a server. The relay is the server.

graceful zephyr
#

'host' in Bolt is just the 'server' which happens to have an bolt entity it can control locally also like a player

#

so if server dies = game dies

jade glacier
#

If you try to treat the master as if its the server for authority and such, you are looking at a LOT of latency.

#

Bolt uses the same naming convention as Unet. Server, Host and Client right?

graceful zephyr
#

uhm

#

good question

#

i think it just has isServer and isClient

#

FWIW bolt is not 'based on' CS:GO, it use the same topology as CS:GO, but bolt is an eventual consistency framework, where CS:GO is a delta snapshots setu p

jade glacier
#

IsHost basically is (isServer & isClient) for unet

graceful zephyr
#

just to be clear

gleaming prawn
#

Yeah, for PUN authority is just a virtual baton that gets passed around
Only if you implement authority in a master client..:)

#

By default there's no singular point of authority

jade glacier
#

Ah, didn't know you used a different consistency model. Good to know.

#

Makes sense, since CS:GO has no need to scale beyond what it is.

gleaming prawn
#

I mentioned CS/Unreal just for the sake of hosted authority, with some form of state transfer

graceful zephyr
#

yes

tired raptor
#

What I understand is also that as opposed to Bolt, PUN can go docker?

graceful zephyr
#

go docker?

#

o.O

jade glacier
#

new word for me too

tired raptor
#

get dockerized

#

lol

graceful zephyr
#

do you mean docker as in the orchestration?

gleaming prawn
#

But @tired raptor Bolt has the whole kitchen sink of delta compression (one form of it), lag compensated raycasts, client predicted commands, scoping/interest management

tired raptor
#

Live in a container

gleaming prawn
#

All built in

graceful zephyr
#

Unity host can live in a container also afaik?

gleaming prawn
#

Bolt host can be osted on docker AFAIK...

tired raptor
#

But @tired raptor Bolt has the whole kitchen sink of delta compression (one form of it), lag compensated raycasts, client predicted commands, scoping/interest management
@gleaming prawn Yes that's one of the reasons I've shifted to that

gleaming prawn
#

We do not enforce anything... Even with bolt free...

tired raptor
#

I don't think you can run unity on Docker

graceful zephyr
#

Β―_(ツ)_/Β―

gleaming prawn
#

You can NOT docker-ize Photon Server, which is something else completely

jade glacier
#

When I describe Bolt, I usually just say its the only complete stack available for Server Authority using snapshot interp and client prediction.

graceful zephyr
#

i dont deal with devops

gleaming prawn
#

I don't think you can run unity on Docker
That would be a Unity limitation then... Not specific to Bolt

tired raptor
#

Agreed

gleaming prawn
#

@jade glacier bolt is not snapshot interpolation AFAIK

jade glacier
#

Isn't it?

graceful zephyr
#

yes it is

#

snapshot interpolation is not the same as snapshot delta compression

gleaming prawn
#

Is it? Damm I always confuse this terminology

#

hmm

jade glacier
#

yeah, sad state of terminology when three devs for the same company have to sort out terms

gleaming prawn
#

I know it does not do full frame snapshots, etc

#

It uses eventual consistency, etc

graceful zephyr
#

snapshot interpolation = the act of interpolating between two known values, say Tick=100 and Tick=102.

delta snapshots = a way of transferring data to the client
eventual consistency = another way of transfering data to the client (which bolt uses)

gleaming prawn
#

lol

tired raptor
#

I guess there is much I don't know about the struggles of Gaming Networking, but as opposed to Bolt, Pun, Quantum what will happen if I'll create a udp server myself, dockerize it, and just store a json that describes each player position and other state properties ?

graceful zephyr
#

both DS and EC can be used with snapshot interpolation or state transfer (extrapolation)

gleaming prawn
#

got it

jade glacier
#

I would assume if the dev wants to get crafty they can extrapolate with Bolt, but not aware of any of the lib doing that for you.

tired raptor
#

If its a short explanation, if its a long one just let me know and I'll go a research

gleaming prawn
#

the fact is that you do not extrapolate locally (you interpolate) on bolt, except for the local player... Is that correct then?

graceful zephyr
#

yes, bolt uses snapshot interpolation

jade glacier
#

But it does transport inputs and it creates rewindable components and such

gleaming prawn
#

And when we mention state transfer, this normally is also associated with extrapolation?

#

But it does transport inputs and it creates rewindable components and such
Bolt? AFAIK no

jade glacier
#

So the seeds are there for input extrapolation and resim, if someone wanted to get nutty

gleaming prawn
#

Only on server

jade glacier
#

Not sure how far reaching his built in physics/controllers are

gleaming prawn
#

Not on clients... The clients apply the commands for local player immediately, reconciliate server authoritative snapshots

jade glacier
#

So only fholm can answer that

gleaming prawn
#

On server it does rewind for Raycasts only... AFAIK

#

And commands are integrated on server (and confirmed down to clients as conciliation updates)

graceful zephyr
#

raycasts and sphere overlaps

jade glacier
#

I believe the ability to have that code anywhere is possible, but can't say for sure. I don't know what is in a black box and what is not

#

Does it have the seeds of input extapolation and resim?

graceful zephyr
#

no

#

not even close

jade glacier
#

I stand corrected then

#

Without the ability to do that, extrapolation with it would be all transform/velocity based and such... would be a mess.

#

So yeah, its firmly a Snapshot Interp engine

gleaming prawn
#

yep

#

What is the current state of those libraries that aimed to "beat Bolt"?

#

Any got released?

graceful zephyr
#

πŸ’©

gleaming prawn
#

lol

#

5 years have passed... 2015, right?

graceful zephyr
#

2014

gleaming prawn
#

Maybe at 10th anyversary

graceful zephyr
#

lol

jade glacier
#

There have been a couple hobbyists "me too" attempts we have seen.

hasty fiber
#

Hello all

#

got a question for you all

#

I have a CMS system that has question those questions are assigned a video and 2DTexture. everything works good now if it pulled from the internet. What i want to do is to serialize the data to a file if there is no internet those get reloaded. Should i / can i serialize all the data the strings for the questions images for the textures and video for the video?

sharp hemlock
#

is MP easy to add in or do you need to rebuild the game to add it?

fading pawn
#

A networking expert can probably implement multiplayer within a few weeks if the single player implementation isn't too problematic to convert

sacred patrol
#

Depends on game complexity and what you expect from networking. But yea, a few weeks for a rough proof of concept should be enough.

#

Not gonna happen for deterministic solution though.

amber trench
#

@hasty fiber sure, you can grab all the data from a CMS and turn it into static content, which is what you really want to do. there are many ways to do this

#

for example, the static web framework Gatsby.js can transform a wordpress site, in a fixed point of time, into static content queryable with graphql

#

you can of course save the files and create an ad-hoc copy of a website

#

@tired raptor i've found that it's very challenging to migrate game state data, like player positions, and that's why in practice i don't think anyone goes that far with persisting game state into a database or file or wahtever

#

when there's a big WoW update, there's downtime, they save your inventory and such, but they restart the instances

#

it's not like they freeze exactly you in your battle, then restore it later

#

instances == literal C++ processes with memory that have all the game logic

#

"but something something scalable" usually the piece that is missing is a load balancer, which connects people to the same in-memory game state, across many computers all running games