#archived-networking
1 messages · Page 75 of 1
(for the vast majority of use cases) Implementing your own netcode in 2020 is like discussing (again) if you should write your own game engine.
There are always exceptions.
correct, sorry been afk in a meeting, but this is an awesome discussion, ty greatly
look you don't have to explain this to me ) -- i thought that epic will offer complete stack but it's apparently not the case (unless you're on UE)
A complete stack requires intimate connection to the simulation
If you mean that kind of complete stack
"full stack" in game networking isn't quite the same as full stack in web.
more of a 'i have data' and i want to connect to other instances stack - so not tied to simulation, but it wouldn't make sense without it (i.e. engine itself) probably anyway
Used to be:
- (2000s) DirectX vs OpenGL
- (mid 2000s) own Engine vs Commercial Engine
- (2010s) Unity vs own engine. Later UE
And life goes on
though for some types of games that might work
The stack in the sense I use it for gaming is largely
Messaging <-> Input/State Buffers <-> Simulation
In the end it always works in certain aspects, and doesn't in others...:) You may learn a few things... At the expense of missing some profit you could have focusing on a game
What I would like to see is simulation engines that are wired up to be super friendly to networking. Netcode actually is that, but its so borked in so many other ways, kind of undoes any benefit atm.
ok just to be clear: i don't program in assembler and in chrome (and don't want to:), and not looking for any particular solution
just tbh when you look at options as to what to pick there are things to consider beyond technical requirements and things tend to escalate quickly )
What is it you are making?
both in complexity and use-cases - you have to be careful, so i don't wonder people ask very low level questions all the time
yea @jade glacier something more plug and play (and ideally scaling well)
What I would like to see is simulation engines
The only two to fit into these are:
- quantum
- Unity DOTS (whenever ready - if they do not mess up with a lot of coupling, but looking ok so far)
unity wouldn't have scaling problem with GCP yet they somehow can't do it still
well... I mean for complete with physics/navigation... of course you have enTT, Entitas, if just for ECS part
"Plug and Play" is a term that isn't really going to be a thing for networking for a while
plug and play (and ideally scaling well)
Are these compatible? 🙂
Can be done, if you only want to do Asset Flipping
Game networking is a layer of problems you have to make compromise choices about, each affecting the next layer. Quantum gets around that with a lot of magic of its own, but for the rest - latency and loss fight any attempts at "just works"
Making a universal state transfer engine that just works, would require an insane number of toggles for you to set, to not be too specifically coded for one answer.
And that is ignoring that fact that game networking is actually about the simulation, now the messaging.
To do it right, you need the networking engine to take over your simulation, or at least couple with it perfectly - which means you now have to make a generic physics/controller engine that is universal.
Which, is what Quantum has done.
Not sure any of this is helping 😕
well it does at least in describing what's current state so to speak
Quantum gets around that with a lot of magic of its own,
Not magic. And it does have a lot of toggles and settings for you anyway.
But it does let you focus purely on gameplay
k looks like it's worth paying attention to dots netcode and knowing photon/quantum exists meanwhile
thanx dudes ]
Pfft. It is voodoo and you know it 😛 @gleaming prawn
You and fholm don't code, you do incantations to the dark lord.
There's more to it than the 2 of us as welll:)
I forget that its grown into a full team
I'm actually hardly coding nowadays, lack of time... Have a new right arm for physics
@wary bluff oh, he's around, not sure about the others
\o
Can somebody help me with account registration and sql? I followed a tutorial by BoardToBits but I get an error saying my user registration failed.
Can somebody help with this?
So I'm making this basic multiplayer game, and here is where I am at.
I can connect, and my friend can connect, I want to update his players animation to walking when he is walking, so that his animator triggers on his screen and mine, and vice versa, so when I'm walking, I can see it, and so can he.
I've already dealt with moving the position so that's fine.
Here is my approach.. When I receive the PlayerPosition packet from the server, this is how I handle it on the client
int _id = _packet.ReadInt();
Vector3 position = _packet.ReadVector2();
GameManager.players[_id].transform.position = position;
var clientAnimator = GameManager.players[_id].GetComponent<Animator>();
if (GameManager.players[_id].position != position)
{
Debug.Log("PLAYERRRR: " + GameManager.players[_id]);
clientAnimator.SetBool("isWalking", true);
GameManager.players[_id].position = position;
Debug.Log("PLAYER " + _id + "MOVING!");
}
else
{
clientAnimator.SetBool("isWalking", false);
}
But that doesn't work.
What it does is that when I walk on my client, his animation starts running, but only on my screen not his. And when I stop, his stops.. Again only on my screen and vice versa.
Any idea why?
Are you doing anything to ensure you are applying this to the right player object?
if (playerID != localPlayerId) kind of thing?
I have no idea the context of this method you are showing, but what you are describing sounds like the messages are going to the wrong net entity.
So I'm receiving a packet from the server, I'm grabbing the correct player by the id, so it's grabbing the player corresponding to the packet GameManager.players[_id]
But i realized it's in a loop, so that could be it, maybe my issue is that I need to make sure to not do anything for the rest of the players that's not the local player
Any one else having problems with Photon recently? Suddenly my lobby is no longer working after not changing anything although my Unity recently updated
Nevermind, Updated Unity Hub and now it works 
Hello, I am looking for a professional web designer for a paid job (an online store)
minimum must have experience and a sample of your previous work
Must speak French or English.
be over 21 years old
If someone knows someone or is interested, contact me by private message
Wrong kind of networking
lmaooo
LLAPI question - is the transport supposed to send a 'Disconnect request' when it disconnects? Some of the docs refer to 3 ways a client can disconnect:
(2) The connection has not received any traffic at all for a time longer than DisconnectTimeout
(3) Flow control determines that the time between sending packets is longer than DisconnectTimeout. ```
But in our tests we're only ever seeing 2 or 3 occur. We know this, because if we increase DisconnectTimeout to, say, 20 seconds, then a client-side disconnection only registers on the server after 20 seconds.
Anyone have any experience with this?
@stiff ridge just wondering are photon devs okay with this https://streamable.com/c6zznd
you mean from one game client connect to multiple rooms?
That's allowed. It counts as 100 CCU
Using 1 client and joining as 100 in lobby, room or whatever
It counts them as different ppl/ccu
You can use multiple clients and surpass the ccu very quickly on a game or what not
should kinda limit connections per ip xd
That's allowed... Nothing wrong with this
You mean a game that lets people create rooms for a big number of clients, right?
Like for what legit stuff can u use it
Several game architectures may need you to be connected to multiple games/rooms
I mean if u can mod it or something
I think you are looking at it only from the perspective of PUN
But there's nothing fundamentally wrong to let a single process manage mltiple connections
The game developer can decide if he wants the server to allow this or not
Using the existing authentication mechanisms, etc
It's up to the developer to let it be possible or not
Thats if you host it, what if u use cloud? If u make a game i dont think you want to have a huge bill to pay at the end of the month
I said it's not technically wrong
Thats if you host it, what if u use cloud?
You can still set custom authentication
and on enterprise cloud you can also have full control
Too bad not all devs did it on their games but what legit things u can do with this feature XD
Again, nothing technically wrong to let a client connect to more than one "room"
Too bad not all devs did it on their games but what legit things u can do with this feature XD
Read a bit about how Destiny works
ah that is quite clear
A single game session connects to multiple "servers" for different parts of the logic, etc
So its up for the dev to make an "anticheat" from it
Anticheat can mean 100 different things here
I mean antiabuse from modders
The game developer can do a lot.
stares at vrchat and attack on titan
Attack on titan you mean the fangame, right?
There are legit issues that are being tackled there. This is not one of them
This one is very simple to disallow
Not sure what they are doing though, I do not work with them (the devs of these 2)
There are no devs AHAHA
Well except vrchat
But they got bullied for years
Idk maybe they live in peace now
Wdym
with no dev accountable for...:)
If its being paid in advance you keep it up to the end even if devs leave it
We could terminate any
So if i pay for 5 years and leave the game after 1 you can terminate it? Wtf
If we communicate with you
Why would you terminate the service if it was already paid
Read the EULA
I'm not the legal expert
If something is up for you to "play" with, it's because it's fine for us...:)
BUt I do not work directly with that, to be clear
From what i saw
Photonians terminated the service when the terms of contract expired
Even if the dev left 4 years before
Oh yes sure you terminate it if there are ccu issues and the dev doesnt answer
Or stuff like that
of course. If dev still answers and tackles what needs to be done, no problem
If he doesn't and we still keep it there, there's a reason...:)
ty btw
it's there so you can have fun with the "modding"
ye
Are you a photon dev
Yes, but not on the stuff related to that
The client-side issues cannot be tackled
Unless the developer updates the game, of course
That one uses an ancient version AFAIK
So, no problem... That would be interest of the dev
Alright just wanted to know
It's public here, I'm one of the developers of Quantum.
I think these are not possible anymore
for AoT the only things left that I know of are on the client, because the "dev" is nowhere, right?
the array-explosion vector is fixed, etc
you guys know that
yup
Yes all server side stuff seems to be fixed but i meant sending from client to client an event of 400k+ bytes and such
Maybe the server guys will still do a few things, of course, you can always protect more
I'm not sure that is possible. AFAIK thereÄs a limit per event.
But anyway... The limits on these are configurable
It was last time i tried, unless they made another patch
But it's really up to a developer...:) If there's none, have fun
Ty we had
In the stuff I work we do block messages on the server level, etc
So that would not happen, but yeah, not familiar with the specific cluster AoT runs on
You mean photon service? Pun 1
No, the actual physical servers
Aa
We have multiple clusters of servers, etc
Like their ips
for the several public clouds, for the private ones, etc
the IPs change even in a single cluster
Due to DDoS protection stuff, etc
This is standard stuff
Mirror now also have a relay server transport which is open source!
nice
Ah also i noticed when there are too many props in server, the server starts spamming properties/events making the room closed and invis every second
Would be better if it just disconnected the user who surpasses the prop amount, and not allow anyone to reach it
For @tobi
Hi, i got more a feature design question. Would you rather offer a way that the user can create a message for a specific use case and let them send/receive it or let the user use a Stream interface so he can just writer/read data from a stream ?
Who is the 'user'?
Anyone that will use my lib later
So, programmers. This is really about what level you intend to pitch it at.
A Stream interface is super error-prone but super-flexible. If you're going to do that, you're probably not really providing much help. But maybe you're being deliberately flexible. I think you have to choose based on what you're trying to achieve - it's not the sort of thing where a community vote makes sense
I'd say for a lib you should provide both
@timber plaza, thx, yes, we saw the properties issues, too. It's a bit more work to add limits.
I'm writing a small client/server system, literally one android Unity app running on a device and a main program running on Windows written in C# + WPF
I want to implement a discovery system, so that the mobile app can automatically connect to the desktop app
point is, I'm drowning in networking issues
I'm using the low level C# facilities to set up the connection, but I don't know if there's a more native way to set up a nonblocking receiving on the mobile app part
for android you'll want to use an AsyncTask
to run your blocking reads/writes
but isn't there some package you can use that makes that easy?
There's Mirror, but it's HLAPI, I need a communication channel with a non-Unity application
also, I need both UDP for the discovery and TCP for the actual connection
Hi, I am looking for a team or a team mate or a mentor. I have been learning unity for a few years now and need more experience. I am to the point where being part of a team would greatly help my learning. if anyone wants to start any kind of anything, please let me know
wrong kind of networking lol
@lament bough if you are using a mobile device as a client, i would recommend using only UDP, or if you need a stateful connection, use a websocket client
trying to write your own TCP client on a mobile device, that handles disconnects and suspends correctly, is very challenging.
websockets in their modern form contains the minimum set of things you need for a connection-based protocol that's useful for mobile
you would just be reinventing websockets for extremely basic stuff, like hitting the home key and trying to tell if the connection is still working when you resume the app
I don't need it to be so fancy, it's just a research project
nothing commercial or anything, I just need to log data over a local network
if it's write only, use http requests
doesn't sound like it needs to be stateful
http is the best, most widely deployed and thoughtful networking technology in the universe
actually, it does, since the desktop app should send start/stop commands to the mobile app
then you should use a websocket
I need them to be at least synced
you just don't know yet how many problems you will have
and that using a websocket is actually really easy
can websockets be used over a local network?
of course
you just don't know yet how many problems you will have
@amber trench please, don't assume things, I know it's hell
lol
{
UdpClient listener = new UdpClient(11000);
IPEndPoint serverIP = new IPEndPoint(0, 0);
while (true)
{
Debug.Log("Running");
var data = listener.Receive(ref serverIP);
}
}
What's wrong with this
What it's supposed to do: listen for UDP datagrams on the network, run forever and print "Running" before each Receive operation
What I'm expecting: Prints "running" each time a datagram is broadcasted on that port
What's happening: prints "running" only once, locks on Receive even though I'm sending packets with PacketSender
NVM, fixed
i think you'll figure it out
you probably wanted to bind to a multicast group
@lament bough on mobile devices, your socket binding can be killed when the application is backgrounded, though your thread will not be
the thread will be suspended
so just make sure to wrap in try {} catch {}
and another while loop to re-bind
I'll keep that in mind, thanks
Hey, i've been trying networking for like a month
and its impossible for me
literally
can someone help me set up Photon 2 to my project
my game have a simple movement
is a top-down view game
my player just move around and rotate
Im super new to pixel arting in unity, is there a way to scale the unit size to 16x16 or have it so pixels snap to a certain grid etc?
@cold iris Wrong chat, try #archived-art-asset-showcase
@rigid tundra I could use some help working on some small projects. My game ideas are unique if nothing else, I and others believe they stand a chance in the currently stale and dull gaming world.
@rigid tundra I am doing the majority of the work, but anywhere that I can gain some relief would be helpful.
@rigid tundra you can even choose which project you like the most. 🙂
@hazy sage zeeb's point was that this is the wrong channel for that. This is networking as in data packets on the wire, not networking as in collaboration / help wanted.
I'm trying to use Mirror to make a basic multiplayer game. In it, I spawn a object on the server with client authority and want the client to then have a reference to it so it can set stuff up on it. Both RPC and TargetRPC run and receive the data but don't actually change the variable. https://pastebin.com/nLXPQCPY is the code, it currently returns "Yeah, it's null." Alternatively, is there a way to search for a game object that: A. Has a certain name, B. The client has authority over?
@hallow perch join mirror discord for help!
Thanks.
@fair cosmos Do you have a link? I got that working but now have a weird bug I can't solve
If you are using Mirror, they have the discord link everywhere
Can't paste it here, Unity discord is extremely intolerant of posting most everything.
Guys, what is the most practical way that I can test an android muliplayer game after building it from unity. If it was a windows version I would have open 4 instances of it in my pc. For android, Idk what to do
Open from two phones? Phone Vs editor/pc-build?
I personally start testing editor Vs Android build.
Okay so there won't be any issues in communicating between an windows buid and android build?
Okay cool
use multiple emulator instances
So i just took a look at mirrors rrt calcuation https://github.com/vis2k/Mirror/blob/381adaa8f2cd2bf9a7df4ed01a3a2837573227f4/Assets/Mirror/Runtime/NetworkTime.cs . Is that the way to go or are there any other examples that you guys would share ?
Depends what points you are timing really
And whether you need to factor in buffer sizes along the way and such
If you are directly writing messages to states (fields) rather that snapshots that are interpolated, a basic RTT will do for some things.
If you are doing any kind of state buffers, you have to factor in how long between arriving and application, as well as 1/2 interpolation time... stuff like that.
Typically once you are tick based you tend to not use time, everything is in terms of ticks.
Quick question, if I am looking to set up some online coop what is the best way to approach that? I know back in the day I used UNET then after a while it was PHOTON, now coming back into unity dev and it seems that there is yet another protocol. So it begs the question what is the best for a simple multiplayer co-op networking experience using the most up-to-date version of unity
All of the netlibs outside of netcode will probably discourage getting too bleeding edge on the Unity version. 2019 is not in the most stable state.
Is that code the most up-to-date library? What do they use in the dots example?
Netcode* not that code
not sure what you mean by "up to date" really so hard to give you a good answer.
Are there features in 2019 you are specifically needing?
if not, stick with an older LTS
No not necessarily, like I said I'm just now getting back into it after about a 2-year hiatus. I know back when I first started everyone said that unity's built in networking was total shit and so you had to basically use photon if you wanted anything to work. But I know they released a new library at some point. Interesting that you say 2019 is not stable, do they change something about networking?
Built in is still a mess, its preview and depends on preview libraries for DOTS.
Fundamentally, it is doing much right - but its a mess and not production ready.
HLAPI was deprecated ages ago, right now they are in networking limbo
Gotcha
So most people use Photon stuff, Mirror, MLAPI or Forge
That's kind of how it felt when I left lol, oh well I got the job done with the built-in networking, and photon before so I'm sure I can make it work
or do their own networking at the transport level
Photon is three libraries, and they are each very different in architecture
Mirror is like HLAPI
I will take a look at mir ror and forge and MLAPI
they took it and are keeping it alive
MLAPI is also like HLAPI, but started over so its much cleaner, but its also being written.
Not sure of the state of Forge, those guys don't come in here often
So, not to put you on a spot. But if you were going to be making a game similar to human fall flat, or gangbeasts, what would you personally use ?
Photon Quantum, pretty much for anything that can work on it. But its a different animal. Fully deterministic fixed point library, and it costs $1000 month just to even be developing on it.
So not a hobbyists option.
Outside of that, depends on how much you want to learn networking, and how correctly you want to do it.
Quantum and Bolt are the only two correctly done full stacks, but they aren;t the right answer for everything.
Mirror and Pun2 are not full stacks, they are just the messaging and entity lifecycle control layers
Mirror/MLAPI are Unity server based
Pun2 is relay based
All of your options will be state interpolation based, with the exception of Quantum, which is deterministic extrapolation.
Well, I was hoping that they had figured this out with the built in networking at this point, but it sounds like it's time for some robust googling
There is no one engine they could build that would work for everything anyway
You have to kind of understand the architecture choices and what games they are good for, before picking one.
So I want to make a 4 man multiplayer (real time (could be compared to diablo 3 gameplay wise)) game with a p2p architecture, but when I started to look into it i got kind of confused and have no idea what to do/use now...
So apparently the HLAPI is outdated and is basically out of service and LLAPI will be only supported till the end of 2020.
It´s supposed to be replaced by the "connected games", but i couldn´t really get it to work and I´m still confused on how its supposed to be working do to the lack of documentation (or maybe i just didn´t find the proper documentation).
So i wanted to ask what you guys think on what i should use for the game and what i should look out for ...
Should i use the new system or the old one? Or get a completely different one?
What part of an ip adress refers to the network the host is on?
@knotty berry with the unity track record on their official libs, it still amazes me people even consider them
Look at the third party offerings, most are production ready and used by real released games
I looked a bit into mirror and i guess ill try it with that
Check mirror, mlapi, and photon stuff (a biased opinion is photon quantum for the particular game you want - but I'm one of the Devs)
When receiving a datagram packet how does the receiving program know the packet is coming from the program it actually wants data from
And not some random other program also sending out datagrams
@toxic lintel When you receive a datagram you know which IP and port it came from - that is basically your connection information
Ah alright
So you basically listen to every datagram coming in all over the planet
And then do an if statement to check if it is the one you want
But if thats the case doesnt that make incredibly long queues of datagrams you want to check?
No, if statements aren't slow. 🙂
You can probably do a billion of them in the time it takes to read one packet
And who else would be sending one to you?
It just sends the packets out right?
Not perse to someone
Just into the internet or am i not getting this right
No, UDP packets are sent to a specific destination. Otherwise, everybody would be receiving everyone's messages, which would have brought the internet to a standstill. 🙂
Ahhh
That was exactly my misconception
So how does sending packets to a destination work
When sending a packet you iust input (data, length, ip, port)
Right
So how does the program know wjere to send
You tell it
How?
Give the IP and port
No, it's the destination
It's like a letter. You have to put an address on it if you want it to arrive
Ahh
All my assumptions come from a java university course and that told me the ip and port inputs where sender
Destination makes more sense
Even in Java, if you're sending UDP messages, you need the destination IP and port. These are networking fundamentals which aren't language specific
So when you create a packet object you input the destination
So is there a way to know where the packet comes from?
You provide the destination in the send procedure. There will probably be a function like Send(data, destination)
Similarly, when you receive from a UDP socket, you will receive the data and the source
Oh so the actual packet object has the sender adress and the send function takes a destination adress
Tysm for all the help
I don't know if there is usually a 'packet object' once it gets to your application code, but from the network's perspective it has a packet which contains both the sending and receiving IPs and ports in the header. So you'll get that sender information when you receive, yes
are there any free rollback netcode solutions for unity?
I know about ggpo being open source but I dont want the bleed my brain into making a wrapper on ggpo
Free? Not that I know of...
I'm one of the developers.of photon Quantum though. You probably heard of it... But, not free
GGPO isn't really, uh... it doesn't solve the hard part of rollback netcode... determinism
and it's only really usable with projects made in C/C++, etc. yeah you can probably make it work in C#/Unity?, but it just seems like an awful lot of work for something that's so simple to implement yourself
isnt the source available online now a days?
@rustic oracle
isnt the source available online now a days?
@graceful zephyr yup it's open source. but like I said, I really dont want to spend time into wrapping the thing for C# and Unity since I know it's written for C/C++. if there's already a ready-made, battle-tested free solution
but if there isn't then i prolly have no choice but to bleeed

@rustic oracle unless you have a simulation able to do prediction rollbacks determinism... ggpo is useless
The ggpo sources also have no networking transport, right? That's quite easy to get, but thats one more piece missing there if I remember right.
With no clock correction as well....:)
I wonder if anyone would be willing to tutor me on Unity & Photon2 Networking for an hourly rate?
Would it be a bad idea to use a bitmask to store items in a players inventory on a database? (To save storage space, especially if there is a lot of players with a lot of items)
@worn wolf if you have 32 possible items and they are not stackable, could be fine i guess
if you got stackable items you could use multiple bits in you bitmask representing the item
but i'd try to handle that stuff dictionaries anyways
unless inventory system is too simple
You would have to explain what your bitmask represents, because at a glance that seems like it won't convey nearly enough info.
A bitmask would indicate if a slot is full or not - but not indicate what occupies each slot.
I would probably for networking sync a list of indexed item types
If you need to also include the position in inventory, that would also be a bitpacked index value.
Ah I see okay
Also
@worn wolf if you have 32 possible items and they are not stackable, could be fine i guess
@high night you can't do more than 32 bits in a mask?
@worn wolf you can, you could do byte arrays and stuff
if you wanna have 40 bits, you can do byte[5]
although there should be better data structures for this stuff
however, i'd do a dictiony as such:
dictionary<byte(itemId), byte(quantity)>
hi im making a multiplayer game but when 2 players join they are both controlled by one player how to i fix that?
however, i'd do a dictiony as such:
dictionary<byte(itemId), byte(quantity)>
@high night Okay thank you
@worn wolf you can do as many bits as you want using something like:
public unsafe struct Inventory {
public fixed int Mask[3]; // gives 96 bits (3 x 32)
}
I see, thank you
@tropic kestrel the technology you meant to say was NAT punchthrough. you should probably just use a commercial solution.
@worn wolf yes, it would be a bad idea to use a bitmask to store items in any real database
@toxic lintel yes, a UDP packet comes with its source IP and port
i'm not really qualified to say specifically which commercial solution to use
if a player's machine is supposed to be a host, you can use STUN and TURN servers to relay network traffic despite the users' network topology and most firewalls.
you will have to carefully read the sockets API to understand how to get the sender's IP and port
when using a datagram (UDP) socket
there are at least two APIs for this in .Net you can use
UDP is connectionless, but the sockets API uses language that sounds like there's a connection
so this is going to be really confusing for you
STUN and TURN are just names for different kinds of relays. you'll see it beside webrtc because that's often where they are used
@tropic kestrel when you use a commercial solution, either they're crazy and they write this themselves, or they just use a STUN server to relay traffic
an open source one
it's all sort of the same thing with the same performance impacts all the way down
you can also just use some other company's STUN/TURN
really depends
Stun and turn are complimentary standards, not the same thing at all
In short, stun is the standardized protocol for bar punchthorugh, while turn is for relaying...
Not really
ultimately very few games do P2P
if you're making a game for Xbox you use Microsoft's services for this
Stun is used for games in several commercial solutions. It's just convenient to use a standardized protocol
"Xbox Live Multiplayer Relay Service"
Steam services does punchthorugh automatically when you use them, so you seldom really run data through their rwlays
yeah
Xbox teredo same
it's tough
Photon includes native stun in both our c++ APIs and in photon bolt, etc
hey i didn't group you in the crazy group 🙂
Because that is not standardized
i put you in the sensible category
"when you use a commercial solution, either they're crazy and they write this themselves, or they just use a STUN server to relay traffic"
I'm just trying to add a bit to the discussion
lol okay okay
i mean the unity games are probably P2P
on the Switch
like Ultimate Chicken Horse, Overcooked 2, etc.
it's almost as though, what would make the most sense, is if unity provided some kind of library that runs its single-threaded game engine in an embedded, headless way
that is probably too much to ask though
so that people never do P2P ever again
yeah but that's horrible
That's where the problem lies...
running the engine
It's not,.depends.on how successful you are
That's the same you do with unreal
It's one of the valid strategies, albeit the most expensive one, but has its pros
yeah but microsoft and sony is basically giving the platform away at cost to those people, at that scale
the Rocket League people
when it comes to unreal
For unity, using our stuff (photon) you can pretty much use any strategy:
- bolt is client server, like unreal, either.with punch through or dedicated server
- quantum is deterministic (server based.input management though, not P2P)
- pun is pure relay
It's a matter.of what is feasible for your tittle
The amount of money epic pays to Amazon is significant
ideally i would have
var server = new UnityEngine();
await server.LoadResources(file-like);
await server.StartScene(scene index);
server.Play();
...
server.Dispose();
Server coats are their n1 expense AFAIK, but still profitable
it's 2020 and we can't do that yet
Lol,.you are describing what we do with quantum
well, but normals want to lay out the physics in the scene
Unity track record with multiplayer is sketchy at best
using unity phsyics or whatever
they want to use the editor
and What You See Is What You Get
We use the editor...;)
you know what i mean
lol
That's what we built for our customers
listen i like quantum
Have you used it?
no
It's not a silver bullet,.of course
i like the idea* of quantum
i do the other thing, which is just writing all the game logic separately
You would like the real one even bwttwr
i mean, a priori, for the server platform we use
Running logic on server is always more.eypensive,.that's why in quantum that.is optional
Unity.is, loosely, moving towards what you described
But they seem to be very far off yet
Delayed by one year again...
it's a big engineering challenge for sure
i think people want their C# stack to look like their game stack
and that's very difficulty to achieve
I think to go towards.what you described fully is beyond their possibilities due to business model restrictions
stack meaning, literally the methods and variables that appear in your stack
i am not a Unity PM, but it's true that if i wanted to sell $0.40 of compute time for $40, i could not make unity easily embedded, because that is how everyone would use it
someone would go and compete with me, selling $0.40 of compute for $1.00, because they are happy with that margin
it still wouldn't be free
someone has to pay for the computers
You mean unitys?
yeah
Amazon, ms
for this multiplayer thing
And epic, and steam, etc
Steam doesn't really sell $0.40 of computer time for $40 though
Everybody is fighting for a piece of the cake
No, but they are competing for your players data
Blizzard, Riot, they run their own datacenters, they don't have to pass the Amazon tax onto the consumer
ah yes, that valuable LoL chat data...
And then they offer you a cheat entry into relaying/NAT ounch
Blizzard riot might have that for their flagships
i think the real reason it's a dead end is, anyone who knows what the value proposition actually is will feel like they're getting ripped off
But they use off the shelf stuff as well...;)
Maybe knowing the value proposition is one of the reasons we are getting cool customers
i got bad news for you though, our backend is java
Wouldn't that be bad news for you?
lol
i'm pretty bullish on Graal, i think that will be the future
il2cpp works and is shipping today
with real games
I think java is the current COBOL
lol
It's here.to stay, for that reason
So everyone's job is safe, no worries, lol
You got a point with il2cpp
I just don't see why java is the future with net core current state
yeah, most of the value is tied up in the legacy
the best indie game of last year was, ultimately, a java game (Slay the Spire)
Specially.since oracle.reasons
Well, you also have these one trick ponies.with any language
today's biggest hit
You have probably more.suvcessful titles.done with game maker than java... But then there was original minecraft
yeah
Just don't see that getting any tracking, java seems dead.for the new generation of content creators....
You get these one ofs
Traction*
some middle aged CEO who doesn't play games, they're going to give the Star Wars IP to whoever has the most photoreal rendering
and it's an FPS
because that's what they understand
they might understand networking to mean, this is where i get the lootbox revenue
the events revenue
and how i keep the IP for 3 years instead of 1
that's not really got anything to do with java
Nope
It has more.to do with how many minutes you can squeeze from that team instead of Netflix
i can actually think of many vanguard networked Java games though
besides Minecraft
Ultima was a mix of java and C++ backend, Sun Labs was all about it
so there you go
No chance that would happen today with such an inneficient backend... :)
The ticket for playing these games has gone down a long time ago since f2p
As you said
the most expensive part of my backend is the bot
If you are paying 1$ or 40$ per.compute time, you need to use that better
Bots are complicated indeed
we run our own servers, it's the only way
as in physical hardware
you're right it's just too expensive with cloud providers
you need to have a lot of expertise though
the real question is, do you learn something about how your game should work by doing this all yourself
i like quantum, i think it exposes the right learning to people
to make them embed their game engine
you can't do The Network Thing for a lot of games without making something that boils down to an embedded runtime
Arguably
i think for a lot of services oriented games, where you might have inventory to manage outside of your game
where there's this meta, that looks more like a conventional piece of single-user persistent-state software
that's where Java shines as a platform, not because it necessarily excels at doing any one thing but ismply because it can eventually do them all
it's just where people make their money, customizing avatars
the best way to play multiplayer Ultimate Chicken Horse is on your local switch
lol
alright goodnight dude
Nice talking...
PUN is in development mode (development build). As the 'dev region' is not empty (usw) it overrides the found best region. See PhotonServerSettings.
UnityEngine.Debug:LogWarning(Object)
Photon.Pun.PhotonNetwork:OnRegionsPinged(RegionHandler) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2312)
Photon.Realtime.RegionHandler:OnPreferredRegionPinged(Region) (at Assets/Photon/PhotonRealtime/Code/RegionHandler.cs:251)
Photon.Realtime.RegionPinger:RegionPingThreaded() (at Assets/Photon/PhotonRealtime/Code/RegionHandler.cs:459)
ExitGames.Client.Photon.<>c__DisplayClass6_0:<StartBackgroundCalls>b__0()
System.Threading.ThreadHelper:ThreadStart()
help
just created my main menue with photon
when i press play to go to scene 1 this is the erro
@everyone
it's probably an old question, but in peoples opinions whats the best networking for multiplayer games and why? any recommendations?
@cold estuary doesn't seem like a bug, it's just a warning.
PUN is in development mode (development build). As the 'dev region' is not empty (usw) it overrides the found best region. See PhotonServerSettings.
one that seems self explanatory. Just unset the dev region in the settings it mentions.
PhotonServerSettings is a file in your project
I don't even use photon and I can google this https://doc.photonengine.com/en-US/pun/current/getting-started/initial-setup
Do I need to sync the players health bar if it only updates on the client, not sure why but when I set the health to be the value of a slider the slider value doesn't change depending on the health value I have it set in the update but it doesn't update
could u show me an example please
your code should read some synced health value and apply it to the slider @empty quiver
every frame or every fixedupdate frame as usual
what networking asset
oh
you will sync your float with photon streams
or rpcs
you will learn how to use streams and RPCs
I've used RPCs before so I'd stored the health float in an rpc?
nah thats not rpc works exactly
if you want to do server authorith on health;
you have a health value and an RPC thats only called in server and updates on clients
server decides how the "health" changes,
and server updates the "health" value on other clients
@empty quiver
This is not the only way to do it though
RPC is just for sending information between users
and you send the minimal info between users to keep the game in sync
thats the idea
So master client to everyone else could I not just have the health bar controlled locally?
your clients wont be able to locally change health this way
The health system works just not visually
Also the player can't see the other person's health
its just server deciding what the value is
and clients recieving that info and displaying
you do it this way, all clients will have the health synced
.
@empty quiver Here's a tip for you, that could've saved me countless times back then:
If you wanna send some info via an RPC and that info is not included in the RPC paramater, it's never sent at all
Maybe you think you send some value i mean
but it's not sent you know
makes sense cheers for the tip
but does the health need visually need to be synced to other players?
@empty quiver just focus on having the actual "float health;" value same
then you can worry about the visual
same as the health bar?
no Im just setting the health value to a slider
Keep in mind RB sync and Transform sync are going to conflict. You use one or the other, not both. @wooden swan
ok
@jade glacier im using just the rb sync and its still not syncing the rotation
I made a script to do the rotation but now its laggy for the other players
I would avoid use any rb syncs really. The Photon syncs are all pretty much just there to show people how to code a sync. They aren't really for production use regardless.
"laggy"?
That term can mean a lot of things, but if you mean there is a delay across the network - that is expected - since the internet involves transmission delays.
can anyone help me?
@everyone
this is my code for networking but nothing happens when i press play
It was originally in the character script but I moved it to another script called player health
@hollow pelican have u tried simmer? https://youtu.be/5we9W_CEIb0
This is a 45 second guide to building and uploading a game from the Unity game engine to SIMMER.io.
Have a cool game to share? Go to SIMMER.io/upload!
Hey all,
Im running a UDP Socket to an arduino on the local network. The arduino reads a depth sensor, sends it through, I created a class to read it and send through the result, code here (https://hastebin.com/ahoxowisub.cs)
The weird thing is that code works in Visual Studio (2019). It connects, outputs the correct data, its perfect.
The only difference is a slight syntax difference and some structural stuff (this is a sub class for unity, its the main class in VS).
I have no errors in Unity, it just reaches the point of waiting for data, then doesnt receive anything. Does unity implement any blocking when it comes to UDP? I am fairly new to network programming, so this has been a big research area for me 😛
@worldly cedar yes you need to run the networking on a separate thread, and queue the messages for processing back on the unity main thread (and vice versa)
Hmm okay, thanks for the answer! Do you know of any resources around this? I have done some threading work in the past, but examples of it in this context would be useful
@amber trench I made this into a thread situation, no luck. If you get a moment, could you please see if theres any glaring mistakes? https://hastebin.com/uzileposeg.cs
Hello guys! Any one know good example of - Photon 2 Lobby ?
You mean PUN 2?
What are you looking for, @humble lantern ?
The docs for PUN 2 matchmaking are here: https://doc.photonengine.com/en-us/pun/current/lobby-and-matchmaking/
Photon Unity Networking framework for realtime multiplayer games and applications with no punchthrough issues. Export to all Unity supported platforms, no matter what Unity license you have!
Why do you use RPCs to spawn objects, instead of PhotonNetwork.Instantiate?
https://doc.photonengine.com/en-us/pun/current/gameplay/instantiation
Photon Unity Networking framework for realtime multiplayer games and applications with no punchthrough issues. Export to all Unity supported platforms, no matter what Unity license you have!
Because its a pickup and throw thing
You pIck it up, it goes into your inventory, then you throw it
PhotonView.Instantiate can only spawn prefabs
In that case, I'd recommend going with SNS. It has pickups done for you and is a great addon for PUN in general:
https://github.com/emotitron/SNS_PUN2/
The code you show doesn't have any activation in it. Maybe the prefab is also disabled?
Hm. right.
Any parenting? Is the parent inactive in that case?
no
No parent but the game object itself is inactive
But a different script is making it active
but its just not working
You Instantiate. That returns a new GO, right?
You modify the "original". Is that planned?
You don't use the result of Instantiate. You move the original and enable the original that got instantiated but .. the new instance is just placed.
That's all correct, yes?
Then I'm out of ideas 😐
I do use the new object
The old one gets deleted
I put it above the instaniate and it works
But everything after the instantiate doesnt
I assume you are trying to modify the thing you are cloning instead of the resulting clone?
is it tcp or udp?
Is there a networking solution that supports DOTS?
mirror, photon, unet, etc dont support dots
DOTSnet supports it, but its for mmos
unitys solution isnt out until q2 2021
Dots is not production ready, so most commercial solutions would not target it directly (although we are all experimenting and cooking something for when the right time comes).
Photon quantum IS dots though, in its own sense. It is a fully fledged sparse set ECS with parallel task system, etc... So same data oriented principles and focus on performance.
But we do not use the dots libraries because they do not fit our needs, so we built our own.
great, tcp makes it easy. You can use a statemachine to read message because they are reliably ordered.
common practice is to prefix messages with their size.
Read the size, read that many bytes, read size, read that many bytes, ...
reflection is pretty slow.
I like to keep track of the size of messages as i create/modify them so the size is an actual member of the type.
"it didnt like it" ok
Anyone able to help me with this: https://github.com/Unity-Technologies/multiplayer/issues/93
what is causing this errer as soon as a other player joins in?
The variable ObservedComponents of PhotonView has not been assigned.
You probably need to assign the ObservedComponents variable of the PhotonView script in the inspector
on fresh project still getting error...
These are the dependencies for Unity Transport
but it's having error with the 2d Animations?
even tried on 2019.4.0f1
Still uses 2D Animations 3.2.2, which doesn't seem to fly with Transport
appears to have to do with most recent version of Collections library
Woo, got it working with the previous version of the Transport package
NetCode is still wonky, but I just need low level networking anyway
Hi! Is a service like https://normcore.io/pricing a good road if you're making a game say like 'Rust' ? Where persistence is very important etc. Any feedback about it?
Hi, First post here.
I'm Franch Student, sorry if my english is not perfect
I began my first multiplayer project using Photon PUN.
I'm a little bit confused about custom type serialization.
I'm creating a versus tactical RPG. To manage the battle, I have a BattleManager that contains all the game state I need to synchronize :
- A list of team
- A timeline
A team contains a List a Character...
So I have multiples lists of custom types that contains multiple lists of custom types...
It's my first time with Multiplayer game, so the serialization concept is a little abstract, and serialize a complexe data structure looks too much fastidious to be the only way to achieve this.
How would you sync this game state?
Sorry, my question is really vague, but I feel that i'm not going in the right direction...
Why do i get this photon error when another player joins in
The variable ObservedComponents of PhotonView has not been assigned.
You probably need to assign the ObservedComponents variable of the PhotonView script in the inspector
Has anyone here taken apart the network code for the FPS sample project? I've watched the videos explaining what it does, but now I'm trying to put that together with the actual code from GitHub. The plan is to recreate chunks of it from scratch as a learning project.
Alternatively, does anyone know any good tutorials that explain it by going through the code?
@hallow fractal what does your photonView look like on your prefab?
Typically when you add a component like PhotonTransformView, you drag it into the list in the PhotonView of observables
...
There is a Team component built into the Pun2 lib you can look at for ideas, though not sure off the top of my head where or how to use it.
@fervent ibex
@jade glacier Thanks for answer ! I found a way to easily serialize data with Odin Inspector Serializer, so I'm able to serialize List etc... and throw it over network. So I think my current problematic is solved.
I don't see your line numbers, so no idea where the null is
What is null?
First guess is Player doesn't exists in a Resource folder
I mean, what actual field isnull
Find that out for starters
Double press error will usually get you to the line of error.
They are all exposed
Find out specifically what is null
Player exists in a resource folder?
no idea, first step is isolate what is actually broken. Find that null.
Hello i need some links for tutorial and information in networking. Andi'm here because u are may be good in this matter and have some links ^^
we're not
No idea what I just saw, sorry
anyone here who can help me with the master server?
all is done adding sv, removing sv, updating sv, refreshing sv
my mstersv uses php at backend + unitywreq
when removing(on server exit) does not confirms that the web req will reach or not, any comments how to remove dead servers
dont say to start another process(for removing what if the pc shutdowns suddenly) and also not pinging server(what if there are 1000 sv's and it will ping 1000's? really my isp can ban me)
timeout. if operation does not succeed in certain time assume death
@slim ridge
dude this can work, but if there are 1000 servers? so foreach loop through each sv and check wether they are timedout or not?
if you have 1000 servers i hope you have something monitoring them
any other method?
I would start your journey using the prototyping tools for that
There is a component called OnJoinedInstantiate.cs
You can derive from that class, or just steal the code in there.
@weak plinth
You can get a game working with just ConnectAndJoinRandom and OnJoinedInstantiate in a scene.
@jade glacier yep, it was hard to figure out where the cause was but i got it fixed somehow 😅
@weak plinth also newbie but this Instantiates the character in the room
In photon
Photon Unity Networking framework for realtime multiplayer games and applications with no punchthrough issues. Export to all Unity supported platforms, no matter what Unity license you have!
You need to make a resources folder and put your character with PhotonView on it, than drag the player to that script
Is the component not self explanatory enough though?
It's point is to be basic enough that you can see how it works
It is a component
Just put it on a scene object
@jade glacier does your asset work also with npcs
Remember the error i got that i got yesterday? it had emotitron, i thought it would be the same to put that also on a npc
Does someone here how to use rpc?
I have a script that should turn on and off a collider through photon, but i have no idea how to implement rpc
This is the script for the moment i use
can someone help with this, please? https://discordapp.com/channels/489222168727519232/497874004401586176/720889049853853840
ok think I found a way around
https://gyazo.com/5d327701ced755c62c573c63ad32948a my photon movement is really choppy, how could i fix it?
@weak plinth, lag and loss can have some effect. Your job with PUN is to hide that. The built-in TransformView is just a startpoint.
If you don't want to dive into these details, have a look at the "SNS" addon for PUN:
https://github.com/emotitron/SNS_PUN2/
It comes with better "out of the box" components to sync movement. It should be more precise.
Emotitron is part of the team for PUN now, by the way and we support this in a separate Discord server (invite is on the linked page)...
It may look a little more complex but I'd say it's worth it.
Install: Afaik, you just need to import it into the project and begin using the components.
There are links to various google docs.
One more thing about the install: Make sure to use the latest PUN 2 version!
You can't create Players in the CurrentRoom.
What you create with that RPC is an object, called Player.
The CurrentRoom.Players is the list of actual players in the same match.
And by the way, when you use PhotonNetwork.Instantiate(), you don't have to do that in an RPC. It is a networked method, so this is synced already (and no RPC is needed).
I would recommend reading and coding-along the Basics Tutorial: https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/pun-basics-tutorial
Photon Unity Networking framework for realtime multiplayer games and applications with no punchthrough issues. Export to all Unity supported platforms, no matter what Unity license you have!
can anybody help me with maing a unit build for aws game lift I'm stuck in this point
Build the C# SDK libraries. See the README.md file for the C# Server SDK for minimum requirements and additional build options. In an IDE, load the solution file that you want to use. To generate the SDK libraries, restore the NuGet packages and build the solution.
I don't understand what a nuget packages is and even search, i didn't understand
Hi, I need some help. I am running an AWS instance of windows server and I need to connect to a local instance of my game on my system. I am using AWS through remote desktop.
any one else have this error?
it only happens when im trying to access my playerIO database
ping me if you have a solution
Im a bit stumped, Im looking for the best way to handle netplay for a fighting game and im not getting very good results
I get very vague answers, I found "Mirror" for unity but I havent had clarity when it comes to how good it is on games that require precision like fighting games
like mortal kombat
Mirror, HLAPI, Pun2, Forge are all just messaging layers with entity management ... how precise or not they are depends entirely on how you code your simulation.
@merry arch mirror is useless for for fighting games
might anyone happen to know why I can only see unity ads in unity but they don't work once my app is live on the Google Play Store?
Is there a channel I can post request to hire? I would like to hire someone to write a photon script. Else if someone here is interested you can dm me for details.
@sturdy saddle No advertisement space here beyond Asset Store
Try the Official Unity Discord server
@small hare this is the official unity discord
Lol - sorry, juggling too many servers here
Does photon have an official discord?
@graceful zephyr what would you use instead?
@sturdy saddle Photon has official forums and tutorial examples for Unity.
@merry arch for fighting games the standard is ggpo, personally I would use photon quantum but I'm biased there so
@graceful zephyr is there any tutorials using ggpo in unity?
I looked but i couldnt find anything :(
No
found this. it's not a tutorial
https://github.com/provencher/Backroll
https://github.com/provencher/Backroll/tree/master/Documentation
PUN2 Related: When OnPhotonInstantiate() is being called, is it always being called after Unity's Awake()? Cant find any info on this.
use Debug.Log to find out 😄
Tried that but id still like to hear it from someone that really knows 😛
now that you've tried shouldn't you really know?
Please can someone explain what m I doing wrong, it's been days trying to figure out a way to set up user names in a simple chat, I tried bunch of tutorials and couldn't find anything that works, today I tried to take my names from a text attached to the player but it always ends up having the name of the first client across all of the network
this is my player https://pastebin.com/eBAzsx3L
my chat https://pastebin.com/p2C4qmgk
and my UI that takes the inputfield https://pastebin.com/5yAXHPCq
I would be very grateful if someone could help.
also I use https://github.com/vis2k/Mirror for my networking
nvm found my mistake
hrmmm photon problem:
so my code calls JoinRandomRoom();
if it fails make a new room and wait.
however... when another instance of a game runs JoinRandomRomm();
it also fails (makes a new room and wait) even though there's already a room ready and waiting.
how do I go about fixing this?
I'm ff dino dapper's tutorial btw.
nvm, I just need to be specific with the region
how can i do 2d overlapping using PUN 2?
im trying to make it so if a player touches another player the other player dies
alright thank you
still doesnt work unfortunately
In PlayerDie the destroy is placed twice for testing
Hello I am new to Photon I have a problem
@weak plinth but the player you play as is destroying the player it collided with so wouldn’t it be fine?
I just use colliding player so I can get the colliding object to void player die
Can you use GGPO for a 4 player game?
@weak plinth even when i do use punrpc it still doesnt work
Can you use GGPO for a 4 player game?
@merry arch you can. GGPO rolls back on input and received packet.
Excellent!
i found out it was a collision issue
but i do have another issue
are there any good ways of respawning without losing the player controller
just.. don't delete the player controller? disable it and hide the player
then just reuse it for the respawn
does anyone know if Mirror is good for shipping grade networking?
is it good enough for a commercial indie game is the question
I'm gonna start implementing networking in my Unity project soon I don't know where to start
I've heard Mirror is the new 'replacement' for uNet
but I've also heard people say there's no good existing networking solution for Unity
apparently there's been some nice titles made with it so it seems solid
these arent happening over photon even though i have punRPC at the top, does anyone know why?
it only happens locally
is there a simple easy way to make a 2D WebGL Multiplayer game?
@weak plinth
here's what i have with errors and stuff
can i set it to a gameobject variable?
???
okay so what do i target it to?
i'll test it
still doesnt work
@weak plinth its just these two lines that dont work
no errors just this^
oh
do i put it next to rpc target
im confused
can i just copy and past with no errors?
yea
photonview doesnt have a blah blah for viewID
nvm
yep it works, thanks!
some one help me please
@viscid tree directly ask question
@viscid tree you already got the basics of unity and programming?
@viscid tree most popular options are mirror and photon
you can find tutorials on photon
for mirror, you can follow unet tutorials
which one is more beginner friendly
like someone who knows nothing about servers clients and all that
if thats the case read some on gafferongames.com
Depends on what you are trying to do
@viscid tree mutiplayer is about sending minimal data keep all players scenes synced
PUN has great API, but it's made for peer to peer over relay
it could look like this:
player positions
player rotations
player healths
moving object positions
ai enemy positions
ok cool, which one do you prefer though mirror or photon?
okay i just looked it up and photon seems more beginner friendly
thanks
Just realize that by default one of the clients has a lot of control over the game
No. It can be any client
oh like cheaters/hackers ?
no dont worry im just doing this just for a little project with me and my friends
Ah in that case PUN is great
and its also in webgl because i dont want them downloading anything, just paste in a url and stuff and we can see each other moving around
WebGL is probably a good idea for your first commercial project too
true, but about the url
is there any way i can use netlify?
or is that just for js
You can use netlify, but since it's just for fun, just put it on itch.io or simmer or something like that
oh alright
thank you so much man, you're like the only person who's willing to actually explain instead of just saying "its too complicated to explain watch a tutorial"
Consider explicitly asking for direction instead of "how can i make a multiplayer gam"
Nobody is going to answer that question in full
hi guys i have a question : Unity NetCode is the new multiplayer system?
@tropic mango it will be, but in like 5 years
Is there a P2P (preferably WebRTC) networking library that supports Android (I've tried the Unity Preview Package but it doesn't build to Android yet)
@wooden swan, the target of the RPC was probably destroyed before the RPC arrived. The warning is just there so you notice why the RPC is not being executed.
how do i compare a variable from all players to determine the winning player using pun?
MIRROR 16.1.1 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
@gray pond curious about this: Removed: Discord Transport
We had a transport for Discord's relay
I wasn't the author, but my understanding was along the lines of Discord's API was buggy or they dropped support for it.
So we couldn't continue support for it and had to drop it.
It was ostensibly something comparable to Steam's relay.
Added: [Command] now has an ignoreAuthority option for invoking Commands on objects the client doesn't have authority over
That's convenient. Was beyond mildly annoyed that I couldn't do this 😄
sounds hackable
I imagine server is aware of the flag
if anyone can ignore authority nobody really has it do they 🤔
If server can enforce, no problem
@slim ridge That's not how it works
Understood about discord, ye makes sense
They were trying to push into these things, but it seems they gave up then
The authority check is on the server
so really it's ignoreClientAuthority
authority to invoke Cmd's was and is always a client-side feature, so the "Client" in ignoreClientAuthority is redundant
it's actually checked both on client and server for debugging convenience, so an unmolested client still warns if no authority but a molested client won't get away with anything because the server check remains intact.
devs have to add that option intentionally, e.g. on a door, to allow any client to call CmdOpen on the door object. Inside the Cmd, devs can still code for whatever server-side game logic, e.g. does that player have the key for that door in inventory.
but if that option isn't added by the dev, calling Cmd on an object the client doesn't own still fails.
The ignoreAuthority option doesn't change the message on the wire at all
it's not like the client is passing something in the message to override anything
how would u do pre-game lobbies like in fortnite or csgo?
im using mirror for the actual gameplay but idk what i should do for stuff like friends/friendlist/lobby

You should ask in the Mirror discord @weak plinth They have some built in stuff for that I am sure.
Does Mirror have a NetworkMatch class? I'm following a old unet tutorial and it doesn't seem to be anywhere. Trying to create one with networkMatch = gameObject.AddComponent<Mirror.NetworkMatch>(); just gives red "doesn't exist" lines and trying to create one with networkMatch = gameObject.AddComponent<NetworkMatch>(); gives a deprecated warning, and I'm pretty sure it won't interface anyway.
It's probably deprecated
@weak plinth Constantly running servers, server list, additional service for social
Social doesn't necessarily run powered by Mirror
Ah well, I didn't really need it anyway.
hi im trying to display ping for players but in the same location (top left) and what im doing is instantiating a text and changing the value to the players ping, it works fine but the problem is player1 can see his ping and player2's ping and vice versa, how to fix?
@spring crane run on what then?
Not sure which lib, but none of the libs really let you ping like that. Players are not aware of other players connections.
@viscid tree
Clients can ping the server. You could come up with an internal method where the server pings other clients, and returns those values to everyone - so they can add that to their own ping to the server.
okay its photon
Clients don't talk to one another. They all talk to the relay
sorry for my bad english its so hard to explain what's happening lol
okay so basically i have two texts in Unity and both players see
each text is has a number which is the players ping
but the player can only see one since it's him ping only
you can have each client broadcast their ping results with an RPC
ok ignore the ping its just the ui text thats overlapping
does it have to do with photonView or something im not understanding this very much
im looked it up but didnt find any questions for it
I don't actually follow the question, sorry.
wait ill show you
okay so im player2 right now and the above ping im not sure if you can see is overlapping with another number
the another number is PLAYER1 his ping
Offset it based on the player.ActorId or something
Though you would typically generate that list by iterating the dictionary/list of current players in the room
is there no solution other than offsetting because i really want it that place
also generating what list, and how do i get the list of current players in the room
i'm literally started doing this yesterday
There are a few options. One is to generate the contents of the text UI by iterating through the CurrentRoom.playerList or whatever.
Player 2 - 100ms\n```
This is more of a Unity question than a networking question I think
ok, so i think you misunderstood, but i found a solution myself but it needs to know something
so here is a part of my script that checks if scene loaded and then adds the players and ping text
private void OnSceneFinishedLoading(Scene scene, LoadSceneMode mode) {
if (scene.name == "RoomScene") {
CreateScene();
}
}
private void CreateScene() {
PhotonNetwork.Instantiate(mainPlayer.name, mainPlayer.transform.position, mainPlayer.transform.rotation, 0);
PhotonNetwork.Instantiate(debugStatus.name, debugStatus.transform.position, debugStatus.transform.rotation, 0);
}
debugStatus is ping tex
but i found the problem, when i check, it instantiates UI Texts as much as there are players
so thats why 2 players overlap
networking instantiating UI is generally going to be messy and not the way to go with this
but what i want to do is check like PhotonNetwork.IsGameObjectExisting(mainPlayer.name, mainPlayer.transform.position, mainPlayer.transform.rotation, 0);
so that it doesn't duplicate
I'll try re-reading one more time to see if I can understand your question
wait i think i found a solution
let me test and ill be back in a few minutes
okay im almost fixing my problem
but i all i need it to find out how to get the ping of a PhotonView component
like this
PhotonView photonView = GetComponent<PhotonView>();
photonView.player.getPing() // ????
just an example of how it WOULD work
@jade glacier
components don't have ping, PhotonNetwork is where you find most of that.
alright can i find a ping of a owner of a photonView? or from a ownerId?
PhotonNetwork.GetPing() gets you the ping for this connection to the relay
You cannot ping other players
Players only know their ping to the relay
okay so in that case, how do i go about making a singular for each player for example:
in player1's hierarchy there would be two players him and player2 and one debugstatus for his ping
in player2's hierarchy there would be two players him and player1 and one debugstatus for his ping
before it was:
in player1's hierarchy there would be two players him and player2 and two debugstatus's for his and player2's ping
in player2's hierarchy there would be two players him and player1 and two debugstatus's for his and player1's ping
Im getting lost on your question, sorry. Not sure I can help much more than I have.
also why is photonView.owner not working?
How so? Owner is not the same as controller btw.
Owner is the default controller, usually the player that instantiated the object (creator)
If it is a scene object, by default the owner is null / 0
This doc is part of some work we are doing for the next release, it indicates the definitions/behaviors of creator/owner/controller and IsMine.
@weak plinth Anything that isn't built to run on some Unity instance
I just wanna save as much time as possible, don't wanna write unnecessary code if there is a simple solution for this
Is there cases where whe want data sent reliably but not ordered ?
short answer is: there could be
We do use this in Quantum... BUt there are other use cases
Reliable unsequenced lets you ensure a packet will arrive, without holding up other packets if packetloss occurs.
yes, so they arrive slightly faster in some unstable conditions