#archived-networking

1 messages ยท Page 112 of 1

gleaming prawn
#

You know we shared the "method" many times...:)

teal obsidian
#

yep and joy looked over my algorithm for it

#

couldnt find anything wrong

gleaming prawn
#

And several other people understand the principles really well (you know these guys)

#

exactly

teal obsidian
#

Can you do a video of those ragdolls colliding with each other

gleaming prawn
#

Let me run the build here...

#

but I can only control one at a time

teal obsidian
#

Thats fine

gleaming prawn
#

So won't represent the most challenging parts

#

gif got too big...

#

let me try to resize

#

a bit small, but collisions work normally

#

It's ragdolls, so goofy regardless

#

but one is host, other is a client doing prediction and reconciliation

#

Tested here for several minutes

teal obsidian
#
2.) update wheel collider values to server values: friction, slip, etc
3.) physics sync transforms 
4.) run through inputs until at present time, physics.simulate at end of each input tick```
#

this is what I'm doing.

gleaming prawn
#

sounds correct

#

Except I never even tried wheel colliders

#

I believe you can not fully reset them

teal obsidian
#

it doesnt even work without wheel colliders

#

its custom wheel colliders

gleaming prawn
#

I'd do a custom wheel collider

#

oh, ok ok

#

ye, makes sense

#

but could be something more fundamental, like tick alignment not matching, etc

#

your reset/resim loop sounds correct

#

but this is a very hard problem to do right

#

So any small off-by-1 mistake plays havoc...

teal obsidian
#

here I'm gonna paste a screenshot of something, one sec

#

the top part is the car gliding on wheel colliders

#

and then the collision happens with the terrain and it just messes everything up

gleaming prawn
#

Sorry, I can't help that much, you know.

teal obsidian
#

I know, just venting my anger

gleaming prawn
#

๐Ÿ™‚

teal obsidian
#

This is the last thing I could think of... That maybe I'm using some of the wrong settings

#

then again, they're the default ones :/

gleaming prawn
#

sometimes, enabling enhanced determinism helps a bit

#

it's off there

#

But should not make MUCH different

teal obsidian
#

yeah I just switched it off for a test, it's been on for as long as I can remember

gleaming prawn
#

ye

teal obsidian
#

@tender mothPlease let me know if you get yours working properly

vast zodiac
#

Hi how could i learn networking in mirror and tnx โค๏ธ

shut yarrow
#

By reading

oak flower
regal delta
#

By looking on Udemy for great tutorials

cosmic dove
#

I just started learning Mirror and I can't figure out how to set up the camera for players joining the host.

if(target == null)
        {
            if(GameObject.Find("Player"))
            {
                target = GameObject.Find("Player").transform;
                offset = transform.position - target.position;
            }        
        }

        if(target != null)
        {
            Vector3 targetCamPos = target.position + offset;
            transform.position = Vector3.Lerp(transform.position, targetCamPos, smoothing * Time.deltaTime);
        }

This works on the host but not anyone else.

spring crane
#

What happens?

cosmic dove
#

When another player spawns, their camera spawns at the default position which is the same place of the host's camera but it doesn't move.

teal obsidian
#

@tender moth@blissful kayak I stand corrected. It looks like physx is 100% possible to roll back, I was simply resetting my state wrong

polar meadow
#

Hi

#

Hi guys issue is that I cannot see my player in game view in unity photon can only see on scene view and only one player only so some tell me the solution

low vortex
#

Hello everybody, currently I'm trying to implement a server room, so I wanted to implement the players being listed in the room by using the NetworkManager callbacks but when someone joins the host, nothing is logged to the console. Any clues what I might be missing, I'm feeling a bit lost here, I'll try again tomorrow.

polar walrus
#

Hey guys.. I've asked this in #archived-code-advanced, but I think this channel would be more appropriate: Do you have a good networking lib to recommend?

polar walrus
#

Yeah, I ended up choosing it

#

Having a tough time migrating my game though.. I should have done this much earlier

coarse goblet
#
    [ServerRpc]
    private void RequestInitServerRpc()
    {
        var ownerId = OwnerClientId;
        var vehicle = Instantiate(testVehiclePrefab);
        var netObject = vehicle.GetComponent<NetworkObject>();
        netObject.SpawnWithOwnership(ownerId);
        _clientControllables.Add(vehicle.GetComponent<ClientControllable>());
        
        var rpcParams = new ClientRpcParams
        {
            Send = new ClientRpcSendParams
            {
                TargetClientIds = new[] {ownerId}
            }
        };
        
        ReferenceControllableClientRpc(netObject.NetworkObjectId, rpcParams);
    }

    [ClientRpc]
    private void ReferenceControllableClientRpc(ulong objectId, ClientRpcParams rpcParams)
    {
        var netObject = NetworkManager.SpawnManager.SpawnedObjects[objectId];
        if (netObject == null)
        {
            throw new ArgumentException("No object with ID " + objectId + " is spawned.");
        }

        var controllable = netObject.GetComponent<ClientControllable>();
        if (netObject == null)
        {
            throw new ArgumentException("Object with ID " + objectId + " has no ClientControllable component.");
        }

        _clientControllables.Add(controllable);
    }

Does this order ensure that a client has a spawned object when the reference Rpc is sent?

Order:
ServerRpc -> Spawns NetworkObject
ServerRpc -> Send ClientRpc with id
ClientRpc -> References NetworkObject locally

swift epoch
#

How would I go about doing this, using Mirror? I need to enable the camera locally, after spawning it from a function on the server. I keep getting

UnassignedReferenceException: The variable cam of PlayerController has not been assigned.
You probably need to assign the cam variable of the PlayerController script in the inspector.
UnityEngine.GameObject.GetComponent[T] () (at <a0ef933b1aa54b668801ea864e4204fe>:0)
PlayerController.Start () (at Assets/Scripts/Player/PlayerController.cs:37)

on the client, although it works fine on the host

I thought about making it return cam, but Mirror doesn't let you do that, and I can't pass CmdSpawnCam a reference to my connection, because Mirror again doesn't let you pass connections

mortal horizon
#

dont network cameras

swift epoch
mortal horizon
#

have a camera follow script that can dynamically change targets

swift epoch
#

So Mirror just doesn't support sharing views?

mortal horizon
#

not sure what you mean

swift epoch
#

I want players to spectate others, by just looking straight through their camera. When the spectated player moves their view, the view of the spectating player moves

#

Actually, I guess in that case I could just share inputs, huh?

mortal horizon
#

just change the camera follow target to whoever you want to spectate

#

none of that needs to be networked at all

swift epoch
#

Yeah, I'm not great at explaining this

#

We're not too fond of that concept anyway, so it's not a huge problem

swift epoch
#

How can I prevent the client from attempting to run server functions?

#
[Server] function 'System.Void DamageScript::Awake()' called when server was not active
UnityEngine.Debug:LogWarning (object)
DamageScript:Awake () (at Assets/Scripts/NPCs/Enemies/DamageScript.cs:20)
UnityEngine.Object:Instantiate<UnityEngine.GameObject> (UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion)
PlayerController:Update () (at Assets/Scripts/Player/PlayerController.cs:57)
#

It makes sense I get the error, and I can just suppress it using ServerCallback, but how can I prevent it from attempting to run it at all? (Using Mirror)

spring crane
#

Odds are you can't easily (and probably shouldn't) block the Awake from running, but you can probably add some check in there to do nothing if it isn't running as server.

swift epoch
#

I'd still get the error in that case. The awake doesn't actually run on the client, only attempts to run it before being stopped because it's not the server

cosmic dove
#

Is this where I can ask questions about Mirror?

swift epoch
#

This is pretty much just a visual issue and I can hide it using ServerCallback, but I feel like I should prevent that entirely on the client. Maybe Mirror has a way to only have a script on the server?

swift epoch
cosmic dove
#

Okay I'm new to Mirror so I don't understand much. I'm trying to just have the localPlayer shoot on mouse click instead of all players. I can't use !isLocalPlayer because I used it on my movement script because of an error that says that the Prefab has multiple identities.

#

I'm also trying to sync the shooting on the screen and I haven't gotten that working either. I think I'm supposed to use Command but I get an error that says that it dosen't have authority.

spring crane
mortal horizon
#

@swift epoch @cosmic dove i would recommend asking in mirror discord your questions, we are more active there and they will most likely get answered faster

swift epoch
#

๐Ÿ‘ I'm a member there, but I tend to find myself asking here just due to the convenience. I'll try to ask there more often

clear rain
#

Oh I think I posted my question in the Wrong Channel before. I don't have a problem, just a question on strange behaviour:
I am trying to send a http get request via the System.Net implementation of HttpWebRequest via my Unity Application on an android device to my local server. The server is reachable and a manual request via the browser works as expected, the request doesn't work from my application (only on android, desktop works fine).

I managed to get the request working, but I encountered the strangest behaviour I've seen in a while. As my example did not work with the default System.Net package I tried the Unity Get Request suggested here: https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.Get.html which worked. I then tried my other solution with the default system net request and surprisingly it worked, too. I experimented a little bit and whenever I added the Unity Method definition from the docs WITHOUT EVER USING IT, my code works just fine. But as soon as I removed the definition it stopped working again. Got anybody an idea wtf just happens here, I am very curious?

vast apex
#

I am creating my first online game and I have some questions about when it comes to anti cheat. So should i just make the movement code all client side and just trust the client and have good performance. Or just send the Input to the sever and let the server compute my movement and move me but the I found that you are having more latency. or you need to do a combination of both and send the input to the the server and predict the outcoume, move and then check if tthe prediction is correct to move the player or not. Or should i not even worry about cheaters

shut yarrow
#

If it's your first game don't worry about it

#

Unless you don't mind putting in all the extra time and get little return on investment over it

vast apex
mortal horizon
vast apex
#

I see thanks

shut yarrow
#

@vast apex NL?

vast apex
#

haha ja

shut yarrow
#

Cool!

vast apex
#

How did you know?

shut yarrow
#

Well if you are interested and have some time lets DM I like to know what you're working on

#

Your name ๐Ÿ˜‰

vast apex
#

yh ofc that sounds great

fickle geode
#

๐Ÿ˜†

wooden stone
#

hey, i don't know much about unity servers and networking. when making a game that for example needs space for lots of clients on the server, where would i look for one? Does Unity provide big servers or do i need to host a dedicated server elsewhere?

fickle geode
#

what type of space? RAM, disk space, network traffic?

#

in general, Unity does not provide anything, there are some other third parties that will relay (forward) traffic from one client to another, if you have a "central place" that needs to process things, you would need a dedicated server.

wooden stone
#

hm ok thank you man

sharp axle
wooden stone
#

how many clients can it hold at once?

sharp axle
#

Dunno about multiplay. But the relay peer to peer service is capped at 10 players per match

#

But in any case if you are trying to go massively multiplayer then you are gonna have a bad time

fickle geode
sharp axle
#

They are all still in beta. But its part of the new Unity Game Services they just launched last month

shell halo
#

Hi everyone, did anybody have performance issues with netcode too? I had really bad delay when playing in LAN. I wonder if this is an issue of the package being in still in beta.

#

So I switched to mirror and everything is fine now concerning the delay.

#

But I got another issue now. And this one is really strange. It looks like I am colliding with a clone of myself at the center of the map now. I can't find any object there, but the collision method is called with the other collider being the player itself.
I also bounce back, as if I really collided. This occurred when I switched to mirror. That's is why I am writing it here.

rocky nebula
#

@shell halo try asking in mirrors discord. You may need to provide more info

dim plover
#

has anyone done or know how to do the photon PUN tutorial cause i'm stuck on one of the steps

spring crane
#

What step?

dim plover
#

2- lobby UI The Connection Progress

#

I just don't know where to put the code new to code in to edit the launcher with out breaking it

#

That is what i'm to I'm just having trouble to find out where to put that code in to edit the launcher.

spring crane
#

It says where to put things on each step

dim plover
#

yeah I did but it just broke

#

and unity came up with a bunch of error messages

spring crane
#

Post the code

dim plover
#

ok

slow lichen
#

If I want to start some action on all clients (Footstep sounds play in example)

#

I should send rpc to server

#

And from server to all clients?

#

Or I can make it better

sharp axle
#

I think footsteps should be done locally on each client. But generally, yea. If you want to broadcast an explosion or something to all clients, it has to come from the server

wheat socket
#

Hey guys, my team creates an ARPG called Last Epoch which is a Diablo-like and we're looking to hire a full time network developer. Do you have any suggestions where we may post the job outside of sites like Indeed and Linkedin? Where do you folks frequent? ๐Ÿ˜„

mortal horizon
#

@wheat socket what networking are you using

#

Some networking discords have job posting channels for them

quartz plinth
#

Is there networking system that would work on steam and other platforms/mobile

spring crane
#

Most popular networking solutions seem to be trying to target as many Unity platforms as possible

copper sphinx
#

is unity networking free?

dim plover
#

depends on where you get it from some are free and have limited things you can do with them

#

You want something that is free I would go with photon engine

#

here is website if you want to have a look at it

devout fable
#

can someone recommend me a good google cloud save tutorial ? ( Android)

brazen prairie
#

can anyone recommend me cheaper networking than photon?

#

im building a turn based game

#

firebase can be used too, but more work right?

fickle geode
#

you can leave your development desktop on all day?

#

hosted from home baby!

brazen prairie
#

yes but that would be risky, in case it turn off

#

if my plan goes well, i might have too many players

fickle geode
#

I jest, yeah Google and Amazon both have some free tiers, and scale easily after that, they don't offer game specific services as far as I know

brazen prairie
#

i think firebase is the best option

#

just need to tweak a bit

fickle geode
#

But consider this, disclaimer, I'm not affiliated with proton, but if you hit the tier that it's not free anymore, you're still making money because you're a success

brazen prairie
#

yeah i definitely understand, but not in my country

#

my currency is very low

#

so photon is costly

fickle geode
#

ahh yeah i never considered that!

brazen prairie
#

yeah unfortunatelly ๐Ÿ™‚

fickle geode
#

try moving to switserland in that case

brazen prairie
#

hahaha hopefully one day

#

je parle francais aussi

fickle geode
#

haha I also speak a bit of French, but i'm not Swiss, I just used it for the stable currency

#

backed by vaults full of gold!

brazen prairie
#

i see, my currency lose value every minute... TRY

fickle geode
#

convince Erdogan to join the EU ๐Ÿ˜†

brazen prairie
#

i would talk too much about him but dont want to spam here haha

#

2023 he will be gone

fickle geode
#

True sorry I got distracted! Let us know how Firebase goes! Because I'm currently hosting from home for real haha (dedicated server though, but still)

brazen prairie
#

sure, thanks for help! another question, how many ccu u can host from home?

#

was it ccu tho, concurrent player

#

my speed is 100 dl, 5 ul ๐Ÿ˜„

#

very limited upload speed

fickle geode
#

Well my i'm hosting more of a "master" server, it only helps people punch LAN and connect peer to peer. So no real game traffic goes through my connection.

#

just the connection making process

brazen prairie
#

ohh.... i can do that too... are u using mirror for that?

fickle geode
#

all custom

brazen prairie
#

that would take soo much time, wouldn't?

fickle geode
#

it's very easy actually

brazen prairie
#

do you know any documentation?

fickle geode
#

yes many unfortunately because I had so many issues figuring it out, and in the end i was just mixing two sockets

#

try searching this channel for nat punching

heavy pelican
#

Could some give some ideas about how to achieve the following, say I have a unity scene, now I want someone sitting beside me on a laptop, so they are on the same network. So I want the person on the laptop to say be able to see a plan of my scene. Now say the person on the laptop wants to add some gameobject, move it around or change lighting etc.. now Iโ€™ve created a simple example using Netcode. But I donโ€™t think this is the right approach, I think it would be better to have some kind of stream open, like fire base. So on a website say I have a button, add gameobject, I click on a button, updates firebase which in turn adds the object to the scene ? Any pointer?

fickle geode
#

(my server code for example is only 140 lines in NodeJS)

brazen prairie
#

that sounds great

#

any security problem?

#

idk what it could be but thinking that firebase and photon already secure

heavy pelican
#

Sorry are you talking to me ?

fickle geode
#

(no me)

brazen prairie
heavy pelican
#

Oh ok lol

brazen prairie
#

was reading your message tho

fickle geode
#

so weaglf, my thing was, I wanted to roll a custom UDP implementation for the hobby programming aspect of it, so yeah, it's going to have loads of problems with security, although once I get the first hacker to play my game I'll be very happy to call my game a success

brazen prairie
heavy pelican
#

No sorry thatโ€™s not what I mean

brazen prairie
fickle geode
heavy pelican
#

Why would I need photon client ?

fickle geode
#

Or well yes OK a custom UDP connection to Firebase

#

also fine

heavy pelican
#

So using Firebase opens a stream and listens for changes, right?

fickle geode
#

I'm no expert on Firebase, but as long as you get a IP and port that a socket is able to listen on, yes

#

now that I re-read your message, I think actually you might actually be fine doing a TCP implementation if it's all happening on the same network

#

and things are not super fast

#

well you know, i'd actually recommend talking to somebody that has experience with Firebase

weak plinth
#

What's a good design pattern to follow when writing a dedicated game server for an already existing game? The game uses nothing but TCP.

thin jackal
#

is "DOTS netcode" and "netcode for gameobjects" the same thing?

spring crane
thin jackal
spring crane
#

Well the delays in ECS has probably allowed them to focus on the version of NetCode that is most likely going to be used by 90% of users for the next few years ๐Ÿ˜›

dim plover
heavy pelican
#

Could someone help with the best practice to implement this multiplayer logic, i have a VR scene which is highly detailed.
I want to be able to create a separate scene, let's call it planscene that is just a simple plan of the VR scene, with a cube that represents the location of the user.
I also want on the plan scene to see the movement of the player in real time.
Also, I want to be able to say add a tree, so on my plan scene I click a button which shows me a green cube, i position it and then click deploy and a real tree is displayed in the VR scene.
So I basically I need server-client communication but i want my plan scene to be very lightweight as it doesn't need all the detail of the VR scene.
so what is the best way to achieve this
Unity Netcode
Unity with Firebase, connect the firebase backend to a website
Create a socket connection which is then connected to an external website
Any ideas?

austere yacht
# heavy pelican Could someone help with the best practice to implement this multiplayer logic, i...

with NetCode for GameObjects, the simple way: make it both the same scene and have all objects (incl. netobjects) have two views one for the real view, one for the map view. give your clients a role (think classes in an RPG), maybe through a NetworkVariable and toggle either view depending on their role. I assume you mean light-weight in terms of rendering not in terms of network traffic. To limit traffic you can implement/use network visibility on top.

heavy pelican
#

yes but I also mean lightweight in terms of build size, if i follow your logic both server and clients will be same size, but that would not be practical

austere yacht
#

theoretically you could use addressables to load the assets from different sources, one low quality/simple, one high quality/detailed... build will be the same for both (but only shared assets are shipped), then the clients will only download what they need depending on their role or launch options.

heavy pelican
#

ok thx, will read up on it

austere yacht
#

it should actually be quite simple to do... but not trivial

heavy pelican
#

really, i've never used addressables

austere yacht
#

its a bunch of complexity, and I'm only speaking from what they can do potentially, i haven't built a system like what you describe myself.

heavy pelican
#

k

#

so would a socket connection not be better, so if a move my player that sends the vector3 to my backend?

austere yacht
heavy pelican
#

thats the prob, networking side is kinda new, i can do the above using netcode but not sure how to create a detailed and scaled down scene

austere yacht
#

netcode is just a socket connection, a sophisticated transport layer to handle reliability and a few abstractions on top

heavy pelican
#

yeah need to start doing some digging, thx for help

austere yacht
#

you can easily do the abstractions yourself, the transport is more tricky and there are very well made/established solutions for you to use

heavy pelican
#

ok thx

gleaming prawn
austere yacht
# heavy pelican ok thx

if you want to get stuff done, use either Mirror or Netcode for GameObjects, some like to use Photon (can't say anthing about it) a sales guy from them will probably reply here eventually ๐Ÿ˜‰

heavy pelican
#

thx guys

austere yacht
#

Mirror has way better documentation

heavy pelican
#

every little helps ๐Ÿ™‚

austere yacht
#

you're also not a sales guy ๐Ÿ˜‰

gleaming prawn
#

All in good spirits

#

Gaffer on games and Gabriel's blogs are good resources for how things should be done properly for client/server architectures.

#

If that is the stuff you want, I can suggest you to take a look at photon fusion (from our stuff), as it implements all these things turn key

#

I'll also be live coding with it in 5min btw...

austere yacht
#

didn't gabriel use to be the only resource on the internet that contributed anything of substance?

gleaming prawn
#

Glenn Fiedler blog (gaffer) is also good

tepid prairie
#

Does anyone know of any good resources on crossplay networking for Unity? I am eyeing Lobby, but I don't know if it will be crossplay compatible. I want to support PC and XBox playing together at least.

#

Any information about cross platform anyone can give me would be very useful

sharp axle
#

Unity Lobby service should be cross platform but I can't find anything explicit. Azure Playfab does have cross play matchmaking

tepid prairie
#

Thank you very much for the response, I'm going to give lobby a shot and see how that works out

tepid prairie
#

In the game lobby sample for Unity Lobby, I get the following error

#

I have ensured that I have signed in under services and have generated a project ID, set under my organization

sharp axle
normal dust
#

So, open world using MLAPI. I have players scattered around world activating enemies around them. I'm suppose to use .Spawn() but I don't want enemies active to all players if they are not close by. What do I do?

austere yacht
normal dust
austere yacht
normal dust
#

Host is the server, so Server Sharding?

austere yacht
#

youโ€™d just update at higher frequencies the closer a client gets

austere yacht
rapid horizon
#

Hello. Can anyone help me with multiplayer driving with mirror, Something like a car maybe ...

normal dust
normal dust
austere yacht
#

depends very much on what exactly you need to sync and how often.

normal dust
#

All I have is player, enemies. Everything else is sync when you open a chest or build something at the moment it is done.

austere yacht
#

Implementing regular network visibility based on proximity will do fine

normal dust
#

any tutorial on this you know of?

austere yacht
#

Itโ€™s a concept

normal dust
#

can you give an example?

#

So server side checks proximity, if close enough, then send to client?

#

is this what you mean?

austere yacht
#

yes

normal dust
#

ok, thank you ๐Ÿ™‚

normal dust
# austere yacht yes

oh wait, so i still use .Spawn()? How do I make them invisible after I check proximity?

#

or maybe enemies are just always visible so no worries

austere yacht
normal dust
#

even if i SetActive(false). wouldn't it still send info over the internet?

austere yacht
normal dust
#

Thanks again, I understand

austere yacht
#

its sadly something that has to be fundamentally integrated into the network stack to work properly, but its a common problem so most libraries feature some version of it.

normal dust
#

Yea so I have a sphere collider around player that activates enemies. I don't have to check player distance. I just use what you sent, just activate on server side. I get it now ๐Ÿ™‚

normal dust
austere yacht
#

only the server needs to sim the physics, clients can just get updates via transform

normal dust
#

Thank you so much!

tepid prairie
tepid prairie
#

Well, since I can't seem to get Lobby & Relay working, I wonder, is there a way to allow players to browse a server list, join, and host without me having to pay for a server?

#

I've been looking at Mirror but I don't know where to start. I just need player hosted lobbies and the ability to browse and join those lobbies

teal obsidian
tepid prairie
#

So a server is absolutely required to help connect players to one another without directly knowing the others IP?

teal obsidian
#

I would say yes

tepid prairie
#

Man, it's hard to start out with networking from what I've seen. I don't have much right now to be spending, I was hoping the funds for larger scale networking could come later..

teal obsidian
#

Is it like a co-op game?

tepid prairie
#

Yeah it's an open world adventure game where you can be any creature that you want to be

#

I'm not new to programming, but I am new to networking, so this area is very complex and unclear for my mind currently

teal obsidian
#

If you don't want players to cheat, you'll need a server running the same simulation as the game, and the clients will talk to that server for the entire duration of the client session

#

also known as server auth

#

there's lots of third party services that pretty much do everything internally for you

#

photon is one of them

#

games like GTA don't do server auth, which is why players are able to turn other players into ATM machines, kill everyone at once, crash people's games, kick people at will, etc

#

Payday 2 entirely client auth as well and since its a co-op game, I haven't found many issues with hackers ruining the experience and I have well over 200 hours in that game.

tepid prairie
#

Thank you very much for the info. I think I'll do some more research and maybe sleep on it

#

I like the sound of photon, doing the internals for me so I can get to developing the game

#

I'm a lone programmer so simplicity is really nice

austere yacht
#

Players would find open games with that api or publish their running host to it.

gleaming prawn
#

Fusion implements full server authority + tick accuracy + lag compensation + client side prediction, all out of the box.

#

You can use fusion to implement a "lobby" as well, there's no need to mashup different libraries.

tepid prairie
#

I have actually been looking at photon realtime because they boast crossplay

tepid prairie
austere yacht
#

photon will take care of many things but won't take care in the sense that you still have have to learn the API and implement some stuff yourself... it is still pretty involved making a multiplayer game, Photon (via @gleaming prawn) is quite available for 1st-party community support. Mirror/Netcode have their own dedicated discord servers and offer some 1st-party support aswell. Maybe make a formal comparison of all libraries/products and their support/community specific to your needs. Its a decision you will not want to change when you are halfway done with your game.

austere yacht
tepid prairie
#

I figured making this game multiplayer would be a good bit of work. I'm prepared to learn a new API, I guess the main thing holding me back is knowledge of how networking actually works and what API would be best

austere yacht
sharp axle
austere yacht
#

its generally a bad idea to rely on beta stuff that unity tech. makes unless you are prepared to rewrite everything that relies on it

#

especially in regard to netcode where unity seemingly hasn't made up its mind yet

sharp axle
#

The Relay Service is meant for P2P architectures and is currently capped at 10 players per match

austere yacht
#

relay is not a lobby

#

a lobby is for finding relays and other public servers

sharp axle
#

Correct

austere yacht
#

a lobby is something completely separate from the main focus of multiplayer networking libraries, it is just that many of them have an example of a lobby implementation for you to use

sharp axle
#

Unity has a Lobby service in addition to a Relay Service. They can be used independently of each other

tepid prairie
#

I tried to use lobby but for some reason I cant connect, it returns an error. I even quadruple checked that I set everything up according to documentation, signed in, had ID, and enabled the services

gleaming prawn
tepid prairie
# gleaming prawn thanks Anikki. Nothing to add. As said, feel free to poke me with specific quest...

Are you a part of the photon team? Do you think I am being reasonable/realistic with what I want to do? I want to design or (possibly) procedurally generate terrain which would have the same generation for each client if so, but it will be an open world with preferably between 30 and 100 players. I would like to only send and recieve data to those nearby and, if possible, have a sort of networking level of detail system where farther players are synchronized in a rougher, less accurate manner (every other frame, cull animations or physics after a certain point, etc)

gleaming prawn
#

I am one of the engineers of both Photon QUantum and Photon Fusion

tepid prairie
#

Does photon fusion support crossplay between different platforms? That's another important one for me. That will be a big point of this game to connect friends and family together

gleaming prawn
#

I want to design or (possibly) procedurally generate terrain which would have the same generation for each client if so,
You can do these things, using a synced seed, and assuming you know how to make your gen deterministic (more or less)
preferably between 30 and 100 players.
From our stuff, go for Fusion. It's rated (realistically tested by us engineers, not marketing fluff) for up to 200 players (at full 60 ticks per second, not slow pace) in client-server mode with full server authority.
I would like to only send and recieve data to those nearby and, if possible,
This is called interest management. Fusion has 3 builtin methods for interest management, including AreasOfInterest (which is what you normally use for distance based culling).
Does photon fusion support crossplay between different platforms?
Yes

#

So these are all reasonable...

#

But remember, it's like others stated to you:
developing a multiplayer game is not easy

#

SDKs like ours (or others) may help you more or less with the necessary things, but it's still something you need to work to get right.

#

That said, feel free to ask any technical question.

tepid prairie
#

Thank you very much for your responses, I will probably try fusion out very soon. I have an apples and oranges type comparison question, but I figure I'll ask it anyways: if I am able to do stuff like bounding box voxellized buoyancy, greedy meshing, full rigidbody physics character with animation states, and multithreaded procedural generation, do you think I will be able to tackle this task as well? Everyone seems to make multiplayer sound like a crazy task that is insanely hard to accomplish and it feels a bit deterring. I'm hoping its not actually as hard as people make it sound...

dense hedge
#

the notoriety is greatly exaggerated

sharp axle
#

It's not crazy hard. But it's harder than most people think.

mortal horizon
#

it can be done, procedural world networking difficulty is very exaggerated as joy stated, its really just syncing seeds and making sure your generation is deterministic

gleaming prawn
#

do you think I will be able to tackle this task as well?
1 - as others said, you may be exaggerating in the "requirements" a bit... you can pull it off without all that.
2 - as for the question itself, only you can answer...:)

barren onyx
#

Has anyone ran into a VSCode issue using Mirror? I cannot understand why VSCode cannot resolve any of the keywords, tags, or attribute from Mirror plugin. Unity does not complain any issue regarding of the VSCode's false positive message. Yes Mirror does have a *.asmdef file, and yes I've regenerate Csproj solution four times. Do not know where else I can look into but ask this problem here. I had other project that uses the exact same plugin and doesn't show the false positive in VSCode. I feel like I may have to delete the library folder and rebuild it all again.

Any recommendations on what I can do to get this VSCode false positive fixed and referenced?

weak plinth
#

how would I fix this?

fickle geode
#

i've had success after adding new packages to go to the unity preferences -> external tools -> regenerate project I think

#

(not specific to that error though, but in general)

weak plinth
#

I fixed it before but I forgot how

#

It was something to do with how it was assembled in Assets

grizzled moon
#

Hey,
does anyone of you guys works with the new malpi and can help?

Problem: I have ship in warter. On Server-Side everything is smooth and fine. The Client-Side has big jitter-Problems. Can figure out why.

regal delta
#

could be tick rate stuff. have you looked at tom weiland's tutorials?

grizzled moon
#

I got the floaters from him but the rest is scratched together somewhere else. Should the tick rate be higher?

grizzled moon
#

This are the server updates

tepid prairie
#

@gleaming prawn which one do I download for Fusion?

gleaming prawn
#

Yes, the one from docs

#

Console support will be added still this year.

tepid prairie
#

@gleaming prawndoes master server work the same for Fusion and Realtime?

#

I don't see much documentation for master server on Fusion

#

Oh, I see, it's referred to as matchmaking. Sorry! I'll try to figure more out for myself from here on out. Thank you for the help and advice, I look forward to trying out Fusion

gleaming prawn
#

Check the 101 tutorial

#

Also, you should consider joining our discord

#

Thereโ€™s a lot of discussions there, very active community and all the photon engineers included

tepid prairie
#

Awesome, I think I've got a pretty good start now. I guess I had trouble navigating the documentation at first, my bad for not looking more thoroughly from the start. This looks awesome and actually not that bad, though there is more to it than I'd thought.

lethal tree
#

just realised there's a channel for this

#

does anyone know why this happens with Netcode for Gameobjects

#

I get this when I try to join as a client. Didn't happen before.

strong axle
#

how do i sync up varibles in photon pun 2
i tried google and that said use [PunRpc] and call the function with
PhotonView.Rpc("", photontargets.all, params);
but photontargets isnt a part of photon.
i also tried youtube but the one tutorial i could find used PhotonStream and i have no idea how to use that

grizzled moon
#

Anyone using the new malpi and has a working player transform sync?

opal fox
lethal tree
#

Alright so unity's MLAPI doesn't seem very usable in its current state so im switching to PUN2. My game has deformable terrain, so when a player joins, I will need to sync the terrain changes to them. What is the best way to do this, without exceeding the maximum message size?

fickle geode
#

In a general sense, if a message is too big, a strategy could be either to split it into multiple messages, or somehow compress it, or maybe the players only receives deformed terrain in a certain radius around him, etc

river meteor
#

if so you should be able to use PhotonStream to sync values and this is the most correct way to do that

little ridge
wooden stone
#

anyone know any good playfab-unity tutorial series?

weak plinth
#

Does Unity Relay attempt a NAT Punchthrough first and fall back on Relay if that fails? Or does it exclusively use relays? Need to know so I can choose between this and the new Photon Fusion.

#

Avoiding a relay is preferable for lower latency, but obviously that isn't always possible, which is why I want a relay.

fickle geode
#

Steam claims that using their relay network your average latency will actually decrease due to more efficient routing in their system. So although it might feel counterintuitive, using a relay can result to lower latency (but i'm not an expert engineer, best way to see is to try!)

dusky storm
weak plinth
#

Oh really?

#

Are there any restrictions with that, like accounts and future CCU costs?

#

Looks like the Unity plugin only works on Windows atm, with Mac, Android, iOS and Consoles coming in the future. But I guess they're too big to fail so should be a safe bet. Would that mean that people would have to login with an Epic account to play my game?

dusky storm
#

latest commit mentions android build support, so I guess it works on mobile now too

weak plinth
#

The one you sent me has Android support but not iOS

verbal lodge
weak plinth
#

Didn't think so, thanks

vital hawk
#

that being said, I haven't checked the recent progression on that topic but in past it meant that you couldn't get crossplatform progression, like achievements etc carried over to other platforms if you didn't link to users own Epic accounts, I guess because they simply don't have any public account you can link against then

weak plinth
#

I've taken a short look at the EOS stuff and it's a lot to take in compared to Photon. But I guess that's the price you pay for getting it cheaper.

vital hawk
#

but like, if you only care for single platform or don't need players to be able to continue playing the same save on different platform, you can just use external ID setup with EOS

weak plinth
#

I do kinda want cross-progression though. PlayFab gives that with their account system.

vital hawk
#

then you are forced to require Epic accounts from players if you use EOS

#

(or handle progression on some other service)

weak plinth
#

I am following this tutorial

https://www.youtube.com/watch?v=LH0fLkeV5Q0&list=PLTm4FjoXO7nfn0jB0Ig6UbZU1pUHSLhRU&index=11

But I am having some errors at the end of this video when I clic: "Login" button.

Please Consider Supporting me on Patreon:
https://www.patreon.com/join/635193?

Hello guys.
Welcome to this series, where we will be learning PHP and MySQL so that we can create a backend for our games.

In this specific video we will create the PHP files and function in our Web.cs class so that we can download the items of our users and also t...

โ–ถ Play video
spring crane
kind sundial
#

@grizzled moon Hey, I have working player transform sync. You might want to try replacing "Network Transform" with "Client Network Transform". This solved my problem, but I don't know if it'll solve yours.

eager locust
#

Anyone here who can help me a logic, i am using photon

spring crane
eager locust
#

I am using photon need help with a problem, i want to share a Code to my friend and then that friend join me as a team member and then search for opponent online.
How can i achieve this?

weak plinth
#

Can anyone help me with my problem above?

#

Can I share anyDesk with someone here so that you can see when the error happens? it happens when I clic "Login" button

stiff ridge
# eager locust I am using photon need help with a problem, i want to share a Code to my friend ...

If the players know one another's userID, you could use FindFriend to follow a friend:
https://doc.photonengine.com/en-us/pun/current/lobby-and-matchmaking/userids-and-friends
When you exchange a code outside of PUN (because PUN itself does not enable communication outside of rooms), you can exchange this as room name as well. Tell the other the region to use and the room name to join.
Both users can use JoinOrCreateRoom(code_or_name) and then wait for the other in-room.

#

You can set a room option to create the room as invisible. This prevents others from joining the room by JoinRandom.

analog bear
#

How can I send calls to 1000s of URL and load them asap?
Using coroutine it will be sent 1by1.

ionic hornet
#

but even the local networking is not working on my machine

#

are there any ideas as to why this is not working? Is this a firewall issue?

late swallow
#

hello

#

so, I have a problem with my inventory

#

I wanna optimize it

#

but the item gets created on the server

mortal horizon
#

You need to specify what networking you're using

hasty fiber
#

guys

#

i have a small problem

#

can i get a small help?

#

i use Photon.PUN

#

and i already have an Object with a script attached to.

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

public class ConnectToServer : MonoBehaviourPunCallbacks
{
    void Start()
    {
        PhotonNetwork.ConnectUsingSettings();
    }
    public override void OnConnectedToMaster()
    {
        PhotonNetwork.JoinLobby();
    }
    public override void OnJoinedLobby()
    {
        SceneManager.LoadScene("Menu");
    }

}
#

even with it

#

i cannot join a room...it says:

#

i mean create a room

tame bridge
#

so im having a problem with photon atm

#

I want to load a new scene locally and from the masterclient so it refreshes everything

#

the problem is that the clients seem to load first so they delete the instantiated photonviewers after

#

i actually had this working earlier but it stopped working all of a sudden, any ideas?

#

nvm i got a great solution, i just paused the messagequeue until the scene loaded, then resumed it

safe sand
#

is there networking for DOTS?

safe sand
#

0.6 preview. is there network solution for entitas or other solutions (that not in preview)

olive vessel
#

Pretty sure every official Unity networking solution is in preview right now

vital hawk
#

@safe sand if you care about things not being in preview, maybe indeed look outside of DOTS (where only burst + jobs are released and everything else is in preview)

spring crane
#

Well it does seem that they pivoted to Entitas, which solves that one ๐Ÿ˜„

hasty fiber
#

guys

#

who has 10 min time

#

just a small proble,

#

?

#

call tho

haughty heart
pseudo relic
#

I have got a link that, on my internet explorer, downloads an image directly instead of loading it. How could I get that image in unity?

#

I've tried with UnityWebRequest but it throws this error:
HTTP/1.1 404 Not Found

pseudo relic
#

So, looking at the api documentation, when asking for an image, the api with throw a "HTTP 302" which its a redirection (?)

#

How could I deal with this?

runic rampart
#

How do NetworkObjects interact with child game objects?

#

Are they completely ignored?

#

Can I replicate data on child game objects that aren't network objects but the parent is?

reef jetty
#

matchmaking ig.......

cloud heron
#

Hosting?

opaque lintel
#

Does anyone know any good tutorials for multiplayer?

#

I honestly can't find any for Unity's own multiplayer system

#

Also, Mirror or Unity's own multiplayer system, which is better? I'm considering Mirror now as it has way more tutorials

opaque lintel
#

Are there a lot of tutorials for Fish-Networking though?

#

I'm not extremely experienced hence I need something affordable and preferably free as well as something which has a bunch of tutorials

paper mural
#

Peer to peer.

#

np!

strong axle
#

using PhotonView.RPC(function, target, args) how do i pass a gameobject to the function

normal dust
#

MLAPI NetworkRigidbody. Will this use bandwidth if the object is not moving to sync position?

#

Also is it recommended for enemies with Network Transform to send 20x a second? (this is the default, I was thinking of lowering it to 10x a second.)

shadow spoke
#

Mirror is definitely a good starting point. Despite all the naysayers and negative crap that it gets, it works. May not be the absolute be all end all tool in the shed, but it works, it's supported, it most likely powers an indie game that you've been playing on Steam, works in VR titles including an FPS, etc.

autumn nexus
#

Anyone had much success using Garry's Facepunch.Steamworks library and setting up connections with the master server?

austere yacht
#

Better to have a project fail because your networking library canโ€™t handle the millions of users than to fail because it never gets finished.

deft halo
#

Could mirror do 64 player servers across 3-7 servers?

spring crane
#

I would expect it to do that on one server.

shadow spoke
#

@deft halo To answer your question, Mirror doesn't support "across servers". There is no functionality to link servers together. That sort of infrastructure can get complex very easily, as you have to keep clients on server 2 in sync with activity on server 1 and 3 as well as server 2 activity.

#

Each server also has to keep the other server's world updated, so if a nuke went off and destroyed a town on server 3, then client in server 1 and 2 "know" about it. Even discussing it is starting to throw my head for a loop, it's complicated UnityChanSorry

#

Your game would have to have some specific usage case for cross-server, I understand some MMO games might offload clients into smaller mini-servers that run dungeons and then return you back to the main world server.

#

So I'd probably say please elaborate for a more specific/detailed answer

deft halo
#

Im just trying to create a battlefield like game with 32vs32 on 3-7 servers at a time

glacial garnet
#

Hello! Is there a tutorial/example somewhere on how to do non-blocking sockets? My socket/TcpClient connection works fine otherwise, but it's freezing the whole program while it does its thing, and I'd prefer it didn't. But I somehow can't google how to do non-blocking sockets in Unity.

austere yacht
glacial garnet
austere yacht
glacial garnet
austere yacht
glacial garnet
#

I'm just trying to set the thing you just linked, in Unity, with C#

austere yacht
#

this works for me ```cs
var s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
s.Blocking = false;

