#archived-networking
1 messages ยท Page 86 of 1
But you specifically asked about UNet, so I said that
I'm not dropping personal option or anything.
I knew UNET is deprecated, but i believe i can use it still. Since i know it a bit more, i thought i could use it even though it will be removed.
You can
Thank you for the answers though.
but it's FULL of bugs
That the devs of mirror and mlapi tried to tackle at least
UNet = abandonware (in non final state)
Also, it's public that Unity hired the original developer of MLAPI
Ok, i will consider that, do you know a networking solution that can work on steam ? I don't want to go into steam low level api.
Or MLAPI can do that ?
What you should be asking instead is:
- what kind of netcode does my game needs?
If you think UNet (as an API) fits that, then ask these questions targetting Mirror and/or MLAPI (which I'm not one of the devs of)
I do not know the answer. Just guiding you around what actually is at least Useable
Everyone should just use Photon.
Photon itself (on the Unity space) offers 4 very different netcode solutions
IMHO, it's your gameplay (not your personal preference) that defines which option is best
Disclaimer: I'm one of the developers of Photon Quantum
My actual problem is not which solution actually, i wonder if i can create networking without using steam api too much, for steam
Personally i got a group of 20 people to test a game that was hosted with UNet, then Photon and then Mirror. Photon was working the finest.
But still pointing to where you can get info about Mirror, etc, as I never try to "sell" much
I assume by Photon you mean PUN/PUN2 @weak plinth
Yes.
My actual problem is not which solution actually, i wonder if i can create networking without using steam api too much, for steam
You can, of course
All solutions work for most platforms... You asked specifically if they had a layer to work ON TOP OF steam transport...:)
Ah, is there a document that says what to do it, cause i don't know how to.
I mean... For Mirror on top of steam, or MLAPI on top of steam, again: you need to ask in their own discord, check their docs
If you want to try photon (I work there) or other solutions, you do not need to have anything related to steam to use them,
Steam will be "free", assuming your game works well enough with these APIs , etc
BUT, there will always be a lot of setup involved, and you'll need to use Steam's API for matchmaking in that case, etc
So, you need to invest a bit more time into this topic
To get your full answer
I got it thank you, since you are here with photon i want to ask an another question about somehing else as well
Does photon have separate dedicated server for persistent worlds ?
Or how can you push to mmo with headless unity
Considering transform syncs and some other messages, how many players can be online concurrently
@gleaming prawn
Or how can you push to mmo with headless unity
There's no way you can do MMOs with Unity headless instances
Sorry, but I can not answer you questions if that is what you are trying to do
my short answer is: do NOT try do do anything you call an "MMO" unless you have years of experience with mutiplayer games and know exactly what you are talking about.
This idea you can host "mmos" with these basic techs is just not founded in reality
but can photon do it
PUN/PUN2, NO
Bolt, NO
Mirror/Unet/MLAPI, NO (whatever they tell, it just can't)
Quantum, may be good for instance-based small Raids... (which are a small part of mmos)
General overworld CAN be done with Photon Server (modifying the server SDK). This is what ALBION online uses
So, what I'm trying to tell you is:
- even your question does not make much sense yet...:)
By MMO I mean a game with a few thousands, or tens of thousands of players seamlessly moving around a shared persistent world....
This is A LOT more than just doing basic state sync
No one who hasn't made any complete networking titles with some success should even be considering trying to develop an MMO alone.
I expect there is about a 100% failure rate for people trying to pull that off as a successful game, much less a game that actually is ever even playable.
MMO of course meaning a wide range of things. "Massive" can be a bit subjective.
Thank you for answers and your time again, this was just a question to learn about those networking solutions.
I would start by doing tutorials for Mirror and Pun2... if you have zero experience. You can at least then start to speak the language of game networking, and see where the difficulties are.
Once you see where those run into problems, you can start to see why solutions like Quantum exist
@jade glacier ah no, my initial question was to know how to work with steam by not using it completely for the networking
Mirror has a Steam transport.. though not sure how well that works out for people.
But you could start by doing a Mirror tutorial using Steam and see what you learn.
If you take the 3 most recent successful games (made with Unity), they all use very simple networking:
- Among Us (custom relay, similar to photon realtime in architecture)
- Phasmophobia (PUN)
- Fall Guys (custom client-authoritative solution)
Pun is typically the easiest to get rolling and deployed, but there are drawbacks being a fully relay model.
But that is why Pun2 is a pretty popular starting point. Warts and all, it does get you deployed quickly.
Mirror is quick to get rolling with, but you will eventually have to deal with the hosting question. But using a Unity exe as a server opens the door for server auth - which for some game types is a must.
MLAPI is a variation of Mirror (they both are modelled after UNET, which was modelled after another library I am forgetting the name of)
I just want to have one player as host, and let him invite his friends to the game via Steam.
On top of Steam, Mirror should NOT need rolling out servers
Assuming game is fine with running player hosted etc
I just want to have one player as host, and let him invite his friends to the game via Steam.
Give a try to Mirror Steam integration
I will look into it
If you specifically want a player as host (for true server authority) then start with Mirror. If you are going to be mostly client authority and you just need a client as the final authority, Pun2 assigns one client as the Master Client.
Most of what we say here will just sound like noise. Until you have done tutorials and made a semi-working demo for both Mirror and Pun2.
Once you have some experience with those, you can start asking the right questions, and the answers will make more sense.
Thank you.
Hi all! We recently published the second episode of our multiplayer tutorial using Voxel Play and Mirror. Check it out: https://youtu.be/VTYjDz3iEVc
This is part 2 of a tutorial series about creating a battle-royale game using our Voxel Play asset for Unity and the popular Mirror networking framework. I hope you enjoy it - subscribe and stay tuned for future episodes!
In this video we'll learn how to propagate chunk change...
Very cool! @candid flame!
What's a good way to test your netcode locally? I'm imagining something that lets you create a "synthetic" network where different processes can get fantasy ip's and ports.
As it is, I'm able to readily test a single client, but multiple clients from the same machine can't share those ports. As a last resort I can set up a test machine on this network, but this feels like one of those "some smart developer knows about your lazy and has fixed it."
@magic vessel If your machine have enough CPU and RAM, Virtual Machine is often the best to test run your code.
@stable epoch What networking solution are you using
@mortal horizon
Photon, but its more of should i be spawning it from player? Should i have it on the characers prefab? Etc
Has anyone here used the CharacterController together with client-side prediction?
CharacterController seems to be behaving strangely (sometimes the step traversal mechanic which is supposed to be handled by the CharacterController sometimes only works partially (can't climb entire staircase on the server, but works fine on the client) and I cannot for the life of me figure out why the reason for that could be. The input given to the .Move on the server is the exact same as the client
@stable epoch what exactly are you trying to achieve? Are the networked players prefabs the same as the local player prefab? or if theres a networked player in the scene are you using a different prefab?
Hey guys
Could anyone recommend me any free networking framework for unity which is the best and runs well on an low end PC?
mirror @grim goblet
@magic vessel are you hosting the sessions locally? You can connect as many clients as you want from different executables to the host on localhost (I've done up to 4, but no reason you can't do more)
@grim goblet networking related stuff are often not the bottleneck in overall performance
unless you do some heavy prediction work
Hey umm anybody know where mirror docs are?
i cant google it my browswer isint opening
i cant google it my browswer isint opening
@ember thunder change browser
@ember thunder Mirror's discord can be found on the asset store page, along with the link to the docs
I'd link it directly but this discord doesn't permit it.
oh
ik i joind it already
also my game immediately crashes on start(build version)
Hello, I have a problem with connecting both players and redirecting them to a different scene. The problem is that one cannot see the other (probably), namely, my code does not inform the other player that the first is in the room. As a result, both players wait for the opponent to no avail.
Would you mind me to help ?
You should use third party host like http://hatebin.com/ to make your scripts more accessible so people would see them.
Hi, Does LiteNetLib need the server for the client to connect or can I use a custom server written myself?
have someone seem Normal2?
hello, does anyone know whats the system called for the lobby code generation which can be seen from Among Us and Phasmophobia?
Guys, i saw things like mirror, pun, photon and others, where can i find or read the good and bad part of it ?
hello..is it possible if 2 client connect with webgl?
@prisma imp google brings up a number of discussions
Please help give me link :)
And what about unity's own multiplayer system, i just read, they stop it since 2019, when will it be available again ?
I wouldn't be waiting on unity's multiplayer
Why ?
google brings up a number of discussions, that has been asked countless times
Oh oK
for LiteNetLib, it might be better to ask in the official discord, the creator is usually pretty nice about answering questions.
about the unity network solutions, there should be some benchmarks and comparison charts for it, for example Unity tried to make one in a blog post:
https://blogs.unity3d.com/2020/09/08/choosing-the-right-netcode-for-your-game/
but it depends on your requirements,
for example, Mirror is a great replacement for the old HLAPI unet, it adds some high level abstractions to networking and beneath, it uses lower level libraries for the transport part. By default I think it's telepathy, but you can use other libs too, someone wrote a layer that uses LiteNetLib for transport for example
Hey guys is there a photon project or a reference where i can learn how to create a room and let others join thay room by putting in the name of my room?
I am stuck at this
Please help its very important ๐ญ
@tall storm have you tried the examples photon comes with?
have you tried youtubing this topic? there are many that walk you through, step by step
If I want to use Dedicated Servers for a game of mine, and I want to use Photon Bolt, would I need some sort of hosting service for the servers?
Hello all! I want to recreate Among Us using the Photon Engine. Iโve read docs and also did some games before with it. Can someone tell me how I can pick out random players and give them a role. Like 1 of all players are imposter thxx
@azure crown players can be host or if you want your own servers acting as auth server
yes you need to deploy your headless instances to any provider like Amazon
I want auth servers
Because if its a player hosting when he leaves then all players will exit
@weak plinth let your master client create tag for everyone then send them RPC/RaiseEvent however you like
@azure crown you can make your own host migration
its really expensive to deploy your own servers
@prime beacon Alright, thanks for the info!
Hello, I am using a PUN2 in my project and i want to "find opponent" to enter next Scene. It follows that everything should be fine, but when the second player starts searching, he doesn't find the first one who has already created a room. What could be the reason ?
Quick question: I'm trying to pass a prefab into a Mirror command, but the server always receives null instead of the prefab. Is what I'm trying to do possible, or do I need to find another way to do this (e.g. make a ScriptableObject that associates each prefab with an ID, then pass that ID into the command)?
Nevermind, I think what I'm trying to do will be easier if I pass in an ID regardless of whether the alternative is possible.
Why is it in mirror, only when i use localhost, it connects. When i use my public ip, it won't connect.
I have port forwarding on the port i am using
it just times out
If your firewall works correctly, and you have the correct port and the correct tcp/udp setting... should work.
not really. Your port forward seems to be failing. And by firewall I mean the firewall on your router - where you set the port forwarding.
firewall on my router...
oh
i just realised
the internal ip that i'm forwarding is different, thought that the router called this "mac" not a "mdp"
MIRROR 26.2.2 IS LIVE ON THE ASSET STORE
Download: https://assetstore.unity.com/packages/tools/network/mirror-129321
ChangeLog: https://mirror-networking.com/docs/General/ChangeLog.html
@gleaming prawn Among Us use a custom fork of Hazel, a LL API made by the same of DarkRift2.
https://github.com/willardf/Hazel-Networking
This fork has been heavily modified from the original to reduce allocations, copies, and locking. As such, it's fairly stable, but not guaranteed. However, my game Among Us currently runs on it with over 500k MAU, so that counts for something.
Thanks. What I meant is that on top of hazel he built his relay system, and the gameplay netcode is 100% client authoritative as in most relays.
no
the client either can host their own server and play in it with Server+Client option and people can join those servers with the Client option but a person could host their own server only
it's just an open source framework, so you can either self host, or put your app on a host etc
Aha, I get it. So could I technically host servers with some 3rd Party app?
you probably could, it's just the library - Mirror. It's not bound to a service like photon, which often requires you to use their infrastructure (I think a few of their products let you host on premise or on your own instances, but not sure)
Can I use AWS with Mirror?
players per room is not directly related to host/machine
what mostly matter is how efficient you use resources (cpu, bandwith etc)
Hello everyone, I am looking for a solution to call JS functions external to Unity in WebGL, do you have any leads? Knowing that Unity offers an internal JS function management system with a .jslib in the "Plugins" folder, but I would like my JS functions to be in an external file.
hmmhh, if you have a jslib linked, you could maybe have a js method which purpose it is to read a file from the server which contains the method you want to execute and run an eval() on it, sounds pretty unsafe to me though
or maybe you can load the js file beforehand in the index.html that loads the webgl game instance, so you would have the other methods callable in the js scope that the webgl instance uses
I'm getting ER_DUP_ENTRY from MySQL database when client sends data to backend. This means that no data is updated to the backend because there's already some overlapping data in the client and DB.
Is there some SQL command that I can use to avoid causing this error, i.e. someshow handle the request gracefully, not update key if it already exists, but still complete the procedure for other keys. SQL Insert/update etc.?
try/catch?
For an invisibility skill, and some units can have like Truesight passive
Is the right approach, modifying the observer list in its AOI
Or straight up hide renderers/colliders etc?
I'm thinking the former, for bandwidth and so cheaters can't detect packets from invis units
But idk
Hi when working with networking concepts, should the client send a message to the server first on connection or the server send a message to the client first when they connect
Once they are connected, there is no rule for who talks first.
What is in this message?
Hello and then hello back. And some initialisation stuff
No answer for that. The answer is whatever your game needs it to be.
That they are connected, means they already said hello
I think I have answered my own question. The client needs to send info about itself to the server for initialisation
Thank you for your help tho
np
How do you guys handle player rotation in your games? Currently I am controlling my player's x rotation in Update(), then performing Move using a charactercontroller as well as sending the rotation (along with other input) to the server (server authoritative) in a FixedUpdate()
Currently, this works fine in all scenarios except when players collide, where they sometimes have the tendency to behave slightly differently from client-to-client, causing desync issues
Mixing update and fixed like that will produce jitter and frame dependency. So be sure to calculate position in both fixed AND update.
Unrelated to your problem... Just a side note.
I appreciate it nonetheless, but i'm not quite sure if I have that problem atm
maybe I can try to elaborate on how my movement works
It will be micro jitter. Not your biggest problem atm
Server auth with client prediction is difficult
yeah, i've realized that
kek
basically in Update I only control my player rotation
and in FixedUpdate, I do just about everything else
since it is (supposedly) single-threaded, I don't understand why there'd be problems
That will definitely create micro jitter
Your server auth model sounds a bit trial and error. Are you following a model you read about?
I've read a bunch and watched some videos
Using CC in update will absolutely create desync
This is the deep end of networking, you'll want to read up more on state transfer with client prediction.
You are already down a bad path
yeah I've had some problems with the charactercontroller
essentially I use my fixedupdate as tick counter
every tick, clients send input and their current rotation, then apply those input etc. via a .Move()
the server then replicates the same, albeit a bit delayed of course
there are no synchronization issues apart from (sometimes) when the character collides with each other
the rotation is pretty much the only state a player can have rn (not counting inputs such as go forward, jump, etc)
That sounds very non deterministic and hard to resync
How come?
It's just not a standard client prediction model. What are you modeling this after?
Any tutorial or known game?
well I looked at how quake did it, and valve networking
I don't know how they handle rotation though
but they don't communicate their positions from what i can gather, only input
The actual rotation can be sent, since it doesn't apply like input
well they broadcast the positions from the server
so the other clients can interpolate
and actually see whats going on
.Move though ties that controller to your simulation in an odd way
I thought the CharacterController was deterministic
You move in update but not fixed... So you have all kinds of weirdness going on with capture and remote apply timings
Where do you capture the state?
I'm on a mobile and this conversation is about to require more typing than I have time out the ability to do unfortunately.
You are starting with a bad CC for touch based simulation... So resim is going to be a nightmare.
Are you keeping a history of the positions from each call to move?
So you can rollback and rensimulate forward?
The client keeps it's history yes
Yes and yes
It does NOT need determinism
And compares that with the server states later
I need to have a history of previous player positions/rotations
on the server
to do things like hit detection
No jo
If the server state disagrees, you are in desync
That is server lag compensated raycasts
And you need a resim
Never heard of those :p
I though you were talking about client side prediction and reconciliation (rollback)
Taking about rewinding shots? Or client predict. Server auth is a massive topic
It happens on the client side
To avoid the desync you need a room llback buffer of positions + commands on the CLIENT
My issue is that the server movement and client movement is not 1:1 in a simulated environment with no lag, lost packets, etc
Not the server
I'm doing this conversation in a tiny window, so I may not be answering the right question
It will not be 100% same
The server has authority, always forward
It sends back confirmed positions, with a tick
The client is technically forward for me
Client rollsback to the server sent position, resinulates forward all commands from that tick up to present
Done
since it performs the Move() before the Server gets it
You are simulating in update on the client... That right there is instant desync
I don't get why the rotation could give me desync when its just that though
Can be done, does not need any determii
All moves that are EVER applied
You need to rollback on client
Capture their rotation
What are we calling an input?
I'm typing from phone as well
WASD, Jump
But you should read about client prediction and reconciliation with rollbacks, that is what you are trying to do
Erick I have and will do more, but I don't think I should have any desync issues if I do it correctly as I think emotitron can maybe tell me
You need a tick based sim, with a server synchronized clock, a buffer of local client commands (for each tick), and server sends down actual position/rotation...
How are you applying these inputs then? immediately as they come in?
No, every Tick (FixedUpdate)
You rollback client to that POS/rot, reapply commands locally in one shot to reconciliate
Rinse repeat
Fixed update is NOT a synchronized ticker
If you are applying inputs in Update on client, but applying them on Fixed on the server... that is going to be a problem without careful coding.
It does not matter, even if you apply both on fixed, you need snychronized clocks
That comes next yeah, I am just flagging problem #1 here which we agree on... you have NO real concept of tick being enforced
Not n two different machines
It's not synchrnonized
Hardware clocks drift, and a lot
That is why I asked: do you have a tick based simulation, with a synced clock?
That's the first thing you need here...
welp, I guess i dont then :p
That is what is built in all these (good) high level netcode tools, unreal networking, source, photon bolt, etc
For my stuff I just used ticks, and if the buffers wander to far it corrects with an extra sim, or a skipped sim... but same result. You have synchronized ticks.
Update ideally is ONLY for tween/lerp/interpolation of the fixed states
How do I apply rotation then? if I do it in FixedUpdate, it feels reaally wonky
You may use the tick stream from the one machine + compensate for ping + smooth to have a roughly.synced clock reference from THAT machine
Rotation is the least of your concerns right now
I personally would back up, and entirely get out of Update. Do everything in Fixed and don't interpolate yet.
Rotations must be assumed the ones from the client, assuming this is an FPS
And you probably send a shot with a direction as well
You are using Update... you are interpolating
right now I'm just trying to do the basic movement
Update = interpolation
oh
(or extrapolation)
I was thinking of something else
@gleaming prawn yeah man, i send the clients current rotations and they are applied serverside
Once you have it working, use Update to smooth it all out.
but of course i'm doing it completely wrong apparrently, by donig it in fixedupdate among other things
so i am a bit confused now
Networking is not easy....:)
For like an FPS, I consider rotation to be a direct input - not sure what the standard view is on that though.
are either of you familiar with mirror?
I'm one of the Devs of photon quantum
Mirror is not a high-level netcode framework
all their documentation uses client authority so i don't have much to go with kek
So it is not comparable with photon bolt, or with what you want to do
My asset supported Mirror for years, and it dealt with exactly all of this.
at least from what i could gather
damn i'm speaking to experts
should have asked here earlier lol
would have saved a looot of time
I guess the simplest tick based netcode would be emotitrons SNS for pun2
https://assetstore.unity.com/packages/tools/network/simple-network-sync-134256 This uses the tick system I am talking about. But it doesn't support Mirror now, so please don't go downloading it.
Mirror, without mentioning its pros, is based on just transfering state, not dealing with these simulation topics
It is what most of us called "ad hoc timing based" rather than "tick based"
It can be done on top of mirror, yes
you don't think mirror is very suited for server authoritative movement?
But requires A LOT
I considered switching to MLAPI tbh
Mlapi is the same
Basically the same set of limitations with MLAPI yeah
with all due respect I wouldn't go with photon, because of the pay for CCU
It does have less allocations, etc
Not going to get into that discussion.
We'll, mirror and mlapi you pay for expensive servers...:)
I thought I could set up my own, but yeah I guess that's another discussion
So it's your choice to whom and how much money to oay
There is no free ride in networking, you will pay for it somewhere.
its faaaar in the future anyways, if at all
Your own in your house? For Lan games yes
IF you are building for lan, none of this matters
For anything online, headless instances are not super efficient. But that is another story
Focus on writing the game, studying the topics you are discussing here
If it is on the internet, you have to learn the architectures and pick the one that makes sense for the game type.
Avoiding CCUs should not be the deciding factor. Architecture should be.
Do not pick the tool because it's free... That is not a technical reason....:)
But first, make tutorials.
tbh I just think that so far, all the client authoritative stuff was really interesting and fun to learn
although I suppose I am a bit misguided since i do the tick stuff completely wrong apparrently rofl
Client Auth still wants ticks
I figured i'd have each machine have a tick counter in their respective fixedupdate
Ou need to know the tick counter of the other machine
In your case the server
That is the trick
Yeah, it would continuously communicate it
Omoensated for rtt
in case of lag
Exactly
So that it can choose to ignore some ticks if say, the delay suddenly is reduced
otherwise the lag will stay because the tick counter is at the same "delay" if that makes sense
As I said, can be done in mirror, mlapi, pun (and does it)...
Its something built in photon bolt, unreal or source
Depends on your needs. Some things you can disregard late updates. Some things you may want to resim for late updates.
All of this is VERY advanced.
Can you give me any hint as to how I would do it, what sort of method, if any?
Start with Mirror and Pun2 tutorials
or is it way lower level
I've watched a lot man, but I couldn't find any that explained this in depth :/
What is his name?
don't make a real game yet, or you will be lost for a year refactoring failed attempts over and over.
The one linked by that offensive guy.. lol
I hope his name isn't Davin
ah yeah, I'm only implementing what we're talking about atm
There is a very good informative blog by this Gabriel something guy, sounded itallian
<- My name is Davin, but I am not an italian blogger.
server auth movement i suppose
That one comes up often lately
Yes yes
This is good info. I have not read in detail
But the topics sound legit
Before doing that, I would really just get some basic poorly designed client auth examples made to get comfortable with the libraries.
Other than that, source networking from valve, all docs
but is there not 1 right way to make a tick counter?
Tribes networking model (paper)
ah ye, read some of the valve stuff
Overwatch gets a bit more complex, but the terminology is still there.
Send from server, compensate for half rtt, smooth for jitter
and watched an hour long vid about how halo does it
My main advice on all of this is avoid Update early on
Stay 100% in tick based land
but FixedUpdate isn't really tick based either then
once thigs are correct and agreeing, add Update code to handle lerping
rite?
Fixed by definition is tick based... though you still have to wire things up of course.
Fixed is likely the clock you will want, since you are making use of physX
Fixed = preSimulate
well that was my initial assumption but erick said it wasn't
He may have meant something slightly different
He did say that you will have to manage clock drift and such
i'm not completely off track then
great
alright well
the issue is
I tried moving the "rotate" code into myFixedUpdate
it didn't really fix it
i guess itd be really hard for you to help me here though, since you can't see my code and are on the phone
i really appreciate you guys' info so far, still
This is KINDA another problem, but have you ever had problems with the CharacterController in networking? there's another thing that's extremely weird, but I don't think the problem lies in my code because of the nature of the problem
- The TIME is the tick
- the ACCUMULATED time (for smoothing/interpolation or extrapolation) you add on UPDATE, from the timestamp of the TICK
We might be giving you different terminology here then
So the tick time marks a position from that timestamp (assuming a server confirmation), then you render smoothed from update
For my usage of "Tick" I am referring to simulation events
Ah, I'm not that far yet
We might be giving you different terminology here then
I always assume a ticker that is based on the data source (in this case the server)
Simulation evens can be that, etc
OR maybe you are talking the local ones
I'll stop confusing things... Lol
For me, tick is always in relation to either simulation events
Each client (or server) has their own tick counter for me
Terminology is messy in networking
Erick and I work for the same company, and we often have collisions in term definitions. That is just the nature of this industry.
I use ticks as the synced clock source/server etc
I think it ends up meaning the same thing
I am tied to Unity, so I am tied to Fixed as the simulation timing
thus my tick is tied to that, or every X of that
I understand, i think
In Unity world, you don't "sync" the clocks so much as offset as needed to keep your buffers happy.
Though, if you use the Overwatch model that blurs a bit, as you can modulate the client simulation rate as needed to keep the server buffer happy. But that is getting STUPID complex for where you are now.
its just reaally strange and been boggling my mind for a several days - my charactercontroller on my server side (which is moved by the server when the client tells it to move) sometimes seems to not be able to travel up stairs, or get stuck halfway
You are tied to PhysX right now, so I would stick to Fixed for now for sanity. That is where Photon Bolt and my asset operate from for ticks.
It is not exotic, and plays nice with Unity internals
ye, we do "modulate" in quantum
Ah yeah, It did it even when all my code was in FixedUpdate
using the server tick
yeah, I think for what he has going right now.. that is a "deal with that later" thing
Fixed update is a starting point
Hardware clocks drift, but it takes some time
For starters you can use something simple
yeah, I feel like i'll get overwhelmed otherwise tbh
exactly
you just want to see the concepts working
Get on a fixed tick, and things become much more deterministic (minus non-determinism from floats and PhysX)
not a concern now
but you will want to be familiar with determinism and its limits when you get into networking.
are they non deterministic
yes
wat
nothing in unity is deterministic
much of networking is the search for determinism where you can find it.
but this is NOT a problem for the networking model you are building
There is also absolute determinism, and just good enough determinism
like when you shoot a bullet, that is deterministic in nature.
This does not require it... determinism, or at least a low error rate is enough
if you have an origin and a direction... you know that bullets path without having to sync it every tick
good enough determinism
THis is an invented term I've seen a few people use
yeah I will have errors either way when I switch to UDP
and will have to interpolate, rollback, etc etc
For lack of a better term. Predictibility I guess would be better
- For me you are either deterministic or you are not...
- then you can talk about how much you DRIFT
The fact is that you do NOT need determinism for these eventual consistent models, or server authority... Even if things drift with an absurd rate, it would not BREAK... It would just look OFF (when reconciliating)
its not very good for what i'm doing?
You have an actual deterministic engine, so it obviously has a pure meaning for you. The rest of us are just lacking a term for "deterministicish" ๐
In reality, it drifts very LITTLE
ANd it's definitely enough
its not very good for what i'm doing?
It is good enough
You are the author of your own model, we can't answer that
if it is good enough depends on if you system relies on it being good enough
He want server authority, with client side prediction... That is what I understood
well my first step at the moment, is to make my server and client behave the exact same to the same input
ye erick
In that sense, physx with kcc is ok
For client prediction, you have to sort out how to deal with desync
server and client behave the exact same to the same input
You will not achieve EXACTLY this
Unless you have a synced tick...:)
the more non-determinism, the more they will be out of sync. You either have to correct for that constantly, or tolerate a certain amount of disagreement.
And it will also not be EXACTLY same due to non determinism...
Well, NEARLY the same then :P
You either have to correct for that constantly
That pretty much what EVERY server authoritative netcode does
That is on you, just be aware of where your non-determinism is coming from - and figure out how to deal with it.
how constantly, depends on a lot of thing
That's what I'm trying to figure out
Movement rate, how good the clock sync (and engine drift rate) is, etc
I made a list of positions/rotations/tick which is constantly communicated from the server to client
Step one is make your system not horrendously broken. Get your simulation code out of Update.
Bolt syncs back EVERY frame for your local character
so this could be even 60Hz
At least the original code... not sure if Ramon now relaxes this and allows lower rate server command confirmations
the client has its own list of positions/rotations/tick after each .Move as well
But I reckon you could reconciliate like 4 times per second or so...
Bolt I BELIEVE is fully tied to FixedUpdate, so whatever your fixedTimeStep is... that is what Bolt is. But @graceful zephyr knows that better than me.
the client has its own list of positions/rotations/tick after each .Move as well
What you ACTUALLY need is the list of COMMANDS (movement intentions)
Bolt compiles out its own character controller btw @winter stirrup It does NOT use the Unity CC, because the unity CC is crap for networking.
I'm not gonna use those datastructures/info for the "final" build
I'm only using them to check
you will receive the "correct" reference position from server... you need to reapply the commands/input (on client)
whether the result of the client / server move is equal
But also because server auth means you have to manhandle simulation, which means PhysX is your enemy.
as in, check whether my movement is applied the same way
the buffer of positions locally
on the server you need a buffer of positions to do lag compensated raycasts (favor the shooter)
so in other words
but that is another topic altogether
You might need to rework it a bit
I think you can make it work just fine with it
It is not the source of your issues now
Resimulating it is a bit problematic is all as it is. @winter stirrup
Kinematic maybe?
I mean kinematic rigidbody
A Kinematric Rigidbody is a very rudimentary and bad KCC
yeah, KCC typically is considered the gold standard
Do with a proper CC
and he did code in better networking friendliness
The Unity CC can be repositioned manually, can't it?
Kinematic Character Controller I believe
Just position back the transform, then .Move again
is that something someone else made?
oh, I thought you were referring to something specific
For this first test, you might want to avoid controllers
Basically using shape casts, etc
like the character controller asset
the CC asset is internally made with shape cast
It's just bloated with simplified assumptions
KCC is a topic that is very complicated
because each game has different needs
You are taking on a lot of things at once here btw
well, you say that my charactercontroller is proobably not the source of my issues atm?
If you haven't made a basic goofy simple game with pure client auth, you are in WAY deep.
IMHO:
- use the Unity CC... Reposition it manually (transform) when you get an updated position from server
- run both the re-sim + the prediction forward with its .Move
Then, interpolation... Hmmm... Lol
That should get you close enough resims I think. Also not sure about interpolation in that use case.
You will want to write your own KCC later on, based on shape casts, maybe maybe
You will have to tolerate some slop in your client auth desync checks
there's just some unexplainable stuff with the unity CC atm
like how it sometimes refuses to climb stairs
halfway
until you smooth the networked receive things
i really don't get why it'd do that
Does it hand in a LOCAL test?
a local test?
I have no idea if the unity CC is stateless (meaning it just assumes the position from the transform and recomputes everything when you .Move)
If it's not... then all sorts of glitches may happen
A major goal in client predict and such is to make sure that your client code and server code are exactly the same, and apply using the exact same timing/order of exec and such.
it may have an internal state for velocity, etc
that's fine
local = not networked
@jade glacier yeah thats basically where i'm at atm
I do not use the Unity CC anymore... Long since I last did
I would hold of on more of this talk then... and just go try what you think should work using nothing but Fixed timings
I did have perfect synchronization in terms of move
get that working first
before I added rotation
the only weird stuff is the stairs thing that happened occassionally
have a good one erick, thanks a lot !
I can see on the server side that I am at the exact same place
but then when i'm somewhere on the stairs, it just doesn't want to continue up
on the server
as if its colliding with an invisible wall
hold on, i got a clip of it
@jade glacier don't know if you can see this on phone though, but its pretty funny all things considering https://streamable.com/f3soev
server side view of my player
something fishy with that controller code to let that happen
you aren't attempting any resyncs yet I assume
nope its reaally barebones
Then that is pure controller weirdness
i'm only applying a movement vector and a rotation transform
I'm using the RawInput one
so it's just 1 0 -1
forgot the exact name
moveInput.x = Input.GetAxisRaw("Horizontal");
moveInput.z = Input.GetAxisRaw("Vertical");
That should do it. Moved all of that code to Fixed?
yeah, it is in the video
You will have to finesse it later so it captures better (since capture happens in Update)
There is no reason if the code is identical on player and server for them to act differently
they run the same method
by sending moveInput as argument
lmao
but the server occassionally does not like the idea of players being able to climb stairs apparrently
That seems unlikely. I would debug some more.
even if my input was diff, a .Move() shouldn't be able to make it go through stairs should it
unless I somehow disabled the CC on the server
disabling collissions idk
They need to match exactly for client prediction
@jade glacier i'll try to fix my basic stuff, thank you so much for all the info anyways
Gl
I feel like this would be the right channel for this, is it possible to exclude certain packages imported from packamanger in a version control?
they all are stored in the packages.json so im assuming the answer is no
sounds like #๐ปโunity-talk
no idea, maybe someone else can chime in tho
any good tutorials on how to make an online multiplayer game?
Hello, I have just downloaded and installed Mirror. But during the importation, this kind of errors appeared. There is a missing assembly. What should I do ?
@sly dragon Unity & Mirror ver?
How do i place the photon SDK without going into unity? im using it for a private server in a free steam game
Yas I updated the both and it's good now x)
Photon Network Matching players .. If I connected to server (player 1) I created room. And tried to JoinRandomRoom other player (second player) and I have the same situation with first player (Created new room) . What's a problem ? Why second player doesn't see open room ?
Are you seeing that they are connecting to the same region?
Be sure to use Dev Region (and make your builds Development Builds), or used Fixed Region during development.
Is there any way to easily UDP & TCP hole punch without the need for the server to be connected behind a router that doesn't have a NAT?
You need a server to at least coordinate the punch process
Plus servers that get the reflective addresses (for this you have Google public ones). But coordinating the initial share if the reflexive addresses needs some initial form of communication via a custom server... This is normally referred as signaling.
how can i check that a game object is owned by player (photon pun)
@gleaming prawn is this correct:
if (hit.transform.gameObject.GetPhotonView().IsMine)
sorry for random ping btw
no one was responding
do you know?
I'm on vacation, and I do not work on PUN
This is a public discord, not a support hotline
ik
Sorry by some of the messages, I confused this with our own public discord
Also don't ping unless I am discussing directly with you...
k
But not a big deal that you've done...:)
Btw, I THINK your code is correct
But I do not work with pun
k
If your collider is on the root that should be correct.
Should I use mirror or photon for first time multiplayer
I have tried both and it seems like photon is less involved
Photon pun2 will be easier to deploy, but it does limit you to client authority. But it's a popular library for casual games for those reasons.
If you need a unity based server with game logic for your game type, mirror would be better.
Is there any way to easily UDP & TCP hole punch without the need for the server to be connected behind a router that doesn't have a NAT?
Some kind of server is needed
Something accessible on the open internet needs to be accessible to all clients to facilitate the handshakes and such.
Thanks, I found solve myself ๐
@weak plinth no u need a publicly accessible third party/arbiter
Hey guys! I'm about to start a multiplayer game for Unity WebGL and I was planning on using Photon.
I have a problem though. I have a requirement that states that players will only be able to connect to the game between certain hours, in order to make planned sessions.
I don't know how to work around that. Maybe controlling login dates directly on the web page? Or do you know any tool other than Photon that can help me?
Thanks in advance!
does photon support webgl?
I can't answer for photon specifics sadly.
the thing with webgl/running games in a browser is that you need a tcp based solution, like using http requests/long polling or websockets.
but there is one nice library for this:
https://github.com/endel/NativeWebSocket
if you code the backend per hand, you could simple deny requests to start or join a game at certain times of day
Photon does support WebGL, that's why i was trying to avoid doing the back en per hand.
Maybe using something like Mirror? I think that gives you more control over the server
Webgl isnt going to help you on the server side.
Your html server is separate
You still have to host your game server, with or without webgl.
I wonder, depending on the product you use with photon, how much control you actually have over the backend code. for example, I think I have read that you can write backend code/authoritative server code when you use Bolt, but with Pun, it's more like a p2p code setup
or if you have to handle certain things with regular http requests that are not even related to the photon framework, then the question is if it makes sense to use photon.
what you want to do sounds like a setup with clients + authoritative (public) server,
so there would be one app for the frontend that the players use to actually play the game and another app for the backend to handle server side logic, authentication etc.
authentication/matchmaking server and play server could be separate too if needed
Webgl is just an alternative to having players download your game.
I see, you gave an idea on how to do it
I will check out Bolt too to see if it fits me
Thank you!
Hello, i've some trouble with Photon, i follow this tutorial to setup a multiplayer game: https://www.youtube.com/watch?v=VX6VGcQTY5E but i found myself with this error in console: error CS0115: 'MenuManager.OnJoinRandom()': no suitable method found to override But I didn't find any help in the comments or Documentation, could you help me with that, please? here's the .cs file i created too
Make sure to subscribe and turn on the notifications so you get notified when we release a new tutorial or video!
Learn how to make a multiplayer game in unity!
-~--~--~--~~~-~...
Please watch: "Please Teach Me Kung Fu "
https://www.youtube.com/watch?v=gXjsfkS_xWQ
-~-
Hello if want to create a multiplayer game in unity, which networking solution do you like the most? I've tried photon and thinking of learning it properly but ive also heard of mirror... Thanks!
Pun2 and Mirror are the most common starting points
@jade glacier Thanks, which one do you prefer and why? ๐ If you dont mind me asking
I am one of the devs for Pun2, so I am the wrong one to ask for opinions on that.
haha, okay thanks! ๐
@weak hollow Likely it is an old tutorial (pun1 maybe?) and you need to just use the correct arguments
MenuManager though is not Pun2's code
so whatever they have going on in there is the problem
This is more basic C# debugging really. Your args don't match, or you didn't make that method virtual.
Thanks for the feedback, gonna check if i missed something
it's my file and an emptyobject*
@maiden sundial It depends what you need imo. If you don't mind client auth(potential cheaters) go with PUN. If you absolutely need server auth go with Mirror, or Bolt. PUN and Bolt also have rooms while Mirror does not.
Mirror also have a rooms
it have a transport name Dark Reflective Mirror
use that for rooms
can someone tell me what im doing wrong
yes i know there is a missing (;) at the top
Can you improve the question by telling us what's not working (what's wrong)?
well im trying to change the text with a input field that will do it for all players
its not working
well
it will do it on my screen
and it will do it
but on the other screen it wont
idk why
@gleaming scarab do you know why?
Looking into it with the limited time I have
k
Put a debug log in game chat and see if it prints for all users.
@gleaming scarab i know pun rpc is working
because it shows the player name
im basically making my first chat system
so it will do
PLAYERNAME: (message here)
i got the playername part to work
but not the messgae
message
So the function is working (being called by every user)?
Did the log print for every user?
yes
well it should let me do that
wait
no its not
wait let me remove outputtext from photonView.RPC("gamechat", RpcTarget.All, outputtext);
if i did that it would work
Debug.Log($"{playername}: {outputtext}");
Yes, if it didn't work that means the function isn't being called remotely by all users (targets).
ik but TEST wont show for other players @gleaming scarab
At the very least, this code does not seem to be your problem.
@gleaming scarab well what is it then
I suggest following some basic unity photon tutorial to first get a proper setup of photon with unity then extract what you need into your application.
There doesn't seem to be any issue with this code so I can only assume pun wasn't setup properly or a connection wasn't established.
i think it is because gamechat() does not know what outputtext is for other clients
It should still print the debug log regardless.
it wont tho
Since it isn't, that means the method isn't being called for the others.
Exactly
Meaning RPC couldn't call the game chat function for the other players.
no RPC will call
it just does not know what outputtext is
for the other players
is what it looks like to me
so i need it to know what outputtext is
I believe you and the others are not connected else it would print a debug log. Try calling a different pun method ๐
it does print a debug log
just it dont print outputtext of debug.log for the other players
@gleaming scarab
So it prints something for the others?
I was under the assumption it didn't print anything.
Alright
One pebble out of the way.
i have no idea how to solve it
Have string parameters and pass the string over?
As arguments?
Should be pretty simple..
k
pseudo code
GameChat(string outputtext)
{
stuff
}
Called with:
pv.RPC("GameChat", ..., "Hello World");
And remove the member outputtext from the class since you won't be needing it.
member outputtext?
Where you'd substitute "Hello World" with your inputtext.text.
?
I've got to go soon.. any immediate concerns before I do?
Did you provide a string parameter for the function (declare it with a string parameter).
Where they took two parameters.
i am confused
where do i put outputtext = inputtext.text;
i need outputtext = inputtext.text; tho right?
and remove the assignment line before get key down
k
Nope
then what
well no because nothing is telling what outputtext is
if i remove outputtext = inputtext.text;
but it still wont work
Debug.Log($"{playername}: {outputtext}");
@gleaming scarab
It should.. in theory
why is it working???????
Basic c# parameter with functions
Where you passed the string as an argument to the function
Alright I've got to go, have fun.
Probably you've got something associated with outputtext, add that back in as a member, do the assignment operation you had before the get key down conditional branch.
wut
oh ok
@gleaming scarab so it should work now yes?
I GOT IT TO WORK
YESSSSS
@gleaming scarab thxxxxx
@opaque dew Thanks for the answer ๐
Guys, usually my ecpm is around 0.01$ to 0.2$ but suddenly yesterday was 200$, what happen ? And how to make it happen again ?
Probably advertising (not here though)
Would you mind telling me something about programming score for opponent? I created a multiplayer scene, both players get points in their windows, but the opponent's points are still zero. How could I fix this?
point is added to what? And how is that networked?
I'll take a look
I don't see any networking
It's just function to add I ask about syncing point with opponent in scene multiplayer which is connected to Master server Photon (PUN2)
You need to add some kind of sync, and determine the authority and such.
Right now you have no sync code of any kind, so its not networked.
Who is the authority over each players score? Each player over their own? Or the Master Client?
the other player moves and shoots when the first and the second also how do I solve?
Which library? You have to disable your controller code for any instance that isn't locally owned.
@stuck furnace
Sceny Player have own itd work but i want to see opponent's score also but i see just 0
Every*
Again, you have to sync the value. How are you syncing the value currently? If at all?
Things don't sync automatically just by installing Pun2
you have to explicitly wire things up.
hey emotitron, do you know any good resources for learning how to make a kinematic character controller that is deterministic? I spoke to you last time about some synchronization problems due to partly my own fault, and partly using PhysX
I have found a couple of tutorials, but I am a bit wary of youtube tutorials since they sometimes follow very bad practice :p
Truly deterministic? Not going to really happen without introducing your own fixed point math library. But at least close, you just have to make sure you do all simulation work in the fixed update. But you will still need to sort out a way to clean up desyncs. Which is typically resimulation.
All of the stuff talked about for things like Counter-strike and Valve's docs on the topic are good. I don't keep any links handy though no, sorry.
You won't do this through a tutorial.
It takes like years to really get good at dealing with proper networking, and a lot of just writing stuff and failing.
Could you give me a brief clarification of what you mean by simulation and resimulation? I want to make sure I understand it correctly
There are very few networking gurus for games for a reason. There isn't "networking college"
I can't sorry, that will turn into an hour of my typing stuff here I have typed too many times before.
Go read up on server auth with client prediciton wherever you can find it.
Erick, fholm and I have spoken about it often - too often.
its just that it has different meanings
from what i've seen
It is just odd that they call it a simulation when it is server authoritative, since the server simulation is what actually happens - and what clients view is just a previous (and sometimes imperfect) view of that simulation
In my mind, simulation means an imitation, and the clients are trying to imitate what happens on the server by predicting what they think is going to happen
And here the question arises about what to use? I looked through the documents but I have no idea.
@jade glacier Sometime in the future I want to add better compression to my FlexNetworkTransform. I was considering using your library but I wanted your permission first. I know it's MIT but I don't want to step on toes by using your code in my paid product, since we both have similar products.
It isn't actually all MIT, just the bitpacker.
The transform crusher stuff just as permission for use for game dev, NOT for networking products.
That is MIT yeah
I'm honestly looking for the route that saves me the most time so I can add in other features; legally and respectfully ofc.
I believe I MIT'd that - if so, it is out there now.
I don't know that all of the files got the proper headers and such though
I'll take a look. Thanks.
@jade glacier You probably don't want to hear this, and don't care...but the NetMsgCallbacks file is out of date because of Mirror changes lol
I stopped supporting mirror ages ago
They break things too often and for no real reason
On the topic of IP though, looking at my code while making a competing product... isn't generally legally considered a good idea.
@opaque dew
Is that in the bitpacking library that I have that mirror code? Or one of my non-MIT libs?
The transform crunching library
TransformCrusher isn't MIT, so I would be cautious about looking at that code if you are making a product that competes with mine.
Gotcha, I won't be using it then.
How can I sync an object (eg. a bottle) to all other players in the room?(photon)
Put a PhotonView on it, and make use of Observables or RPCs @vague mica
What should I buy if I want to use AWS with Unity Mirror? On the AWS websites it says AWS can handle up to 200 players per room! So which AWS product actually does this?
@azure crown They are talking about EC2 most likely
@alpine pivot Interesting, can you tell me more? Is it like Dedicated Servers?
Because thats what im looking for.
It's a Virtual Private Server, a Virtualized OS running on AWS hardware
You get a dedicated IP address, a set amount of RAM and CPU power
And you can use it to host your Unity headless builds in
Soooo it can be used as a dedicated server? (Im a recruit in networking sorry!)
dedicated server means all hardware is reserved ONLY for you
you should google VPS and Dedicated server
Oh ok
But can I connect to that dedicated IP address in the game then?
as in, join it?
yes
you can use free ec2 instance to test
get a public IP
you should really follow a tutorial
Oh alrighty then! Can this be used for a big scaled FPS game?
how to create instance, getting public IP etc
yes
you can also see gamelift
it allows you to spin up new game server&instances on demand
scale up & down
but it might not be as easy as you thought
@prime beacon Ok thanks man! You helped me alot!
you're welcome
What is the reliability to a relayed host after a client has connected generally speaking? If I'm using steam to connect players, are they then at the mercy of said player host's connection speed?
Dealing with small lobbies of 3-4 players, for small match times mind you so I don't see a reason to have dedicated servers.. Maybe I'm under thinking it though and dedicated servers should always be on the table.
Question is when is one better than the other for this kind of scenario? (A couple players, short match, real time, closed lobby)
hey guys! i wanted to ask an question. i am currently making an FPS Game. i Wanted to ask wether which networking FrameWork would be suitable for making my FPS game into Multiplayer. please give me suggestions. (And also it should support for version 2017 or below and should be runnable in low end computers. if yes pls do reply)
maybe photon bolt can be a viable choice,
there are a few low level options too, but for high level networking with more abstractions, I hear a lot of people are using mirror as an improved UNET approach
Mirror doesn't work on 2017
@grim goblet @lusty crow ^
But, if you do end up using a newer Unity version and want a FPS resource specifically for Mirror I have FPS Land, which is a full server authoritative shooter demo. Demo is free, source code is $3. You also get a bunch of Mirror tutorials, assets, and other projects for the same $3. If that at all interest you, it's here https://trello.com/c/8Fw2Q5mp/17-fps-land-project
@jade glacier I'm constantly having people ask me, PUN or Mirror, so I'd like to make a good comparison video on the two. I've seen you get asked this a lot as well. I can make the bulletins for Mirror, and while I know a bit about PUN as well I figure it would make more sense to ask someone more hands-on with it. I could throw in talk about Bolt too, since it's also server authoritative. I just need several good talking points.
One is Relay and one is Unity EXE server based.
That is the primary difference.
Pun2 = No actual hosting required, or any punchthrough etc. Downside is the server (the relay) has no game logic unless you write server plugins.
Mirror = Unet-like HLAPI. There is a server that you must provide that acts as the hub. You either need to host that, or you can let a player act as a server. Downside is you have to host, or deal with nat traversal. Upside is your server can be authoritative.
@opaque dew
@grim goblet , why would you use 2017 or older in the first place?
Okay, i got a question. I'm currently using Photon for the first time in my project as it seemed to be the one that was going more in line with what i wanted from the game, but i'm having this issue:
So let's say i have player A and player B, I want player A to be able to press a button and that will open a door to player B. Sadly it seems it only click the button and opens the door on the client side of whoever clicked the button, so i'm clearly missing some code or so. Anyone knows what might be able to help me?
First thing is to decide who owns that door. Typically it is a scene object, meaning the Master Client controls it. So all clients should RPC the Master Client with something like an RPC request to the master.
@jade glacier i guess that makes sense, but how do i do that? as i said i'm very new to photon, i've been following tutorials and reading a bit of the online documentation but i cant seem to fix this issue.
Also shouldnt the host be the one responsible for the state of the door instead of the master client? i mean i don't want someone to open a session and for the door to be open for them because another room opened it first
There is no host with pun2
There is just the relay (which is technically the server) and clients.
One client is flagged as "Master" which is just a regular client, except it is the default controller for scene objects.
Hey, i'm using photon for the first time, and i'm trying to do transform sync. But it is very choppy and it looks as if the other player is moving at 5 fps... The animations are very smooth, just the transform sync i'm having trouble with. Please help
Be sure to do the tutorial first
It sounds like you are not managing your controllers.
@weak plinth
You need to complete the Pun2 basic tutorials
@jade glacier gotta say, you are not a good salesman ๐
I was thinking more along the lines of things PUN does that Mirror doesn't. EG rooms, are huge.. very big.
@weak plinth I thought dapper dinos was for Mirror?
no he has photon tuts
gotcha
Can't help you then sorry.
ok, someone else can though
One client is flagged as "Master" which is just a regular client, except it is the default controller for scene objects.
@jade glacier that's kind of what i meant i guess. But how do i "link" the door and the button to the master and have it so that if the other players interact with the button it changes the door for everyone? Do you know any part of the documentation or a tutorial i could check for that?
@opaque dew Rooms are basically the alternative to spinning up Unity instances. It is included in my description, but yeah - I wasn't explicit about that.
I have to ask the same question I ask everyone. Have you completed the Basics tutorial for Pun2? @random crown
@weak plinth I have a video on the Photon Transform View, but I just show how to add it/what it's settings are for. I'm not sure it will resolve your issue. I don't follow dapper dinos work, can't be sure of his implementation https://www.youtube.com/watch?v=QQ_Bl-W6krU&list=PLkx8oFug638oMagBH2qj1fXOkvBr6nhzt&index=21
this should work though right?
looks fine. wow you guys have a few new things in there since ive used PUN2
maybe your serialization rate is really low
how do i make it higher
@jade glacier yup, but i do not remember any part that allows me to link anything to the master. I can use the photon views to define the players and link their position, rotatio, scale and animations, but that's about it on how much i know how to link
PhotonNetwork.SerializationRate ?
Nothing is linked to the master. The Master just is the authority over of door. Players just have to RaiseEvent a message to the master asking it to trigger the door.
@weak plinth https://youtu.be/RGb0_o691jo?t=19 watch it from there to 2minutes
You can also set up RPCs on your player object that handle actions and such.
like RpcTriggerObject(PhotonView clickedObject) type stuff. @random crown
PTV uses OnPhotonSerializeView, so those rates could be a contributing factor.
@jade glacier was that in the basics tutorial?? O.o
Probably not this specific thing. Just wanted to make sure when I mentioned RPCs and ownership and such, that you would understand the terms. @random crown
You will need the player to send a message in some form that the Master gets and acts on.
@jade glacier the tutorial only gets me this far. So i guess that part is not in it
but i'm gonna look into that in the documentation, thanks for the help
For this, look into RPCs and RaiseEvents