#archived-networking
1 messages ยท Page 80 of 1
support is kind of awful too.
Yeah, I didn't "enjoy" using bolt, but I recognized why it had to be how it was.
support is kind of awful too.
When was this?
You can tell Bolt was made by an engineer for an engineer
If your question is anything beyond entry level it tends to go unanswered
eg: I actually found a bug with regstering/unregistering events, was able to replicate it 100% of the time. I posted on their discord a couple times and no resolution was found.
I honestly don't care at this point, I'm not on that project anymore and I won't be accepting jobs with Bolt in the future.
But it left a bad experience.
When was it?
Awhile ago...
Ohh
5+ months perhaps
I guess that was before Ramon was assigned as the lead dev
I bet the experience now is different
I don't remember the exact issue so I'm half talking out of my butt here...
but something about making a handler for events when the object loaded because inheritance wasn't an option
and the unregister event would call on unload** but didn't seem to take affect
so next time the event was called by the server stuff broke.
the code was firing it just wasn't doing anything. and it was being done in the bolt callbacks, appropriately.
@jade glacier serious question if you were a salesman, why would I choose quantum over mirror?
1 - has several release games with it (proper games, battle proven with many many players)
2 -chosen by Moon Studios, Activision, Square Enix, TT Odissey, and others, for their high profile titles...
Exit Games needs to really reconsider their product naming. It's so hard to find information on them sometimes.
I'm tired to explain the technical reasons
Exit Games needs to really reconsider their product naming. It's so hard to find information on them sometimes.
We are not aiming for a free tier and thousands of hobbyists (with Quantum)
Maybe someday
But we do a very close support for Quantum customers, and it's good to have a high-profile developer network
Very neat technical things being discussed, etc
Was just about to inquire of this 2D and 3D Physics Engines: high performance stateless 2D/3D physics engines with support for static and dynamic objects, callbacks, joints, etc.
Such a huge issue with networking
Looks like an interesting solution but as you said, not geared towards hobbyists. I don't believe I'd be able to justify the time(money) lost into learning and making tutorials since the reach would be limited. Unfortunate because I'd love to give it a go.
Yeah, Erick is the one to ask not me - he knows Quantum intimately. I just understand it in theory.
I'll chime in soon
The main perk I see is that you can radically change what the game is and add features without having to deep dive into the networking complications involved.
Once you are using the deterministic simulation, the sky becomes the limit.
Itรs not for hobbyists, but there are interesting possibilities for other people as well
Talk in a bit
With normal networking, EVERYTHING requires a lot of thought about order of execution, data requirements, visibility and priority etc etc etc
Which means a LOT of planning, and massive refactors if you change your mind.
I mean. We do want good developers working with quantum, even if they are not building a game for a big studio (yet).
And we do have an open door for people who can build great samples/prototypes, etc
We actually look for this kind of dev, and we here and there commission development of prototypes, etc
It really boils down to you being a good developer...:)
We also have a trial process for teams who want to see if it fits their workflow and expectations, etc
So, feel free to contact me or us in general
Does not hurt
@gleaming prawn There's always better, but I do have a pretty good understanding of proper networking and coding practices. I wouldn't be working with Quantum on a team level though. My career is as a freelance coder/game designer and my 'side-job' is growing my patreon with tutorials. For a paid job I can't really use a product I don't know, that also isn't well documented/no API(least I couldn't find any). Just as much I cannot really create tutorials without having the information to go off from. I am a big fan of PUN/2 (my series is actually linked on your website).
I'm not suggesting we are hiring, just that's an open door if it fits
We do have API docs and manuals, for customers
It's not open for hobbyists, so patreon style tutorial contents are really out of the question for now, agreed
And there's no point in tutorials for a public which does not have access to the product anyway
Maybe in the future, this is not written in stone
And quantum is all about not having to deal with networking in the first place, so network knowledge is not necessary (does not hurt, of course)
As for paid jobs.... We expect a lot of customers to demand quantum-experienced/trained Devs (at least be a big plus on hiring)
I've had a few inquires about it myself
We're open to suggestions as well, of course
On how to tackle that... Let me.give an example...
I can see we discussing about a license for development if training content, of course... But that would only make sense to you if you could get.some revenue out of it yourself
And with quantum being a closed solution yet, that's tricky for now
But feel free to shoot me an idea in PM if you have something specific in mind
๐
If I use photon for multiplayer but need also a connection to a server(which could be other unity app?) does it make sense to have like a chat connection with photon or how would you solve it? but can I have 2 connections at a time?
Other server for what?
Like for map downloads or fetching database stuff for like the players inventory or something?
You could yes have more than one connection, no problem
You could use photon chat concurrently with mirror for example
@jade glacier I need it to send a request to make a transaction from the server to the player
@gleaming prawn ok I will google it. Is it a safe way to do the communication? as transactions are involved
yeah, that usually its own transaction. With Pun2 there is no "server" so there is reliance on the client making that transaction in good faith though
Transactions throught chat?
No idea what you are trying to do, but sounds wrong
Oh, again thaz
๐
Some messed up architecture ideas? @gleaming prawn
There's a history
ah
He needs.to implement some sort of wallet transactions and wanted to use an .exe process in android
I searched for a few c# libs to do the same... That's as much as I said
seems both impossible and needlessly complicated ๐
And I'm sure it can be done via rest directly...
Anything else just sounds wrong... I'm not commenting anymore...:)
@gleaming prawn what do you mean with via rest directly?
restharp calls. from where to where
yup, the cloud service you go with should indicate how to interact with it.
What is this service you want to use? It probably has a server API, normally in form of https restful protocols
token type stuff is just going to JSON snippets over http I would expect?
And all these libraries you see are just wrappers around the documented rest http calls
Ye, that's what I expect
my solution for the problem @gleaming prawn just explained: I set up a "server" which could be a unity app just doing all the wallet work.
It will happen totally outside of the Photon networking library
This again just looks wrong
Why a unity app?
anyone here know how to use steamworks to create lobbies where you can only invite friends then transfer to the game scene? I want to do this before making a lot of progress with the game. (using mirror in case u need that info btw)
The point of a cloud service is to not do anything wackado like that
Because you do not know how to implement it directly/correctly,.you are adding a layer in between to complicate even more
This is why I will not comment anymore... Sorry. Dine
Done
yeah, I think we have said what we have to say on that topic
It is just that basic, do it how they are designed for you to do it.
If you want to make some convoluted system, you can - but you can't ask others to tell you how to make that kind of mess - if their answer is "dont make that kind of mess"
What you are trying to do will:
1 - not scale
2 - be an attack vector for hacking... Ver.clean and simple
This unity server thing...
And you have to host it, for no real good reason
so you say it would be better to programm like http request from the server
or just no server at all
A unity server only has one reason to exist, and this isn't that one reason.
the thing is that I cant doing it in one app all together as I need 2 wallets.
If you want to control transactions with sensitive/personal data, do it directly from the game client to the service you are reaching, with encrypted connection
Unity EXE is not a hammer, and all networking problems are not nails. Read up on your cloud services API.
the safest way ( I thing) is to seperate the second wallet as it is mine.
to payout some iota s for gaming
Aight, I'm done as well.
If you need a front-end for that, do NOT do it with a unity app
Do it with a proper server tech stack like .net core or something similar
Google's go, etc
And connect to that front end directly with encrypted HTTPS (you build your own restful service)
That is HOW this should be done
Copy and pasting things will not work well, so I'm out of ideas, as you don't accept the well designed ones
anyone know how to use steamworks with mirror to make steam lobbies where you can only invite friends? (sorry if im interrupting anything)
Adding a unity app that you connect with photon chat is not really what we suggested here....:)
I just try to understand
I would ask that in the Mirror discord, they are more active there.
I suggested a few .net libraries I found
and find out the safest ways
no prob erick
Less likely to get good answers here on Mirror specific stuff, sorry @vapid leaf I would try rephrasing and reasking a few times.
ok thanks
I think it's not reall mirror specific
He wants to use steamworks to define a Guid for a match....
For his party of friends, then distribute this Guid between the clients... So they can go to the same match id
Could be photon, could be mirror
i am setting up steam stuff rn at the beggining of develeopment so i dont have to backtrack later
For mirror that should be related to how you spin up servers though
p2p
Hmmm
But how do you guarantee P2P with mirror?
Do they give you a wrapper.on top of steamworks?
rn i just have it as LAN but i think with steam it becomes online
Because by default mirror does not have punch and relay
These are third party solutions
If mirror offers a wrapper on top of steam, then they get P2P working, ye
But then it is very specific to mirror
So I have no idea... I know in principle how steamworks works
But not mirror,. sorry
ah no prob thanks for the help ill try and ask mirror discord again
@gleaming prawn have yall thought about a free tier for < X CCU/single seat, where X is too small for any serious production, then kicking in the $1k after that? I'm definitely not an expert on software pricing, but it seems like it could be really valuable to break through that barrier of having to learn a new logic engine, since it could increase the number of ppl who know it, who post on forums about it, make tuts etc
I like their pricing model, since it allowed me as an instructor to use Normcore to teach basic multiplayer stuff
ahh yeah that's true^^
We explicitly do NOT want that with quantum
It's too much work to give.support
We know this business model well,.I'd say better then them...:) We've been doing this for 10 years or more...
yeah, that's fair
The past 3 years have been great, so we do not regret the choice
But sure I'm "haunted" by this topic...:)
that's good to hear! I think for any developed team the price is excellent, since a single networking engineer is much more than $1k/mo
It's a tough choice
Exactly rhat... The level of support we give is a lot of value
at least it's easier to go to a free tier from paid, rather than the other way around :S
That's why the teams who are with us like it (just ask them directly)
Yes.. we do want to get there at some point
Again,as I said, we're open to ideas, and we're not fully locked under a paywall only... We have a few revshare deals
- we commission good Devs to write nice samples (they learn "for free" as a bonus)
So that is a win-win normally
we commission good Devs to write nice samples (they learn "for free" as a bonus)
i like that a lot. it's easy to get uh...bad samples with a tool out in the world
@gleaming prawn is that what I'm looking for? https://www.youtube.com/watch?v=uh8XaC0Y5MA
In this first part of my C# networking tutorial series, we set up a TCP connection between a dedicated server and a Unity client.
If you get stuck or have questions, ask them on my Discord server: https://tomweiland.net/discord
Kevin Kaymak's channel: https://www.youtube.com/...
Ye... Our points are:
- we like to see the different coding styles possible with quantum (we do not enforce a purist ECS, you can even make your code looks like OP)
- we always code review and curate, of course...
Define a major project @floral turtle
Moon Studios' next game is enough?
yea, definitely
We have a lot of mobile titles that are successful (remember that unity.dominates the mobile charts)
I've looked at the showcase, and battlelands royale seems to be doing well
So those are also "major" in terms of revenues, reach (and a technical challenge given the mobile limitations - but sure not what most gamers think as major)
Battlelands Royale is great
Take a look at the still in early access Lego Star wars battles
Not globally released yet, but it's working really well
the mobile side is interesting due to the rollback/resim
Rollback/resim with 32 players is a major feat...:)
Try to do that "yourself"...:)
is there an average amount of logic frames that need to be re-simed per actual tick (tho I assume it varies heavily based on genre/player count)
It's easy to dismiss it... But just try
haha I've done enough networking and determ stuff to never want to try and make quantum :S
Avg is based on your ping and your ping only (+ the game update rate)
and I guess input lag, where 0 input lag = larger resims?
0 input lag is default... You can preset an initial delay to ease on rollbacks, but default is 60hz sim + 0 delay
I know for fighting games that use GGPO some players prefer a balance between input lag and rollback, even when 0 input lag is available
I assume there are settings for making that input lag variable based on RTT? Though not sure I would want to use it dynamically... since changing input lag would probably mess with players.
Normally.on mobile titles recommendation is 30hz tick rate (rendering can be freely higher) with added input delay kicking off after 100ms ping
It's automatically set based on RTT
@jade glacier for ggpo I know some players prefer fixed throughout a match since it keeps relative button timings fixed
But you have control of that in settings
yeah, I assume its an option yeah
For shooter types you adapt to a trigger lag and such, for some game types you would prefer it not wander around
are there any genres you have dissuaded developers from using quantum for?
FPS is a bit trickier
Bรคr above was not for your last question btw
Answer
Good question....
I think FPS is kind of the one that it isn't a no brainer for as well. Since its VERY flinch.
I mean, with the current fully predict rollback deterministic quantum, there are limitations in world complexity, specially for modest hardware like mobile
Not reall the genre, but more the world scale of each individual simulation and the target hardware
We are.looking beyond what we do now for our roadmap though (but I can't share a lot yet about it)
The thing is that quantum is not only a predict rollback engine, but actually a nice API to write gameplay with...:)
IMHO (and of the customers using it)
Have you guys ended up with subset physics libraries already... with different levels of cheap vs quality? @gleaming prawn
we are currently making a physics based VR game (we talked to someone from quantum ages ago, but we didn't want to switch from unity for logic), so I am keeping an eye out for heavy physics games (where rigidbody motion is critical to gameplay), as this is very challenging to do well with traditional architectures
We have ALOT of vr stuff being done with us now
@west loom don't tell me you don't find this interesting ๐ฎ
If you talked.to someone it was probably me, or Chris or Robert
If it was technical, probably me
I'd have to scroll through a lot of DMs ๐ฆ
@floral turtle I was not able to read all ๐ sorry.
How many rigid bodies?
We're launching a public alpha today, alongside a Patreon! #madeinunity #vr #indiegames #gamedev #gaming #Patreon
Get a key >> https://t.co/6hSdkCX2zk
Support us >> https://t.co/8VOeODFDwn https://t.co/1qP6KjmxWv
3436
8976
I just try to find the right youtube video for my problem
this is a rough demo
yeah, I recall seeing that before as well. Great potential there.
No-brainer... Really up to you guys
Especially a no brainer for quantum because that kind of sandbox would likely see all kinds of future added interactions.
we're mostly focused right now on refining the game for a release, since so much of our gameplay/ability to prototype is tied to Unity stuff
Specially now with quantum 2, with scene entity prototypes and prefabs, not really a lot difficult
Ye, we understand
Once you are using the quantum physics lib, you can throw whatever crazy thing you think of for a mechanic in and not get buried in figuring out how to network it cleanly.
Just a potty, this concept just fits 100%
but I'm super impressed with quantum. I can't imagine the challenges to get the engine developed*
that's good to hear!
okay. Thanks for the conversation, I have been following quantum for awhile, really excited to see it progress
@gleaming prawn please answer. Is a tcp server connection what im looking for?
I think we did not have 2.0 in working condition when we talked
before sleeping ๐
That's long gone
@jade glacier yes, there is an invisible line where networking starts to influence too many gameplay decisions ๐
No, it's not
tls ssl?
hmm ok
That's really it
just if the resims become too expensive (if I understand your question) @floral turtle
thx
If you can't understand that, sorry
sleep well @gleaming prawn
@jade glacier sorry, I meant with traditional architectures
ooh yeah, always
it's interesting with quantum, to be CPU bound in a game isn't something I worry about often
but I think it's a better constraint
Every new feature with state transfer requires a lot of rebalancing and resolving race conditions and such.
and it adds data
and that ideal 1100 bytes a packet wall comes at you fast.
and if you compress the data too much, you get worse race conditions ๐
compression shouldn't affect exec order so much
Unless you are dropping updates as part of the culling
@gleaming prawn yeah sorry for being stupid
sorry, I meant that the local client simulation will lose quality if you send less data, leading the local player to have a worse experience
then you have reconstruction of frames to deal with and such, its a lot of tuning
The client prediction does become part of the equation, but if you did you work right that SHOULD be pretty straight forward.
reconciliation when the server disagrees with your prediction... can get ugly though when you start adding mechanics
Even with a pure tick system like Bolt, complexity piles on and makes headaches exponential
Not a major issue if you don't expand what the game is by much or often
But major mechanic changes will lead to a lot of long nights of chasing down ghosts
And debugging state transfer is a pain in the ass
haha yessss
What are you using currently?
nothing. I looked into a couple tools, wasn't super happy, did a two week spike on a custom system. It worked, but I wasn't happy with the results from a gameplay quallity perspective to sink time into building a custom networking tool (which would require for sure adding engineers)
the issue for us is that too often both players need the same object to be responsive
For that god game you showed, I would say Quantum is the leading candidate
yeah. Our major gameplay goals tend to overlap a lot with fighting games (timing is more important than precision) with a bit of TPS
and ofc FG use determ+rollback
Syncing all of that "stuff" with state sync will have you up against data restraints pretty quickly
exactly
You could look into making your simulation deterministic, but the libraries available for that would have you writing a LOT of stuff
With a traditional interpolated state sync you can still leverage determinism anywhere you can find it
for example when you player throws an object, there is no need to update every step of its flight, the origin vector is all you need.
But once you have that object bouncing around, you are back in the weeds
โ๏ธ
too many drawbacks for either technique, and too much rewriting code. We have a lot of custom stuff for the giant's physics, so it eventually adds up
It puts you more in Rocket League territory
Yeah, that is why I think for fast physics games you probably should consider quantum
The pain is up front getting into the new workflow and physics, but once you are in - then its just writing simulation code.
that's more or less where I'm at. We aren't sure for certain when or if netcode will come in, but I'd be really keen to give quantum a go
You will have to deal with the trade-offs of input lag and extrapolation amounts and such - as well as concern yourself with world complexity limitations (but your worlds sound very manageable)
we do have remote play together + parsec support, which actually works pretty well, and there's interesting ways you can reduce the pain on the end user for them
Netcode I would consider off the table unless you are going fully DOTS
And that will still be state sync
with all of the same problems, MonoB or not.
and it's also Unity so...roughly 2025 release date
The netcode stuff that has been seen is pretty much looking like traditional tick based state transfer.
Client prediction and rewind and such. Basically Bolt but in DOTS
I'm a bit disappointed in that overall. Quantum's major selling point seems that it's easy to work with, but I'm not seeing Unity discussing ease of use much
DOTS never was about that.
I suspect it was Unity wanting to throw an axe at UE pre-IPO or whatever.
from what Unity shows off, DOTS is about having eight million objects running
But Unity from its origin up is MonoB based.... it was going to be a serious problem - everyone knew it.
from a perf standpoint?
I mean that to go DOTS, they had to pretty much not touch MonoBs
They basically were building a second game engine on top of their existing one
that's sort of the feeling I get
Meanwhile, MonoB is what most people are using - and its getting zero love.
Unity has an issue with deprecating things in their engine before a proper replacement is ready, but I think they're aware of that
Yeah, that was really what started the mess. Unet was bad - but it existed.
rendering, audio, UI, networking...a lot of core stuff is deprecated pending new releases :S
Put them in an odd position of being a major game engine... with no built in networking to speak of.
I never touch those parts of the engine, but I hear that yeah.
yea networking is tough, but it's not that tough for a company Unity's size
Its fractured to hell atm.
Unet didn't need to be touched... it just needed to not be deprecated.
Works out for me - since I work for Exit
yea nothing to fear from Unity, that's for sure ๐
But prior to that my asset worked with Unet
okay I have a meeting now, but thanks as well for the info and conversation!
np
unity doesn't know how to deprecate
Anyone know if Photon is a good solution for GGPO-style Rollback Netcode?
photon quantum is
*guh*
Guess this'll wait until crowdfunding kicks in
Basically you are paying for the equivalent of a $1000 a month networking "dude" yeah
i need help with [PunRPC]
i have 1 object with a photonView and a script
when there is two instances of that script across the network [PunRPC] doenst work
it only works for the person who called it
{
// Start is called before the first frame update
public void Start()
{
Debug.LogError("The RoomManager Photon Id is = " + this.photonView.ViewID);
}
public override void OnDisconnected(DisconnectCause cause)
{
SceneManager.LoadScene(0);
base.OnDisconnected(cause);
}
public void KickEveyoneFromLobby()
{
this.photonView.RPC("RPCKickEveryoneFromLobby", RpcTarget.All);
}
[PunRPC]
public void RPCKickEveryoneFromLobby()
{
Debug.LogError("KickFromLobby");
PhotonNetwork.Disconnect();
//PhotonNetwork.RejoinRoom("public");
}
}```
when KickEveryoneFromLobby gets called only the instance that called it receves the PunRPC
but not any of the other instances
i confermed that the IDs are the same with the first Debug
What could i be doing wrong?
and i know that the two players are on the same lobby and room because i wouldent see the other person in the game
and i have other RPCs working because i can shoot another person and they take damage
I can't see where you are calling RPCKickEveryone from.
Are you sure you are connected to a Room? The name says "from Lobby" which makes it suspect.
I found the problem
I was calling that function
But
The client sending that function received the RPC first
They disconnected immediately so nobody else got the RPC
Anyone know how I can get a good dedicated server that actually runs my game?
I'm using Mirror
AWS?
@gleaming prawn I tried AWS but it doesn't run my game
It has a 1GB RAM limit and 800MB is taken up by windows server
ohh, a FREE server?
There's probably none...
You asked for a GOOD dedicated server... These cost money...:)
yeah I know but I want a good option as a small developer
for my test projects
I also noticed that Mirror uses by default graphics and everything enabled if I click "server only"
for test/hobby projects maybe you should be using something else, not dedicated servers
Something you can just run listen servers, etc
I also noticed that Mirror uses by default graphics and everything enabled if I click "server only"
You can remove rendering with the unity build options
I want to show it on my portfolio and have people play it
If you use other techs it would work, not an issue
other techs?
Same with Mirror as listen server (if you use punch + relay)
Maybe steam integration does the job
other techs?
Photon Bolt, PUN, etc, they both have free tiers, and would work all the time.
Or Mirror as a listen server (if you add punch + relay)
why doesn't it work by default?
Ask the mirror developers...:)
But these services are not free, they rely on servers (relay)
Maybe they have integratiuon with SteamWorks (I do not know), that would be a solution for PC
these servers are hosted by you guys?
Which servers?
Steam = Valve
yes
Mirror is an open source project (so they don't run any server)
Photon (Exit Games) does, but tied to our APIs (PUN, Bolt, Quantum, etc)
There are the free tiers you can use... But would not work for Mirropr
Mirror
I see
Technically you could implement a transport adapter to use Photon Realtime for Mirror
But not sure if anybody did it
Either Photon Realtime (+punch, which is offered as well) or SteamWorks would be trusty transport adapters for Mirror
But I have no idea if they've been integrated by the development team, you need to ask in their Discord
hm
Mirror by default is LAN only (or dedicated server with fixed/discoverable IP address)
Obviously it is not perfectly fine for you...;)
it's not?
Otherwise there would be no question
You would be just running your game now...
You wanted a free server, we all advised it would not work (a couple of days ago)
yes I have a problem and I agree Mirror doesn't make it easy
oh
I don't remember that
So, technically you either run dedicated on a proper server (because a cheap one, even if it "runs", it would have very erratic performance)
I see
We run hundreds/thousands or servers, so we have a bit of experience with different types of metal and VMs
There's a reason for services like Multiplay (Unity) and Gamelift (Amazon)
They coordinate something known as orchestrating (ramping up new server instances on demand, etc).
And they offer proper server tiers capable of running these dedicated hosts (engine instance). These are NOT cheap...:)
You can SURE do it manually, and for a single demo server there's no point
is this also what azure playfab is like?
And besides AWS, sure there are other providers of good servers
No...
playfab is a service for storing player profiles, hosting matchmaking scripts, and other DB services for games
Azure provides VMs as well, so you could run there, yes
Make sure NOT to use a burstable VM...:)
These are awful
All free tiers are normally a very small and crappy burstable VM
this is all a bit complicated for me
yes
So if you can not pay for a dedicated server, make the game LAN only
Highlight something unique, etc
OR use a service that works out of the box as listen servers
You should ask on Mirror's Discord how to setup SteamWorks for it... (if possible)
is a relay server the same thing as a dedicated server?
Sorry for all these questions I'm new to all this and I don't know where to learn
that's great I'll read that thanks
relay services provide a way for game clients to communicate when they are behind NATs or firewalls (the real world)
SteamWorks runs relay servers, photon runs relay servers (+ optional server logic), etc
so they're better than dedicated servers then?
That's a very very basic concept on game networking
NO
They are not better nor worse
They are relay servers, they serve a specific purpose, nothing to do with dedicated server,,.,
oh ok I'll read the article maybe I'll understand then
Technically the term DEDICATED just means a server runs a single service
So a relay server can be a dedicated relay server, or run other things
a game server (with game logic) can be a dedicated game server or mix other services
So the term DEDICATED used without CONTEXT does not mean anything...:)
The article is not particularly important
Just one I found on google
When people ask for dedicated servers here, normally they mean a machine or VM to run an instance/process of a game engine (a headless build, normally).
maybe I need to check out photon and have you guys make my life a bit easier
relays are a very light weight service to let clients communicate with each other, even when behind a NAT (so one of these game clients can even be a Mirror Listen Server, etc)
would photon work as a free option for my portfolio?
But there are pros and cons, of course
would photon work as a free option for my portfolio?
Yes, and maybe
Depends on what your portfolio is about
If it's about build network tech itself, maybe... if you build something nice network-wise on top of it...
I just want to display that I made a multiplayer game and have people being able to play it
If it's about building a game, yes, maybe... it would be a nice portfolio about building games WITH photon
Being 100% honest
I'm not a network specialist obviously
I just want to display that I made a multiplayer game and have people being able to play it
It would show you can build a multiplayer game WITH photon, which is a START...:)
I'm not a network specialist obviously
What is your end goal?
well I wanna create games but especially multiplayer games
my end goal is undefined but for now my short term 3-5 year goal is to become a solo developer and make money that way
Because to build multiplayer games in particular, you'd either need to:
- become a network specialist (at least a multiplayer network specialist)
- or use something like Photon Quantum, which hides networking from multiplayer development
hm I see
- or someone else in your team would become a network specialist
As a solo dev... hmm...
Can be done
But it's never easy
Nothing worth doing is anyway
Hi guys i want to make multiplayer game,I don t know how to buy right server and how much cost?
@weak plinth i saw you want to test your games,you can use photon it is free and limit is 20ccu
idk
I started learning mirror
But I can't see both players
That's the network manager
And that's the player prefab
Be sure to join there discord channel
It is time again
In my scene, I have my leap motion controller set up so I can use my hands as inputs, and the data collected from the controller is interpreted via a skeletal hand-mesh in engine. It looks like this: https://gyazo.com/5323b1777c87863d79b4bae7e3ea90ad
Now the problem: the hand meshes only show to the local client/server, they dont appear for anyone else even though they should be networked (using Mirror)
This is the full prefab structure: https://gyazo.com/359e53030bc269b00b4c422f21a839d5
Does OnPhotonSerializeView only work if the master send the data?
I gave each component a Network Identity so they should all just be networked objects
@frozen zodiac It sends if the local version is the Controller (IsMine == true)
But they dont appear and I dont know if its because the network components need different structuring on parent/childed objects, or if I've made a mess of the Network Transform child component :l
@jade glacier how would i make it so that the other client can also send the data?
By making the other client the owner @frozen zodiac
look into PhotonView.RequestTransfer or PhotonView.TransferOwner
I set the owner to takeover and it fixed it the first time i build the project but the 2nd time it didn't work anymore
https://doc.photonengine.com/en-us/pun/current/gameplay/ownershipandcontrol
Side Note: This page is in the works, and might explain some stuff that could be helpful.
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!
Are you changing the owner though? And you will have to wait for the ownership changed callback to fire, it isn't instant.
Or just TransferOwner or whatever, rather than request
Request if I recall will require you to respond to that with code on your Master, and change the owner. But I don't recall off the top of my head how the default behavior works.
I think though Request causes the request callback to fire on the current owner, and it is there that you would transfer ownership manually.
So for simplicity, I recommend just skip that and just call TransferOwner to get it working
Why do I keep getting these errors?
I reopened my unity removed the 2 errors
But the cannot connect to destination host is still there
Because there were errors in the connections Unity tried to make
I imagine they are shown to you because it's expected that the connection is made or that the error itself is unexpected and should be reported to Unity
I fixed the cannot connect, now its showing the curl error and the getdate.php error
Is there a way to have OnPhotonSerializeView receive and transmit at the sametime?
Because mine did sent data but after a while it stops receiving for some reason
Not really. It sends and receives based on who is the controller
if IsMine == true, it broadcasts, if not... it listens.
hmm ok
do you know what the problem could be? everything works fine the data even gets sent out but it never gets received
When I do localhost/Folder name/filename.php it shows a 404 error. Even though everything is connected
Hi all. If i have a "LungeAttack" skill, which leaps forward, how do u guys do it?
Im crossing out root motion after reading a few answers
But this is kinda a, artistic(?) and personal experience question
How do u netsync the lunge? Define it in curves and force pass it to the CharaController, and let the normal client auth position packets handle it like any other? Or other?
This one is tricky
Let me add a few comments
If you have a tick based simulation, you need to send the necessary command (as fast as possible) with the data + tick (could be the curve, or just enough data to reproduce the same in other clients).
If there's a small heatup animation phase, this helps, as you'd need to snap to exelactly where the anim should be when the command arrives
If not tick based, complicated
It's tick based
The trigger command would have the start pos, and each client would have the curve to be used, is what i'm thinking
This is basically like projectile handling (dont need to sync transform. Just start, dir, speed, and everyone simulates themselves)
But I might have clients to control the direction mid flight
So this is where i'm thinking, maybe preset curves is not the way after all, and treat the leap as a kind of jump
It's also important that my game's pace should be realtime but slow-ish, like moon gravity. Anything faster would be handled differently and less (arbitrarily) controllable
Being tick based helps a lot
So even mid flight changes can just be sent as fixes anyway
But I have no idea if your ticks use a synchronized clock or not, etc
But everything around these complex synced motions need to be tied to ticks
@gleaming prawn @jade glacier or someone else.... I did so. I set up a rest http / https server. But somehow the data doesn't arrive to the server
rest web client https://hatebin.com/uzrydzyren
unity client side https://hatebin.com/dswqruygnq
server side code : https://hatebin.com/zchswejqql
the address is always empty
while in unity the json string from the class with the address is not empty
the data format seems to be ok...
but just empty....
why? please help, 2 people (well programmers) failed to solve it...
What is the problem here? and is there a better way to rotate the player whilst a button is being held?
I noticed that the default multiplayer architecture with photon seems to be peer to peer
what if I want a dedicated server?
You mean Pun2?
Photon has three products - Pun2 is a relay architecture. Bolt is Unity Server architecture. Quantum is a deterministic architecture.
yes I meant PUN
I don't know the other products
PUN relay which means one computer acts as some sort of proxy
as I understand it
through which messages pass so that port forwarding can be avoided
so wait if I want to make an MMO I need to use Bolt?
Pun is all players talk to the relay, and that passes those messages to the others
No Photon product (or any product really) will get you an MMO.
Depending on how you are defining MMO
The relay are the Photon Servers hosted around the world, there is no hosting
With Pun2 all players just talk to the relay servers, so no punchtrough and such is required.
Not suitable for an MMO by any measure though.
but Albion uses photon
I'm a solo developer I don't need an AAA mmo
so which is better for an mmo
PUN or Bolt?
@weak plinth neither of those can do an MMO
I guess albion only uses photon realtime
@graceful zephyr but which would be better suited
neither
it's like saying "which one of these two kitchen knives is the best hammer"
You will need to do a LOT of learning though before making an MMO of any kind.
mirror is not usable for an mmo either no matter what they tell you lol
if by mmo you mean something like wow/albion/etc.
then its not an mmo really if you have like 32 players on each server?
what if I have like 1000+ players
in a world that is like an mmo world
again, I'm SOLO
Then you will need a team and years of experience
you cant build this solo
give up now
legitimately, give up now
you cant build this
No chance in hell of completing that.
if this is your "target" of what u want to build
you will NEVER complete it.
ever.
not going to happen
go away.
We make these kinds of things for a living, and we wouldn't take that on.
another dream bites the dust
you make mmos for a living? why are you asking then
I mean, go for it.
no, I make games for a living by myself
no team
and I want to make small scale mmo
Making games and making an MMO are not in the same category.
Then go for it with what you are doing, sounds like you have it worked out.
well best of luck, i already gave you my recommendation (photon server + realtime)
I haven't worked it out just the barebones
hm I'll def take a look at realtime at one point
@weak plinth the difference between mirror and photon server/realtime is this: Mirror will get you started faster, and it will seem easier in the beginning - because it is. But you can't actually get to where you need to in the end with it. So it's a trap basically.
Photon Server + Realtime will actually do what you want in the end, but it's more work to learn what you need at the start
is it any use learning PUN?
Mirror will require you to host your games on a Unity exe
Not for this, no
Do you need a unity instance for the server? Or do you want it to be super lightweight?
I prefer it to be good but also managable
We all do, but that isn't really a spec
Does the game design require the server to run an instance of Unity? Does the simulation on the server require Unity code to operate?
I don't know I used mirror for my previous project
but I want to use something better
We all do.
But that still isn't a spec LOL
You'll want to sort out "what it is" before really exploring networking too hard.
@jade glacier I don't know which is better I guess the more lightweight the better?
Depends on your games requirements, but yeah - lightweight for MMO is pretty critical
I made a networking solution with Tom Weiland's tutorials aswell that didn't use any libraries
server ran on a console app
but then he integrated it into unity later on
thing is I don't know how to handle websockets and I wanna have my games playable in browsers too
Isolating out your simulation like that is a good path when possible.
Relying on Unity for your server makes hosting a lot more expensive and complicated.
Wow, this spec is getting complicated fast.
I mean webGL is pretty normal for unity users isn't it?
ugh, everyone has different opinions on everything
browsers arent ready for multiplayer games yet but we keep pushing them out ๐คท
Have you seen any browser based Unity MMOs? See what they did if you have seen one.
I set up a rest http / https server. But somehow the data doesn't arrive to the server
rest web client https://hatebin.com/uzrydzyren
unity client side https://hatebin.com/dswqruygnq
server side code : https://hatebin.com/zchswejqql
the address is always empty
the data format seems to be ok...
but just empty....
why? please help...
what's wrong with the code
Hello, i have a question. At Transport package, we should send ping manually to make the connection live??
#unity-transport
My connections will be drop down after some seconds.
hello guys, i'm new to unity but not new to game development, i already created an online co-op game in another engine and just wanna remake it on unity
in unity, there is some options/solution, and i just confused and don't know which one to pick, pls give me some tips/suggestion, thanks
on what?
I have a problem regarding authority
I'm trying to implement a spawning system. Instead of networking every single scene object and transferring authority when the client is connected (which I previously did and was incredibly inefficient), it was suggested that I instead implement a system to spawn objects in with the client given authority at their moment of spawning
I can spawn the objects in at the correct locations, but I can't seem to give them client authority
in the spawn command, I tried implementing that if statement but it didnt work ๐ฆ
If I run as server and client, i can see from the debug menu that the server client does not have authority
unfortunately if I run it as just a client, the client doesnt have authority either
Solved!!!!
what's wrong with the code
@west loom
You should read about favor the shooter/lag compensated raycast.... Technique for the problem
Answr is:
- with a server based game like yours, normally computed on server with technique above (not super simple, requires tick based simulation)
Option 2 is, if your game is predict rollback deterministic (also tick based) like the photon quantum engine, then it's just easy... This problem does not exist
That's how to do it properly...
Pure client side is cheat happy...
I know it's bullet hits... It's more.complicated than you are describing...:)
You should search for tutorials on the technique I described
It's a lot more complicated than you think, sorry, that is the answer
Everything is server side (in the architecture you seem to be used), and with favor the shooter/lag compensated raycast (on server). That's how normal shooters are dine
Done
Just search on YouTube, read docs about source engine, etc
Photon Bolt implements this technique for you...
Unreal engine networking, source engine as well
yeah it is complicated thanks for the responds i ll search on it more
Unless your bullets fly in strange ai controlled paths, or can bounce around in ways that need to be synced - they are deterministic and should be treated as events - rather than "owned" by server or client.
Then your only concern is lag compensation, and if need be the ability for the server to rewind players when testing those shots.
Are you fully server auth, and if so do you have client prediction of player movement? Those things affect how you have to deal with checking shots. @weak plinth
Unless you are expecting some serious success, you can also just throw that out the window and just go with client authority. Concerns about hacking are more often than not wildly premature when it comes to first time hobbyist MP games.
idk
i mean its ready in the client sided
but i dont know how can i make it on the server side should i put all the things to the server or only the bullet and a few certain things idk
It is a much bigger question than it seems like so nearly impossible to answer simply. You have to read up on the concepts Erick mentioned above to start to understand how networked FPS type games deal with server authority, lag compensation and shot rewind. Until you have that starting point, you will be stuck in an endless loop of guessing your way through how to deal with this stuff.
Even when you read about it and understand it, it is still a lot of hard work.
real-time auth movement is a total pain
Be pretty easy with transforms but slap physics movement in there... gets nasty quick
Hello, i have a question. At Transport package, we should send ping manually to make the connection live??
it seems we have to
I believe it is normal when implementing connection over udp https://gafferongames.com/post/client_server_connection/
Introduction Hi, Iโm Glenn Fiedler and welcome to Building a Game Network Protocol.
So far in this article series weโve discussed how games read and write packets, how to unify packet read and write into a single function, how to fragment and re-assemble packets, and how to se...
but I suppose netcode package does that automatically over transport
hello guys, i'm new to unity but not new to game development, i already created an online co-op game in another engine and just wanna remake it on unity
in unity, there is many options/solutions for networking, i just confused and don't know which one to pick, pls give me some tips/suggestion, thanks
@ripe ridge
choose between Mirror or photon products. look into each to find what suits your needs
@weak plinth which one can let players to become host without port forward needed? i'm trying to avoid CCU payment cuz my game would be 100% free
if you're not port forwarding then you must have some server as a relay somewhere
i heard about net punchthrough, what is this and can it help me for my case?
I don't know of any unity network solution that has nat punchthrough ready out of the box. you can look into steam or raknet but I can't help much with this sorry
mirror is completely free or it's something like photon prices?
where can i find a detailed(in depth) article/tut about comparing networking solutions? so i can find out which one better suit for my case
@ripe ridge this thread has an overview of various packages: https://forum.unity.com/threads/what-are-the-pros-and-cons-of-available-network-solutions-assets.609088/
@floral turtle ty
@weak plinth steamworks uses punchthorugh, same for photon bolt... Both out of the box
Port forward is not practical
did not know bolt had that, nice
Even the native C++ photon realtime SDK offers punch through signaling...
Via STUN
F**K yeah! Just managed to connect to the Epic Online Services from editor for the first time.
Man, that was something...
Well... just found out it doesn't work on android/iOS builds. Too bad.๐
Iโm working on account Authentication and was wondering if when I have a working class could someone cheak it to make sure itโs secure?
Iโm gonna use google firebase for the data storage
Gonna have the account name and have a child string be sha512 of accountname+password
Hello everyone ! so I'm a trying to make appear a text on 2 different devices but the text doesn't sync between them, can anybody here help me please ? I'm using photon PUN 2
public override void OnJoinedRoom() {
Debug.Log("Room has been joined ");
if ( PhotonNetwork.CurrentRoom.PlayerCount == 1 ) {
PhotonNetwork.Instantiate("PlayerOne", Vector3.zero, Quaternion.identity, 0);
GameObject.Instantiate(text, canvas, false);
} else if ( PhotonNetwork.CurrentRoom.PlayerCount == 2 ) {
PhotonNetwork.Instantiate("PlayerTwo", Vector3.zero, Quaternion.identity, 0);
GameObject.Instantiate(text2, canvas, false);
}
}
here's my code
Hey, idk @surreal wolf
But here's I think the better way
OnJoinedRoom(){
//call a couroutine say Strike
}
IEnumerator Strike(){
yield return new WaitUntil(() => CurrentRoom.Playercount >= 2);
photonView.RPC("InstantiateTextFunc")
}
[PunRPC]
void TextFunc(){
//Instantiate function
}
It may not sync values, but maybe you can pass a string using RPC
Or you use On serialise function
I think I answered this before:
You don't have to PhotonNetwork.Instantiate as reaction to joining. Everyone knows that someone joins, so everyone can show the text.
Each player should call network-instantiate once to create a character. PhotonNetwork.Instantiate will take care that every client creates the character...
Make your life easier and either read and code-along the tutorial, or experiment with PhotonNetwork.Instantiate a little.
One player calls it, all others will create the same network object automatically.
So, lot of people asked about Fall Guys' netcode around here (it's custom by them btw).
I thought it would be funny to see how well Quantum would suit that gameplay in general...:)
Took me around 3-4h total. Here are the feats of my FallGirls demo:
- 64 players online
- Around ~40KBps bandwidth at full load
- < 1ms simulation time on regular PC (including an avg 6 predicted ticks)
- level is similar size as the ones from the original
controlling all 64 from my local machine (performance test)
Thanks @fleet harbor for the level-design
You're welcome ๐
I think an effective quick add to that demo would be some AI bullies on each platform that will chase and push the nearest player. @gleaming prawn
yeah, mostly to show that the AI works without any additional data
I'm thinking here if I press enter and share the full video explaining how this was coded...:)
lol
Yeah, I think another part of that demo really is showing the code involved, since that is what most people would be concerned about - the workflow.
I assume you guys provide basic starting templates for new devs to see the entry point into all of this?
I have 60min of videos...:)
I will have to watch those once I get past my own lib work.
Ye, we have dozens of sample games, this became just the latest in the list
That seems like something most companies would like... I working "start with this and expand" project.
If they are like me, the hardest part is figuring out the workflow and where to sticky my codey bits, once that is sorted its off to the races.
Ah, so those demos actual double as templates
yep, they're each done by a different studio/team, reflecting their coding style (reviewed by us)
very nice
I just think the videos would be somehow disappointing (or eye-opening, depending on your PoV)... Lol
Reason: there's NO netcode involved... They just show me coding a quick and dirty local game (for many player, yes, but local). That's how programming in quantum looks like.
I was just expecting to see some workflow stuff related to your memory allocator and update management really as the main difference.
I assumed FixedUpdate is hostile to your strict order of exec and such.
๐
memory allocator and update management really as the main difference.
You don't see anything about the allocator, unless you go really deep
update management... It's an ECS, you get an Update() callback for the Systems..
Unity is just the VIEW ... You do NOT write any gameplay code on the Unity API
There's no such thing as FixedUpdate (from unity). It's just Quantum's own Update(), in the simulation code, which does not even know unity exists (the unity dll is not referenced, you have no access to Unity APIs from simulation code)
Ok, here we go...
This is part 1 (40min, parts 2 and 3 are linked in the video description - 30min, 20min respectively):
Fast and Dirty attempt to re-create the hype using Photon Quantum SDK 2.0.
Part 2: https://youtu.be/BIq4ckdZljM
Part 3: https://youtu.be/LTtwej1-VCI
- Static Floor
- PhysicsBody3D entities
- Super-compact encoded input (64-players ready)
- Force-based movement
Enjoy, 1st time I'm sharing a full quantum tutorial in the open. It's a "quick and dirty" one, so there are many moments where my code is "not ideal" (to say the least - sosume).
I am trying to see if a new player enters to a room in pun 2 without success if someone can help me here is the code
https://paste.myst.rs/zyx
You do not have this code called?
From the log you set
You need to make sure this script is in the scene when the other player enters the room
I would move your debug.Log to be the first thing in those calbacks to see if its the callback not firing, or your various test code that is the problem.
oh, that... ye...
That behavior is in your scene I take it?
@gleaming prawn but where's the girls
Lol
oh nvm hard to see in tiny embeds
I use the Kenny free blocky character, this MATERIAL/texture is the one he calls "Woman"
๐
If you look closer, it's a girl's face
Ye, do not judge... It's my alter ego
lol
For anyone interested in the networking details of how quantum works underneath, the video above is useless BTW. It just shows how you USE quantum to implement an multiplayer online game.
Because there's no need to understand networking to write a quantum game, nothing about networking is even mentioned...:)
Hello friends,
So I have a question, is the navmesh obstacle avoidance quality non deterministic? If so, how do you handle AI in a networked environment?
You asked how we do... I use quantum, which is deterministic, including our hrvo avoidance
By making your own stuff that is deterministic
So the AI runs as part of the simulation
If you can reduce your AI to being deterministic, and not relying on other non-deterministic things you can make use of it still.
Any determinism you can find in networking is valuable.
@jade glacier so that means not using unity's AI system, but createi
our own right?
Pretty much yeah
that ... sucks haha
That or working p a way to correct it when the butterfly effects start to pile up
But that is not fun
yeah that does sound as asking for trouble
Without going fully deterministic, your challenge is to decide what is cosmetic and what is real, and how close those two need to be and where.
Also, designing your game to require less....
For example if you have a lot of AI guys, designing them such that once given a task, user actions can't interfere with them doing that task.
Or if the player can interfere, that it doesn't break the entire thing. Which means sacrifices in the simulation logic.
But you can cheat your way through things like pathing and such if you are careful.
Yeah, the logic right now works kinda like that, once spawned they will move along the same objective, player can only spawn them, afterwards no interference
but my concern is an issue along the way with the second player
that creates a synch issue
but I think that might be a problem for further down the road.
It's hard when it's supposed to be "designed for competitive gameplay"
because it just means we'll have to rewrite it all at some point
Fire and Forget determinism works fine in state transfer
which is why things like guns work fine, they are very deterministic in nature
If you have funding or some kind of mandate for AAA level networking, I would just go quantum.
All of this stuff is fine if you are doing it as a hobbyist and you just want to learn how it works, but starting into this you are 2 years away from a working game title.
especially if your simulation and game concept can evolve... you have to make lots of hard choices and bake them in to make this stuff work with state transfer. Expanding on fragile systems like that later is brutal.
I tried turning the ip variable from a string to an inputfield and now when I join the server I can't move. Code: https://hatebin.com/vquwvjijrk
@jade glacier I will be taking this to the team, I agree with you, might not be the top solution for our client
but at least I will try to explain that
If you have money on the line, I would push Quantum hard for consideration. It is shipping titles FAST, and without the endless networking nightmares usually associated with MP projects. Especially with teams new to networking.
Assuming the game format is actually suited for it, but most are.
Disclaimer: I work for Exit (makers of PhotonEngine)... but I work on Pun2. Pun2 has its place... what you are talking about isn't it.
XD thanks for being so transparent @jade glacier we thought about that since the beginning
Basically for the $1000 a month, you remove the need for a real networking guy (good ones are very very hard to find)
that's what's been in my mind hmmmmm
but I don't think the pubs are going to be thrilled about that xD
it's just a matter of navigating their scope too
Having run a company, I see it differently (again I say this coming from a place that sounds conflicted)
When I was a company owner, fixed costs were good - they removed scary unknowns.
Hiring a 70K US+ a year net dev that might produce garbage is risky.
With a known cost and knowing it WILL work, makes budgeting easy, and makes it easier to set timelines.
True true, it's just that there are other "biz" decisions on their side that may affect this too >.<
Of course. Money doesn't always do the smartest thing.
@lament mason does your game fit into a common networking paradigm (i.e., snapshot interp, lockstep etc)? That can make it pretty easy to estimate the costs of building your own versus going for a developed package like Quantum
It sounded like there was undefined AI behavior that already was wanting determinism, which is why it started down that path.
hey, whats going on with the announced networking system that's supposed to replace UNet?
is NetCode that new system?
@torpid creek no idea but everyone seems to use Mirror or Photon
Is it possible to have a multiplayer room (Photon) with multiple scenes where players can travel between the scenes and players can be on different scenes from each other? I tried both:
SceneManager.LoadScene(nextLevelName);
``` and ```csharp
PhotonNetwork.LoadLevel(nextLevel);
Both times, when one player entered the loading zone, both players were taken to the next scene. I want only the player who entered the loading zone to move to the next scene, and the second player to be brought to the same scene (with the first player) only when it enters the loading zone.
Please @me when you respond so that I get a notification.
@floral turtle it sort of fits? I mean it's an RTS game, so it kinda fits? My concern is that we'll have Sc2 amounts of units, so synch might become an issue.
RIGHT NOW we are using mirror as our networking solution
but we are starting to run into these questions early on
so it got me thinking in the future
and here we are
@lament mason I haven't used Quantum, but we've been looking at it for awhile now. It does determ with prediction/rollback, whereas RTS is usually just determ lockstepโthe photon folks would know best, but I assume it can just be run in a lockstep mode (with input lag, like most RTS).
If you want to roll your own deterministic solution, you'd need to do all of your logic using fixed point math as well as manage the object lifecycle (unity's Destroy is not determ, for example. Coroutine's other than WaitForFixedUpdate are non determ, Random is non determ...). The real key is to make sure you have good desync detection with debug tools that tell you why it desynced. It can be a lot of stressful work :/
lockstep state sync would also...probably work?
Indeed! I have thought about those things @floral turtle but in the end it is going to depend on budget decisions... I would love to use Quantum, but it might not be possible. so trying to figure out what's the best we can do with the resources available (and hopefully we don't have to create a deterministic engine from scratch >.< )
Planetary Annihilation managed a lot of units on 1mb bandwidth per player. Their approach is interesting: https://www.forrestthewoods.com/blog/tech_of_planetary_annihilation_chrono_cam/
Technical deeptime into the unique networking architecture of Planetary Annihilation.
omg @weak plinth thank you ๐
Gentlemen, I just started to deal with network interaction, what are the options to connect asp and unity besides unity web request and net.socket? Maybe there are good examples on github?
1mb per player is huge... The curves model is neat, but you need to implement by hand.
@jp and @floral turtle quantum has lockstep mode out of the box
@lament mason
What I think you are under estimating is that an RTS like sc2 requires a lot more custom things, not only proper netcode...
You were talking about navigation avoidance, that shows you are alread going the wrong path.
RTS uses normally flow field navigation (not navmesh)
You will reach performance problems very very soon if you use individual paths, not to mention navmesh individual agents is not designed for group path finding
Photon quantum does give you a very good networking foundation (expect a bandwidth around 3-4 KBps, no megabytes).
But for path finding, you need to work on something else...
Not navmesh, regardless of using quantum, a custom solution or something else...
@weak plinth talking about the curves model is pretty much saying: start from scratch... It's a neat model (I partially implemented it as an exercise back in 2017).
But 1Mb of bandwidth per player.is a lot on the high side though....
That is the single only game that used that model AFAIK, the most prevalent for RTS is really the lockstep one (preferable a server based lockstep in which clients don't wait forever for others inputs).
The curves model also requires manual control of how everything works (so it's as much work as making everything deterministic).
For sure if I was making an RTS or MOBA I would go for determinism. Was just curious how some RTS have done without it
When you do PhotonNetwork.Instantiate() and you want to set any public variables of the new prefab you're instantiating how can you do that? Do you need an extra RPC?
yeah i would strongly advice against going the Planetary Annihilation route, especially if your new - it's the only game that's done this AFAIK, and you'd be completely on your own implementing a bespoke technology that only has a brief description on a blog post. And nobody to help you @weak plinth @lament mason
Hi, I am using pun 2, I want to show my friends name's if I am with same room with my friends. and of course my name I should always see my name because I am always in a room. this is the code https://paste.myst.rs/utn that doesn't work
bruh how did u even get PUN to work? ๐
i couldnt do it becasue I got loads of errors
@rocky rock lol bro ๐
Hi, did anyone use Mirror for networking and could help me out a bit? I'm currently developing a multiplayer 2D game and the problem is that all Rigidbody2d's doesn't seem to sync well (it's kinda laggy). Any help will be appreciated!
@eternal kernel I've been using Photon with Rigidbody2d's, and for a time it was very laggy. I fixed it by cutting down on the number of PunRPC functions (the functions that are called over the network) I was using. If Mirror has a "teleport for large distances" like Photon, be wary not to set its distance too low, or it won't work well.
The transform syncs and rigidbody syncs aren't very good in any of the libraries (except Bolt), you typically end up needing to buy a third party asset, or learning how to do it yourself better.
@eternal kernel
I asked this above, but the conversation buried it.
Is it possible to have a multiplayer room (Photon) with multiple scenes where players can travel between the scenes and players can be on different scenes from each other? I tried both:
SceneManager.LoadScene(nextLevelName);
and
PhotonNetwork.LoadLevel(nextLevel);
Both times, when one player entered the loading zone, both players were taken to the next scene. I want only the player who entered the loading zone to move to the next scene, and the second player to be brought to the same scene (with the first player) only when it enters the loading zone.
Please @me when you respond so that I get a notification.
Do you have scene autosync enabled?
No idea off the top of my head, not a feature I touch often enough, but that is what it sounds related to.
Usually in the setting up the settings for the initial connect maybe
ConnectUsingSettings might use the setting for that.
@jade glacier
Sounds like I have to find: csharp PhotonNetwork.automaticallySyncScene = true;
In my code and turn it off.
Thanks for helping me.
Hey folks, can anyone tell me if I need to add any specific headers while accessing public REST APIs using UnityWebRequest on WebGL? I was getting some CORS errors and was wondering how to solve them.
Access to XMLHttpRequest at 'Req URL' from origin 'Origin TLD' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. <- is what I am getting. As an aside, if anyone here as worked with the wordnik api and can help, that would be great too..
@marsh bison @jade glacier Thanks for your answers. Yeah it sucks that neither of these libs seem to work well with physics in general. I will try to find a workaround solution. Cheers ๐
@eternal kernel You can try applying forces over the network.
I need some inspiration for my next game
I wanna make a small 1 week game
What should I make?
pong, except you're the ball and it's like flappy bird
I have a question regarding design for network games: specifically, is p2p a good candidate for a game with low number of players, played over lan?
The biggest issue I see with p2p is cheating - but couldn't one just assume if you're playing a game over lan you'll be playing with friends (and let's assume you trust your friends :p).
Also, assuming it's a lan game - server-client doesn't prevent cheating, it just allows cheating for a single player - the one that is the server.
Hi I am using pun 2, I want to make friends system, I already have something similar to what I want. I have a system that adds friends and I want a system that request from the friend to be friends and he can choose if to accept or not and if he accept then the friend add, pls help me if you know and tell me if you didn't understand something I can explain.
A permanent friends system should be done with a player profile storage service, which photon is NOT
Something like playfab, etc
Photon only covers the realtime communication requirements
It does have a document about friends and matchmaking options, but that is more like the complimentary API to use assuming you have a player profiles service.in place already
How can I set up something like a spawnpicker in photon pun? Like I have an array of transforms in the scene, but I want the next player to join to spawn at the next position
This requires the next spawn position to be synchronized
In other words I need a way to store an integer that will store the next spawnNumber. And this integer needs to be the same for all clients in the room
You can just have the master pick it, and send the index as an RPC. @weak plinth
To avoid the problem of two players joining at the same time, and both picking the same spawn.
This is one of the things I thought also except I'm not sure how to do that
How can I make the master pick it?
Send spawn request RPC to master
I'm not sure how to get the master in code, I know theres a PhotonNetwork.MasterClient but that's a Player class and I can't execute custom functions on that or can I?
These would all be things you would want to get familiar with before getting too far along in development, they are pretty core concepts to using a relay based package like Pun2.
yeah I can see that
I'm just a bit annoyed because I don't really know how I should get familiar with these
I mean I can't just ask questions all the time
I tried studying the demos also
and reading the documentation
but I still end up lost
it's a similar problem with Mirror
the PUN Basics demo was helpful but it doesn't really cover everything I need
Pretty much just what you are doing, look at the demos and do the tutorials to get familiar, and ask questions to fill in the gaps.
Most of what you are asking about is somewhere, but its often easier to just ask here for a general direction to be looking, since pouring over docs isn't fun.
You can poke around the SNS beta as well to see how I handle a lot of the use cases, though its not the easiest thing to read.
Hi! Looking for informations on how to stream videos inside a webGL game hosted on itch.io :) have you ever done that? Thanks! I've seen this video from this guy who made a package for unity.. but i need a place to host the video i guess :)
http://gojira.tv/sample/index.html
Thanks a lot !
\ networked a game with a floating origin?
@jade glacier I stopped every player's scenes from changing at the same time with
csharp PhotonNetwork.AutomaticallySyncScene = false; .
Now I am trying to figure out a way to properly transport the players between scenes. When players go into the loading zone, the players do not appear in the same scene. Each player sees themselves enter a scene empty of other players. Why might this happen?
I never touch that part of the library, so no clue really without having the code in front of me to debug sorry.
So with photon you don't need a client to self host like mirror?
Since apparently with mirror someone needs to host a server then give around the IP.
If someone is hosting as a server, you need to work out either punchtrough or make use of a relay (or both).
Pun2 is purely relay based, so the server isn't really a server, its just a relay. So you lose the benefits of a server (the relay knows nothing about your game unless you write plugins for it), but you gain not having to deal with hosting.
A relay is not conducive to all game types though.
With a Mirror like setup you would most likely have some sort of server list or matchmaking setup with dedicated servers
Mirror I think has a relay transport option, like using stream. Not sure the state of that, or if it makes for horrendous latency, since it still would be making one player the server. Mirrors ownership and messaging is very specifically server based, so a relay would still be moving all traffic through the host client?
Maybe a way too large/vague/complex question but im gonna ask it anways:
How would you design the architecture of a 2d RTS game which doesnt nead things like real time player movement etc.
You would only recieve an update when for example another player placed a building near you or something
I come from a industry programming background so what I tought of immediatly was an event driven architecture that sends "news" of a new building being placed to the clients, with the coordinates, prefabs and all other info.
Then the clients render them on the correct coordinates
Maybe even simple http requests are possible? or would that cause way too much overhead
RTS and http don't really belong in the same sentence, I think you might be mixing turn based with realtime.
If you are new to this all, you might want to first just do some tutorials for the main library options you have available to you. You will need to get your head around the problems with state transfer and latency.
The answer you will likely get is that you need deterministic lockstep if you are doing an RTS... but that will mean nothing to you right now.
this looks more like turn based, yes
As for the reducing bandwidth, that will come after you design what is being sent - you have compression options like RLE and bitpacking and such. But they will all revolve around producing a byte[] rather than sending a bunch of messages.
So you will want to get familiar with the concepts of serialization
Thanks for the quick reply, I am familliar with serialization and basics of networking
But in my (beginner) mind i tought that keeping open a TCP/UDP connection was a bit overkill
since the game is persistent multiplayer (kinda like how the game rust does it)
The transport is the least of your concern really. Step one in all networking is defining a tick based simulation.
From there you can start to think about how to transfer those tick states, be it by inputs and determinism, or by state transfer.
thanks alot
For a turn-based it gets easier, since the "tick" becomes a turn
but is this also the case when real time isnt needed
exactly, thats what i tought aswell
for RTS its trickier because those ticks are like a freight train, and your game has to keep going forward... even if packets haven't arrived.
All networking starts with a tick based simulation
I was discussing this with a mate and he basically said every tick can be a request that gets send to a server, the server than emits and event that the clients listen to and they do with that information (coordinates, prefab type etc) what they need to do. Eg. render a new building from prefab X at coordinates 1,1
If you are turn based that sounds like a path
It is cheaper and easier to do turn-based, since clients don't have to realtime sync.
So your hosting options can just be cloud services, and you treat the whole game networking thing as a database operation
Its for an RTS, at the time I didnt have enough knowledge to form a good response except that I tought the overhead would be massive
So your hosting options can just be cloud services, and you treat the whole game networking thing as a database operation
This is almost exactly what he said aswell
I'm still confused then on if this is RTS or turn based. It WAS an RTS and you changed your mind to turn based?
You can fake out some smaller ticks, by for example limiting their turn length, but updating actions as they do them... so the other player can get those actions shortly after, even while its still not their turn.
Your Cloud server will need to manage the timer though, and reject inputs past that users turn time limit.
- There is a central server where players can connect to, players can connect and disconnect at any time
- Once connected they can place resources like buildings, resources etc. on what is essentially a large tilemap.
- Other players who are currently connected can see those placesd resources and buildings aswell
- The multiplayer state is persisent: if player X disconnects, and players Y places resources. Player X still needs to see that player Y placed resources upon reconnecting
This is roughly the idea
For turn-based you are likely wanting to think REST
Yup, again what he said aswell
So you have to think about what "connected" as a concept and what that even means.
But he is saying, given the example i wrote above. that this is possible with simple rest requests
- There is a central server where players can connect to, players can connect and disconnect at any time
This needs some rethining.
You will have matchmaking, but once a match starts, then you have to decide if you have turn timers and such.
Then there is no "connected" there is just "you haven't responded in time"
and if you fail to respond long enough, forfiet the match.
The concept is persistent multiplayer like rust, as you said the term connected depends on what road we chose:
if its Request/event based: Connecting is a client doing a request and loading the game state on his client
I would avoid using that term Connecting, it will confuse peple in this context.
And all clients do the same, when they do action X. A request/event is send/emmited
all clients will get notified of the new event
and respond correspondingly (for example render a new prefab at place x,y)
Sounds like you have a basic concept, write a basic test on the cloud service of your choice and see where you hit a wall.
Thanks alot for the explanation and help
Reading back it seems like im asking how to build a car after thinking about building an RC car
but anyways, my question was more about whether this is a feasible approach or something so ridiculous I should never think about it again
Its reasonable, you just have to think about the architecture a bit.
The big pitfall I can see in your thinking is some blurring of the layers involved. Keep them all very separate.
Step One, define your simulation. Your game has to be reduced to ticks, and ticks involve PrevState + Inputs = NewState
then syncing becomes about networking numbered ticks and the requried Inputs or States needed to reproduce the exact result.
@queen carbon some clarification
RTS means RealTime strategy... That means things HAPPEN in between people doing commands...
Like, in realtime, that's why we all got confused.
What you seem to be describing is a pure turn-based strategy game.
RTSs can tick between 1Hz, 5Hz 10Hz (most common in the past) to something like 20 or 30Hz.
Informed guess (not that've checked every single one)
The big difference is that with RTS you have to start accounting for loss and latency, which means race conditions and paradoxes. Turn-based takes away the major networking headaches.
y
Thanks 4 the clarification
@jade glacier isnt determenistic lockstep a little bit outdated? and only for p2p
I don't know about outdated, but there are more variants that have been done that make up for its shortcomings.
Introduction Hi, Iโm Glenn Fiedler and welcome to Networked Physics.
In the previous article we explored the physics simulation weโre going to network in this article series. In this article specifically, weโre going to network this physics simulation using deterministic locks...
yeah read that one
lockstep is not liked by the guy above..::)
BUT, server-based lockstep is still the way to go for RTS (starcraft 2)
P2P lockstep IS outdated
Server-based is not (you add a central server for synced clock source + managing the input stream, so you do not wait forever for other peers inputs)
And server-based deterministic predict rollback is, well...:)
What is used by any decent brawler (at least - so not to mention the games I "work" on)?
No its not that I dislike it, I just wanna be well informed about all possible solutions and their pros and cons
Hey guys I'm trying to get into multiplayer, but I see it's all deprecated, what should I learn to start adding Multiplayer to a game? Thanks!