#

TCP Client is a an abstraction on top of a socket connection and has no non-blocking mode

glacial garnet
#

Great, I should be able to work with that, thanks for the help. ๐Ÿ™‚

(The problem with my code currently is that it's like var s = newTcpClient instead of var s = new Socket, but maybe I can convert TcpClient into Socket. I'll look into that.

austere yacht
#

what do you actually want to do?

glacial garnet
#

Just send a message (a string) over this kind of socket connection

#

I just wrongly assumed TCPClient has a blocking mode that I couldn't find, that was the problem. ๐Ÿ™‚

austere yacht
#

does that string have to be sent 100 times per second?

glacial garnet
#

Nah, just once. ๐Ÿ™‚

austere yacht
#

and do you have to conform to a specific protocol on the other end?

glacial garnet
#

Hmm, I don't think so.

austere yacht
#

well, do you write both ends?

glacial garnet
#

Yeah, the server is in python and the client is in C#/unity

austere yacht
#

just send a HTTP request

#

python has plenty of very comfortable libraries for that, and you can use UnityWebRequest or System.Net.HttpClient

glacial garnet
#

Fair enough. ๐Ÿ™‚ If you're suggesting rewriting an entirely different approach, then I guess switching from blocking to non-blocking socket wasn't going to be easy like I hoped.

austere yacht
#

well, HTTP does a lot of extra stuff you don't need, but from a getting it done point of view, its probably simplest as it is the most common thing that happens in the world today

#

its not hard, but you have to do everything yourself, read some docs etc. or maybe run the TCP client in a thread and schedule main-thread callbacks... or use one of the many transport libraries like Ruffles, Enet, LiteNetLib

glacial garnet
#

Gotcha, maybe http will indeed be easier then. Thanks again!

austere yacht
glacial garnet
#

Oh, awesome

#

Guess those will be easier to spot once I'll be more familiar with the terminology. ๐Ÿ™‚ I see now that it's right there. (But I was looking for "non-blocking" instead of "async")

shadow spoke
# deft halo Im just trying to create a battlefield like game with 32vs32 on 3-7 servers at a...

Battlefield doesnโ€™t use multiple servers per single match. Battlefield is solely single server, up to X players. Donโ€™t complicate things. Trying to keep server states synchronised between servers is difficult and requires a lot of know-how, otherwise you will desynchronise very quickly.

If youโ€™re going to make a FPS, look into dedicated single server that acts as god, while the clients send commands and messages to the server to perform the stuff on the server. Server Authoritative is the keywords you want. Mirror is server authoritative by default, so it can be a starting point.

I am working on a FPS project that will initially support 16 player matches (8v8), and if I can achieve that, Iโ€™ll scale it up to 20/24/32 player matches.

#

If you want to support extra players, simply spin up another server instance. Server 1 can run at maximum capacity while Server 2 takes the leftovers.

#

Thinking about it, if you wanted 32 players on each of the 3 to 7 server instances, then yes, Mirror can do that. But if you wanted 32 players spread across 3 to 7 servers running the very same game instance, then No. Multiple servers trying to keep each other server in sync is gonna be murder. Especially with lag involved, if you have region specific servers.

#

It has been done before for MMO RPGs, but I have yet to see a shooter that spreads its clients over server shards

austere yacht
calm frost
#

this may seem like a weird question but I've never really done any networking stuff... how does Mirror interact with Steamworks.net/Facepunch? Both have server client commands so I don't get it. Can I just make my multiplayer stuff with Mirror and pass it all over to steam when I'm done?

mortal horizon
quartz plinth
#

yo quick question is there an networking system that can cross platform with unity and mobiles ? if yes how do you call

ornate zinc
river isle
#

Hello.
I'm having an issue with the tutorial for the Netcode thing on unity. Specifically, the Helloworld "client/server/host" only work for "host", not "server/client" (it rely on the spawnManager to provide a player object from a "GetLocalPlayerObject" which returns "null" in the case of a server instance. Which prompts the question : How do I get the clientID in that scenario ? :/

#

nvm I'm an idiot

#

there's no clientID because it's the server instance. doh.

thin wind
#

is there a modern/netcode alternative to NetworkBehaviour? it's listed in the docs as deprecated, but it's also used in the example docs for netcode

sharp axle
thin wind
#

i see now that

#

this is the correct version

#

was just confused for a bit, hahaha

calm frost
#

Anyone familiar with facepunch for steamworks? I don't know, all they have is a documentation of their commands but barely any code examples except for the most basic stuff... but people say it's better than using steamworks.net as that one is using outdated p2p connection instead of steamsockets

#

I can find code examples and tutorials on how to set up a lobby and be able to invite friends to your games for steamworks.net, but none for facepunch

dusky storm
dusky storm
#

TCP in unity is very difficult.
async/await, SAEA, nonblocking methods are all not working well, or not at all.
1 thread per connection is the only solution that scales (in Unity).
outside of Unity, the other methods are way better.

glacial garnet
austere yacht
# dusky storm TCP in unity is very difficult. async/await, SAEA, nonblocking methods are all ...

you just have to explicitly run async code in a separate thread/threadpool to work around the unity synchronisation context that, by default, runs await'ed method calls on the unity main thread. That context also introduces a Thread.Sleep(1) at the end of each scheduled task which causes unexpected performance problems with netcode... all of those things can be mitigated and networking works fine in unity without spawning 1 thread per connection. It is nevertheless a good idea to use a transport layer that has all these things worked out already.

shadow spoke
#

Uhhh

#

Explain the problem

#

Words can be better than video some times

#

Looks like a null reference exception

#

Check your variable/component assignments

mortal horizon
#

No one knows what networking youre using, we cant help

gray pond
#

you'd need to ask in MLAPI (Unity Networking) Discord since that's what you're using.

dusky storm
dusky storm
austere yacht
#

Beyond that I like to verify that stuff people post online is actually true when they have given no explanation

#

That being said, the sync context allows you to do fully custom scheduling and bypass the sync system altogether aswell. Performant netcode does not require a custom sync context, it can just be tripped up by the standard one.

dusky storm
#

@austere yacht thanks!

keen carbon
#

heyaaa,can someone please help me with something?

#

im trying to figure out how to shoot with mirror,but cant find any sort of help at all

#

and im stuck on it since a couple of days

#

can anyone help me?

dusky crystal
#

Does your code for shooting work without networking?

keen carbon
#

yep!

#

the only problem is that i cant find how to make it so the bullet appears for all players

#

also sorry for the late answer,my wifi died a bit

#

but yea,the problem is with instantiating it for all players

rotund rune
#

where can i get help with some photon problems?

covert gale
#

hello

#

i got an error

#

i was playing around with my guns and got this error

dusky storm
keen carbon
#

oh,where do i acces it?

dusky storm
#

asset store - mirror

#

examples folder

#

tanks

keen carbon
#

oooh,found it!!

normal dust
#

MLAPI NetworkRigidbody, will this use bandwidth if the object is not moving?

olive vessel
sturdy juniper
#

Hello. Are there in here familiar using Mirror Networking? I wanna ask about how to do unit test in unity in multiplayer game that using Mirror framework. When I add assembly definition in script folder, there cause a lot of error in the Mirror assembly (maybe). So, any solution of that problem?

#

Error shown like in the picture. There is some problem or conflict in like syncvar, command, etc in Mirror when I add Assembly definition GameAssembly in script folder. Please help.

shadow spoke
#

You need to add a reference to Mirror ASMDef.

#

Like so.

#

@sturdy juniper see above.

#

Alternate solution is to delete the ASM Definitions in Mirror folder, however it's 2021 and you should really learn ASM Definitions and keep your main code chunks out of Assembly-CSharp.dll. For example, your code can be like MyStudio.MyGame.Core or MyStudio.MyGame.ReallyAwesomeModule

#

Refer to the Unity Scripting Manual for more information.

sturdy juniper
shadow spoke
#

The former.

#

Did you install Mirror via Package Manager/Asset Store or did you install it from Git?

sturdy juniper
#

package manager

shadow spoke
#

You shouldn't have a "Mirror.Tests.asmdef" if you're using asset store/package manager release.

#

ok

#

Basically this

#

in your scripts folder, make a ASMDef

#

call it whatever.

#

click it, add under dependencies / references

#

Mirror.asmdef

#

hit apply

#

Unity will recompile. Now the only downside is you will need to have all your code inside a ASM Definition.

#

But that's easy. Just make a scripts folder where all your stuff is stored and one asmdef, then link it up.

sturdy juniper
tawdry star
#

I'm working on the networking for my game. Should I use unsafe code? Is the extra performance worth it?

keen carbon
#

heya guys,i have a problem

#

my bullets only seem to show for the host of the server when i spawn them

#

i've followed around with the examples

#

but it just doesnt want to work

#

can anyone help?

#

im using mirror

#

they seem to spawn for the host

#

but not the client

#

this is the code for spawning the bullet

acoustic latch
#

hi, anyone can help me with unity transport?

i've copy paste the sample script from https://docs.unity3d.com/Packages/com.unity.transport@1.0/manual/samples/jobifiedclientbehaviour.cs.html
and
https://docs.unity3d.com/Packages/com.unity.transport@1.0/manual/samples/jobifiedserverbehaviour.cs.html

edited some line (because somehow it broke up on IJobParallelForDefer so i use IJobParallelFor instead) and upload the server with linux build to my Digital Ocean (Ubuntu).

then i got this warning (attached) and no messaging works. theres no error.

this only occurs on the server. if i test it on local (127.0.0.1), it works perfectly

rapid horizon
keen carbon
#

Rpc?

rapid horizon
#

sorry i have a hard time explaining things to people

#

that's just the way am built

#

Can anyone help me with making NPC over the network

#

using mirror . . . . .

keen carbon
acoustic latch
#

but the warning persist

#

its kind of annoying tbh

rapid horizon
shadow spoke
#

Depends on what the NPC needs to do

#

if you want to have it wander around, make sure you run its logic on the server, NOT on the client. Mirror has mechanisms for that.

#

Please be more specific when it comes to networking questions. We don't know what you want the NPC to do over the network ๐Ÿ™‚

mental python
#

Hi, I need help getting a game to run on an old version without it updating. Me and my friends have 2018 files for Star Stable Online and are a team going by as "Star Stable Archived" with a website in the making. The game only runs on the PXRouteruntimeMMO.exe file but the launcher seems to be broken. We wanna get it to run without it updating to the current version

shadow spoke
#

Old version of what?

#

If youโ€™re trying to reverse engineer an existing game to keep it alive, then this can actually be a violation of the games terms and service or EULA

#

If you are going to want to block the updater stuff, Use something like WireShark or a process monitor to study itโ€™s endpoints and just set it to localhost in your hosts file. That way the game canโ€™t phone home and upgrade. But to me unless that game is a unity game, youโ€™ve stopped at the wrong station.

frail sorrel
#

@shadow spoke Sir, you seem knowledgeable -- I'll pay you 30 bucks if you can help me fix an issue with my project

#

After changing scenes using ServerSceneChange() my player object not only has all his references broken (despite appearing fine in the editor), but also loses client authority (despite being checked in the editor)

shadow spoke
#

What framework is this?

frail sorrel
#

Mirror -- Steamworks

#

I've looked at this for hours now without even understanding what can possibly cause it

shadow spoke
#

How is the character being spawned? Is he being despawned on scene change, then respawned? Or is he being put into DDOL? If youโ€™re using DDOL for characters then that is no bueno

frail sorrel
#

Despawned on scene change, then respawned

#

Verified by debug.logging the spawn as well

shadow spoke
#

Okay, so basically destroyed and then recreated?

frail sorrel
#

Yes

#

Working completely fine on the scene change from offline to online

#

But when you change scene after that you get missing reference exceptions on everything

shadow spoke
#

OK. So by references, what do you mean? Links to input manager, etc?

frail sorrel
#

Yeah you could say that

#

But they are very clearly visible in the inspector

#

And can even be clicked to prove they link up correctly

#

I'm like 18 pages deep into google trying everything lol

shadow spoke
#

Hmm...

#

This is a tricky one, I'm trying to think.

#

So you use references that you explicitly set yourself

frail sorrel
#

Yes, and they appear just fine in the hierarchy in the inspector during gameplay

shadow spoke
#

I assume you don't use like senpai = GetComponent<Senpai>() or anything in your code

frail sorrel
#

Nope, these are manually set references

shadow spoke
#

Does this happen on both client and server? Or one or the other?

frail sorrel
#

That are nested in the object itself

#

Both

#

I'm certain that there is a deeper reason to this error than just face value

#

It's not like I'm brand new to this

shadow spoke
#

You don't have any NetworkTransformChild scripts?

#

I'm racking my brain here

frail sorrel
#

No, just the default out of the box solution

#

Like in my head

#

There should be no way I'm getting a missingreferenceexception

#

When I can literally see the correct reference in the inspector

#

and click it

#

and it links properly in the hierarchy, even

shadow spoke
#

Exactly - I'm concluding the same

#

From what you showed me

frail sorrel
#

Code is just health < 0 PlayerDeath() so nothing complicated there either

#

Like 4 lines of code

shadow spoke
#

Yeah, and I assume health is causing NRE ?

frail sorrel
#

No, that apparently links fine

#

It's seemingly random references

#

Some text in the gui, some scripts here and there

shadow spoke
#

What version of Unity?

frail sorrel
#

So obviously there is causality and there is a reason behind it

#

2021.2.3f1

shadow spoke
#

Ah, Unity 2021.2

frail sorrel
#

Last time I had a conundrum like this it was literally just a fatal error with Unity

shadow spoke
#

I'm on 2020.3 LTS and have yet to have it be spaghetti like that

frail sorrel
#

And I was told to upgrade to fix the issue

#

Submitted fully reproducable bug report too

shadow spoke
#

but that actually seems to make it worse?

#

ah nice

frail sorrel
#

No, worked fine until now

#

The issue was completely different though

shadow spoke
#

Ah

frail sorrel
#

Despite documentation saying terrain supports 4+ layers in URP

#

You'd get fatal memory leaks only solveable by rebooting the computer and you'd soft lock your project

#

Occasionally brick it too

#

So it would be completely ruined

shadow spoke
#

Yikes

frail sorrel
#

100% reproducability too lol

shadow spoke
#

Ah, Unity... as much as I love your engine please pay the QA devs more to fix these bugs before they make it into gold releases of Unity

#

Ahem

frail sorrel
#

Ok, idk exactly what I can do about this issue but I really appreciate you taking time to help me try to troubleshoot

shadow spoke
#

One final bullet in the chamber, though... What I would do, just to rule out Mirror being janky with commit that broke it, is downgrade it to a few versions before. I know Package Manager doesn't let you do this but you could grab like Mirror 46.x (which is what Mirror LTS is based on) and try that

#

But from what you describe

#

I don't think Mirror is at blame here. I think we're stepping on land mines and they're just delayed explosions

frail sorrel
#

I can try to comment out any netcode and see but

#

lol

#

I fixed it looks like

#

Deeper into google than a dwarf in Moria

shadow spoke
#

What, talking about it fixed it?

frail sorrel
#

Apparently there is a guy

#

in 2016

#

That had a remotely similar problem

shadow spoke
#

If that's the case then goddamnit Unity, stop becoming sentient

#

Oh?

frail sorrel
#

Like the literal exact same problem as me

#

And turns out it's delegates that are the problem

shadow spoke
frail sorrel
#

Despite me using Debug.Log and it only actually prints once

#

Literally checked this

#

Need to manually remove the delegates

#

Before object is destroyed

#

Ever heard about this?

shadow spoke
#

Kinda ran into it myself when using event related stuff

#

BUT

#

not on the severity like yours

frail sorrel
#

What was the case for you?

shadow spoke
lean anchor
#

i have a problem.
im using the photon 2 and i have the player prefab have a camera since this is an fps game.
i wish to find a way to assign the camera to each player

shadow spoke
#

I've seen a lot of kits do this on the Asset Store and it is smart to do so.

#

If a camera was a child of the player object, then you will spawn another camera and that will double/triple/quadruple.... the camera draw calls since a full camera is drawing on top of another, etc.

lean anchor
shadow spoke
#

An anchor point is simply a empty gameobject at a XYZ position in your object

#

For example, for "body awareness" FPS games, the camera is around the head area, usually 0.075 - 0.15 units "in front" of the body mesh

lean anchor
#

ok, and i guess i can add the anchor point a script to rotate it and because the camera is attached to it it will rotate aswell, am i correct?

shadow spoke
#

Yeah. So you set the camera as a child of that new anchor point. It's position then becomes 0,0,0

#

so it'll follow the position/rotation of the parent

lean anchor
#

ok then, now, how do i make sure the local player camera attaches to the anchor point?

shadow spoke
#

Simple. You'd make a script that references the camera ONLY if it's the local player.

#

You'd ask PUN2 if that object is yours and if so, do something

lean anchor
shadow spoke
#

Are you spawning the camera via script?

lean anchor
#

i thought im not supposed to spawn any cameras?

shadow spoke
#

What do you mean?

lean anchor
#

you said i need to only have 1 camera because it is the oh wait i get it now that i can hear myself saying it

shadow spoke
#

You keep one camera in your scene, and just attach that to your local player

lean anchor
#

basically i can have 1 camera in the middle of the scene

#

but then how do i assign the camera to the reference since i cant use GetComponent<>();

shadow spoke
#

Okay so

#

Usually in a scene you have a camera that's the "Main Camera"

lean anchor
#

yes i know i can use if(view.IsMine)

#

but what do i put inside it?

shadow spoke
#

I'm going to write this in Mirror-style networking, because that's what I am most fluent in, but I am confident you can understand and adapt it to PUN2.

lean anchor
#

ok

#

basically just tell me how to reference the camera ONLY if it's the player's view

shadow spoke
#
Camera TargetCamera;
GameObject Anchor;

// This, in Mirror, is called only if it's local
// Can't remember the exact name, but it's like OnStartLocalClient or OnStartLocalPlayer something idk
private override void OnStartLocalPlayer() {
  TargetCamera = Camera.main;

  if(TargetCamera == null) {
    Debug.LogError("Is there really a camera in this scene?");
    return;
  }

  if(Anchor != null) {
    targetCamera.SetParent(Anchor);
    targetCamera.transform.position = Vector3.zero;
  }
}
#

so I guess in PUN2, you would wrap that code into a isLocalView check in whatever function, maybe in Start or some PUN2 initialization callback

lean anchor
#

i can then use the update method to rotate it

shadow spoke
#

yeah.

#

We call this setup a "Camera Rig"

#

That's the technical term

lean anchor
#

im gonna need to learn more about isLocalView but so far this sounds briliant

#

thank you, i will add your name to the list of people from this server who helped me

shadow spoke
#

No worries. Networking journey is a long one, just remember to ask for help when you need it.

lean anchor
#

i kinda wanna finish the project before saturday but the game is pretty simple (after that all i have to do is implement teams a timer and im done)

lean anchor
#

hello

lean anchor
shadow spoke
#

Uhh

#

I am not familiar with PUN2's system

#

I guess I could take a look at a quick written PUN2 tutorial

#

but basically it would be a script that has PUN hooks

lean anchor
#

i mean for starters im not sure what object should have the script you gave me

shadow spoke
#

The player

lean anchor
#

what part of it?

shadow spoke
#

Stick it on the root

lean anchor
shadow spoke
#

Yes.

#

ie.

#

The one where you usually put your character controller scripts, etc

lean anchor
#

can you please explain in more details so i can visualize it in my head?

shadow spoke
#

Fine, let me load up Unity again

lean anchor
#

i am sorry i do not mean to cause annoyance im just not sure on the implementations

shadow spoke
#

that's where the script would go

lean anchor
#

i know where to put it but not really sure what to put in the script

#

for starters i dont know how to use a quaternion to reset rotation

shadow spoke
#

If you don't know the basics of that...

lean anchor
#

ok thank you

shadow spoke
#

I honestly recommend brushing up the basics of unity, like quarterions and stuff

#

Making your own camera can be a pain in the butt

lean anchor
#

i kinda need this before sunday

shadow spoke
#

just thought of a easier solution

#

actually no

#

disregard that

lean anchor
#

what was that

#

please im still in confusion

lean anchor
shadow spoke
#

Let me ask you this

#

Do you have any code at the moment that works with PUN2?

#

If the answer is no... then ๐Ÿ˜

#

By that, I mean any network related code, such as but not limited to, movement et al

lean anchor
lean anchor
shadow spoke
#

I wrote this on a whim, I don't know PUN2 enough off the top of my head to dive deeper.

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

public class LateNightHelpingUnityDevsInADiscordChannel : MonoBehaviourPunCallbacks {
    #region Configuration

    [SerializeField] private GameObject cameraParentTransform;
    private Camera attachedCamera;

    #endregion

    private void Awake() {
        if(cameraParentTransform == null) {
            Debug.LogError("The parent transform to attach the camera to is not assigned.");
            enabled = false;
            return;    
        }

        if(Camera.main == null) {
            Debug.LogError("There is no Camera tagged as MainCamera in your scene.");
            enabled = false;
            return;
        }

        attachedCamera = Camera.main;
    }

    private void Update() {
        if(!photonView.IsMine) return;

        if(attachedCamera != null && cameraParentTransform != null) {
            attachedCamera.gameObject.SetParent(cameraParentTransform.gameObject);
            attachedCamera.transform.position = Vector3.zero;
        }
    }    

}
lean anchor
#

i can manage that.
if its night for you then please go to sleep, your health is more valuable lol

lean anchor
shadow spoke
#

Try attachedCamera.gameObject.SetParent(cameraParentTransform.gameObject); to attachedCamera.transform.SetParent(cameraParentTransform.gameObject);

lean anchor
#

ok wait

lean anchor
shadow spoke
#

remove the .gameObject part of the stuff in the ( )

lean anchor
#

ye im dumb i didnt see that part lol

#

should i drag the main camera to the "camera parent transform" slot?

lean anchor
shadow spoke
#

it's the location where the camera should be

lean anchor
#

so should i drag the anchor?

shadow spoke
#

ie. the dummy gameobject

#

yeh

lean anchor
#

ok wait i will give it a try

lean anchor
shadow spoke
#

It's already got a tag

lean anchor
#

i didnt see it dear gosh im dumb today

lean anchor
#

this is in play mode

#

the camera is not in the transform of the anchor

shadow spoke
#

show me the heirarchy please

#

I've got limited time before I sleep

lean anchor
#

ok

shadow spoke
#

try changing the vector3.zero in the position assignment to attachedCamera.transform.position

#

unity is probably faffing around

lean anchor
lean anchor
shadow spoke
#

okay, let's try changing it to new Vector3(0,0,0)

lean anchor
#

shouldn't it be Vector3(0f, 0f, 0f)?

#

if i remember correctly vector3 is a float (i mean not a float but it recieves floats)

lean anchor
shadow spoke
#

should be fine either way

lean anchor
#

but it doesnt work though

shadow spoke
#

i have no friggin' idea then

#

and my brain is too tired to try to go deeper

lean anchor
#

ok sleep then

#

youve done great help

shadow spoke
sturdy juniper
#

hello, i wanna do unit testing in unity that implement mirror for networking. But, when I call function that derive from NetworkBehaviour, there is error like this. So, any solutions?

#

please help, thank you

#

function that I called is roomUI.UpdatePoliceCount(1);

lean anchor
# shadow spoke <:UnityChanThumbsUp:885169594808029275>

you're probably sleeping but i just want you to read this when you wake up:
You're amazing!
I figured out the problem, i should have been setting the transform.position of the camera to the anchor.
i will now test this in multiplayer.

sturdy juniper
#

this is the function. I make that in class that derived from NetworkBehaviour

shadow spoke
#

For better help regarding Mirror please use the Mirror discord

sturdy juniper
#

where the discord?

#

I click the link but that was not found

lean anchor
shadow spoke
#

@sturdy juniper Check the sidebar on https://mirror-networking.com. I am not going to link the invite URL directly as I could get flagged for spam and I don't want that ๐Ÿ™‚

#

@lean anchor Will do. Have a good rest of your day ๐Ÿ™‚

lean anchor
#

๐Ÿ™‚

lean anchor
#

i have a problem.
i cant sync animations in the PUN 2 networking because i need to have the Photon Animator View component on the parent object that has a child that is animated

#

i want to sync the animation of the child however when i add the component to the child it doesnt sync

lean anchor
#

I have a problem

#

i managed to set up the animated object as the parent but now the animation sync straight up doesnt work

lean anchor
#

nvm found solution just set it to continious instead of discrete

cunning sluice
#

Steam doesn't have their own multiplayer solution right?

sturdy mountain
#

If anyone is interested in evaluating a new multiplayer solution that is easy like photon, but fully server-authoritative, send me a note. We're letting people try it out (at no cost, in case you were wondering) while we're finishing up some stuff.

Basically it's a system that lets you build multiplayer games on a custom back-end from Unity. Deploying and running your online code takes a couple of button clicks.

The server-side API offers full orchestration functionality (ie. rooms can start/stop/callRPC other rooms etc.). Also, it can sync an insane amount of dynamic objects at very low bandwidth, full state syncing, built-in prediction system, full 3d server-side kinematic physics, and will work with web/PC/mobile/console targets out of the box, with crossplay if you want it - all of this is working right now.

We've been using it to build some games and tools of our own - Scene Fusion for example. We're at a point where we can start letting other people try it out.

If anyone is interested, shoot me a DM.

dusky storm
dusky storm
kind sundial
#

I'm using Netcode for GameObjects and Relay. When a client connects to the host (me), my computer crashes and I get a blue screen.

#

I'm not even sure where to begin to identify the issue.

shadow spoke
#

If you get a BSOD from a network library then something is seriously wrong

#

Maybe also temporarily disable your security (Windows Defender, Norton, whatever) just for a few minutes to see if that's causing a problem

#

Windows can be super janky when it comes to random crashes

kind sundial
#

@shadow spoke I looked up the BSOD stop code that it might be related driver issues. I disabled my VPN and now my client is able to connect without a BSOD. :)

shadow spoke
#

Oh yeah

#

VPNs and game development can be problematic

#

They are a valid use case (ie testing latency), but I personally only recommend using them if you have a remote server, instead of going your PC -> VPN -> Relay -> back to your PC

kind sundial
#

It didn't occur to me that it could be an issue, but I'll keep it in mind now.

shadow spoke
#

90% of the time VPNs are fine

#

but it really depends on the quality of the VPN product, some VPNs are great but have really crappy client drivers and software

#

And all it takes is something to run stuff through a code path that hits a crappily coded section of the driver/software and boom, BSOD. Especially kernel level

#

Something dies unhandled in Windows kernel? BSOD. At least on Linux you'll get an "Oops!" warning and that module gets unloaded

#

But that's nerd talk

kind sundial
#

tell me more about these kernals.

shadow spoke
frosty crystal
#

Hey!

#

I try to get values from DynamoDB through Lambda by using API Gateway.
I managed to get data defined only if they are string.
When I make nested classes and try to get the whole structure, I could not define.

#
    public class Restaurant
    {
        public string Id { get; set; }
        public string RestaurantName { get; set; }
        public string Phone { get; set; }
        public string City { get; set; }
        public string RestaurantSlogan { get; set; }
        public string Email { get; set; }
        public List<Catalog> Catalog { get; set; }
    }

    public class Catalog
    {
        public string CatalogName { get; set; }
        public string CatalogID { get; set; }
    }```
#
        public async Task<Restaurant[]> GetAllRestaurants()
        {
            ScanResponse result = await _amazonDynamoDb.ScanAsync(new ScanRequest
            {
                TableName = "test"
            });
            if (result != null && result.Items != null) {
                List<Restaurant> restaurants = new List<Restaurant>();
                foreach (Dictionary<string, AttributeValue> item in result.Items) {
                    item.TryGetValue("Id", out var id);
                    item.TryGetValue("Catalog", out var catalog);
                    restaurants.Add(new Restaurant()
                    {
                        Id = id?.S,
                        Catalog = catalog?.
                    });
                }
                return restaurants.ToArray();

            }
            return Array.Empty<Restaurant>();
        }
    }```
#

how can I get the Catalog value from this AWS lambda function_

sterile gulch
#

trying to integrate steam. how can i fix these

lean anchor
#

i wish to implement a system of teams.

#

i need a way to implement it since im new to networking (using pun 2)

#

how it works is basically i wish to have all players start on the same team, then 2 players randomaly die on that team.
whenever a player dies they change team

#

what i want to do though, is have a different player model for each team

#

and i NEED to have the model for team 1 be the root object otherwise it wont sync animations

keen carbon
#

heya,can someone please help me figure out a fps camera?

#

i've tried to many things already

#

and it just doesnt seem to want to work

lean anchor
keen carbon
#

yea,for multiplayer

#

i'm all ears!

lean anchor
#

first, you only need 1 camera in the scene

#

then, go to the root object of the player and add an empty object at the position where you want to place the camera. call that object "anchor"

#

after that, add these 2 scripts to the root object of the player (assuming there is a main camera in the scene)

#

im going to go somewhere for a few minutes but then ill be back

keen carbon
#

i have something similar to that

#

actually,it would help you if i shared how it work and the code,right?

#

im using mirror btw,for ref

#

one second!

lean anchor
#

i am back

#

i do not know how mirror works

#

i use photon pun 2

keen carbon
#
    {
        if (isLocalPlayer == false)
        {
            return;
        }
        cmdinitiatelook();
    }
    [Command]
    void cmdinitiatelook()
    {
        rpclookaround();
    }

    [ClientRpc]
    
    void rpclookaround()
    {
        float mousex = Input.GetAxis("Mouse X") * mousesensitivity * Time.deltaTime;
        float mousey = Input.GetAxis("Mouse Y") * mousesensitivity * Time.deltaTime;
        xrotation -= mousey;
        xrotation = Mathf.Clamp(xrotation, lookdowndistance, lookupdistance);

        cameraplayer.transform.localRotation = Quaternion.Euler(xrotation, 0, 0);
        player.Rotate(Vector3.up * mousex);
    }


#

oh

#

think you could at least give a idea on it?

#

i can try to give more info where i can

#

the problem that i've ran into and just cant seem to figure out is the fact that the camera rotation doesnt work at all

#

either all players can controll it for other players too

#

or it doesnt work at all

#

the left-right works perfectly fine either way

#

just looking up and down

#

and honestly,i've kinda hit the bottom of the idea barrel on my side

lean anchor
#

im not really sure how that works im burnt out rn so bad

keen carbon
#

it's allright,you dont have to answer to it if you dont feel like it

lean anchor
#

yeah its fine

keen carbon
#

its mostly if anyone using mirror has figured it out .,.

gray pond
keen carbon
gray pond
keen carbon
#

i was saying in dms,but allright

frosty crystal
#
 "Resources": {
    "GetRestaurants": {
      "Type": "AWS::Serverless::Function",
      "Properties": {
        "Handler": "backend::backend.Functions::GetRestaurantsAsync",
        "Runtime": "dotnetcore3.1",
        "CodeUri": "",
        "Description": "Function to get a list of blogs",
        "MemorySize": 256,
        "Timeout": 30,
        "Role": null,
        "Policies": [
          "AWSLambda_FullAccess",
          "AmazonDynamoDBFullAccess"
        ],
        "Environment": {
          "Variables": {
            "BlogTable": {
              "Fn::If": [
                "CreateBlogTable",
                {
                  "Ref": "BlogTable"
                },
                {
                  "Ref": "BlogTableName"
                }
              ]
            }
          }
        },
        "Events": {
          "PutResource": {
            "Type": "Api",
            "Properties": {
              "Path": "/",
              "Method": "GET"
            }
          }
        }
      }
    }
#

Hello people!

#

I could not manage to change the "path of the method" for API Gateway. AWS Cloud formation.

#

I put for instance "restaurant" before the '/' but response is 500.

kind sundial
#

Using Netcode for GameObjects, I'm unable to see the walking animation of another client when connected over Relay, the idle, jump, and fall animations all seem to play just fine, but walking around, the other player moves, but doesn't animate.

#

I believe the walking animation works just fine when connected over a local network, but now that I've setup and connected over Relay, it doesn't appear to play the walking animation when the other client walks, you can see your own character walking.

quartz plinth
#

Quick question does connecting unity clients to dedicated server is an networking system that could work on steam

kind sundial
#

An answer to my question above regarding character animations is I think the client needs to manually update the server using RPCs of it's own animation states (which I thought was the job of NetworkAnimator but I think it only works properly at the moment for games that are fully server authoritative). I believe this is accurate, though I might not be describing it entirely correct.

shadow spoke
quartz plinth
#

Ok so it will work

#

Thx

sharp axle
kind sundial
granite yew
#

How can I set a GameObject to my client's player object in photon unity networking?

south grove
#

Hey, anyone have any quick fixes for me? I set up a lobby, received the callback OnConnectedToMaster, and it joins and works just fine locally, with multiple windows after being built.

When I build to WebGL, it stops working, I tried to understand the logs, and even tried calling OnConnectedToMaster manually to see if that would help, but I keep getting
Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.
Would appreciate any help, been struggling for a while lol

plush snow
#

hi, hope is the right channel. any advice about how to validate client data before save match result into external database (for this i can use webrequests, but how to be sure user dont inject modified data?)

it is for a multiplayer game, for example the ranking. the match end, i need to save result and points to the database, avoid any try to hack the data sent.. there's some useful doc/lib/tutorial for this?

thanks

fickle geode
spring crane
fickle geode
#

yeah but be careful with assuming, I'd name my methods the same, and I've never used PUN before!

south grove
#

I think the wierd part is that it works just fine when built to .exe but not to webgl

spring crane
#

Yea don't call the callback manually. It asks you to wait for the callback because by then PUN should be in the appropriate state.

#

I would change the logging levels in Photon settings to be more verbose and make sure the connect methods are called

#

How are you running the WebGL build btw? Nvm, I see the URL.

fickle geode
#

WSS won't work for localhost, you'd need a domain with a valid certificate, I think

you can try WS if that's possible

oak venture
#

Could someone point me to some tutorials, or explain to me how server and clients work? I created a server with playfab/mirror via a tutorial that is hosted on a VM using docker, but I would like some help with explanations regarding for example how playerstatistics are stored and how they are shown on the client. If my played leveled and they wanted to up their stats, I would have to send a request to the server(playfab) and then update the client(mirror) as well correct?

#

From what I understand the client is what the player sees and theserver is where the data is actually stored, so how are those two able to communicate via playfab and mirror?

#

I watched some tutorials from azure playfab on things like creating player data and storing it in the server, but they didnt explain how it would be displayed on the client

twin yoke
#

I do this shit single player only

ornate zinc
rose smelt
#

So well,
I asked this question on Mirror server, but didnt got any answer, so im asking here

Could anyone give me any direction that i could take to achieve it?


weak plinth
#

Who in here is familiar with Photon? I need help with something, but it's going to be a looong long conversation about what I've done so I'll need someone to be able to talk to me through DMs or something so that the chat's not hijacked

rose smelt
#

use Threads

#

Ya know, right click your own message and make a thread
to keep this chat clean but also to give opertunity for some ppl to learn smth new

weak plinth
#

ok good point

weak plinth
#

Photon for a card game help

haughty idol
#

can anyone help me again to fix this problem with mirror

#

I control the other character and not the right one

rose smelt
#

@haughty idol Okay so basically you know, you need some way to identify if the spawned player is remotePlayer or if its localPlayer
for remotePlayer you need different scripts to be disabled and enabled

#

i've had a video from Brackeys but he made it for UNet

#

If you think you could understand the concept and move it to Mirror's one

#

i can give you the link

haughty idol
#

I programed if(islocalplayer) and a return function, but it didn't work

haughty idol
rose smelt
#
if(!isLocalPlayer) return;
#

in the 'LocalPlayer' script

rose smelt
# haughty idol Please give me it

We start adding multiplayer functionality by setting up a NetworkManager and spawning the player on the network.

โ— Download cool Weapons: http://devassets.com/assets/modern-weapons/

โ— Download project (GitHub): http://bit.ly/1JOvQ61
โ™ฅ Donate: http://brackeys.com/donate/

ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท...

โ–ถ Play video
#

here

#

he explains how to disable things

#

but it might be old solution

#

i would suggest you checking how Mirror's recommends it

#

also timestamp if the link didnt worked for you somehow

#

the third response

#

(please do note that im just-a-random-guy who joined day ago,
im fresh and new here too, and i do not obtain knowledge that other ppl do)

haughty idol
#

O

haughty idol
#

thanks ๐Ÿ˜„

inland sand
#

Hey if I am in different scene and join a lobby with different scene, would my game switch to that scene?

slow lichen
#

How to sync walking (moving)? Using NetworkTransform or sync using my custom funtion?

oak venture
sharp axle
rapid horizon
#

how do i make a client control the transform of a gameobject in mirror