#archived-networking

1 messages · Page 57 of 1

wild badge
#

Then I recommend going through the SpatialOS FPS tutorial first, to get a feel for how it works

#

Though learning photon might give you a better feel / insight on how networking works

tough oracle
#

that is exactly what im looking right now

#

the fps tutorial

graceful zephyr
#

@tough oracle if you learn enough to be able to build something like what you want, you will also have learned that its basically impossible to do by yourself

#

so it becomes quite the interesting philosophical problem, by learning enough you learn that there's no way to do it for you

#

so did you really learn to do it?

#

😄

wild badge
#

Its learning either way

stray scroll
#

@graceful zephyr Haha, I like that it's kind of parallel to the "The more you know a subject, the more you realize how much there is left to know". Thanks for explaining RESTfull as well, it's kind of what I found online with a few extra steps. Would saving a token on a DB, which is used to authorize other queries count as not being RESTfull then or not?

graceful zephyr
#

@stray scroll im not 'in' on how the web world does/calls things anymore

#

i think it's a matter of definition

#

but generally yes, REST should be stateless protocol

#

on both sides

#

if you save stuff into a DB to authorize future requests on the server, it's probably not restful

#

but tbh who gives a fuck 😄

stray scroll
#

@tough oracle But taking on a MMO as your first game is far fetched. Would recommend do some singleplayer gamejams, learn basic socket connection, look into basic networking concepts, then look at 3D party APIs & solutions. Try a few of them with smaller games. Then decide if you really want to do an MMO.

#

Ah yeah. If it works the way you want it, don't care what you call it 😄

graceful zephyr
#

me and a friend are doing a 'semi' mmo, which can support up to 100 players per 'area'

#

but we've both been doing networking for a looong time

#

@stray scroll yeah if it works it works, i usually don't get bogged down with strict definition of various patterns, etc.

undone sigil
#

@tough oracle getting 500 players at the same time is a challange by itself, not even on one server

weak plinth
#

where to start learning about networking in unity? i just want to know the basics to create a lan game.

hollow sandal
#

Hi, currently evaluating the tech to run a dedicated server and Unity clients. Photon Server seems to be the obvious choice for us at the moment, but the Unity client is using DOTS and the new NetCode sounds very interesting. The main problem is it won't really be production ready until Q2 2020 as I understand. Does anyone have any experience with Photon Server? Is it possible to run a headless Unity build as the dedicated server?

NetCode may be missing other important features provided by Photon: load balancing, authentication, matchmaking, etc?

weak plinth
#

I want to manage to make a server like terraria or minecraft, more like client hosted lan

high moat
#

I have created a working Moba in Unity (not optimized) with Photon PUN2 and a sql-server; but obviously dedicated servers would be a big +. Unfortunately I only find a) unity presentations praising their future releases and b) companies selling their solutions for thousands of dollars. Is there any way to create dedicated unity servers (in a small scale for developing) today and do tutorials how to do this in practice exist ^^

hollow sandal
#

@high moat I'm looking into the same thing at the moment. It seems there is a wide range of options.
Photon Server is one solution (there is a free tier) which may work for you as you already use Photon.
You could also create your own dedicated server executable (maybe even Unity headless) and deploy using something like AWS Gamelift.

#

@weak plinth if you have little experience in this, I'd suggest taking a look at Photon PUN. There's lots of examples to help you get started.

weak plinth
#

Oh, ok, thank you

high moat
#

@hollow sandal do you know any tutorials/information/documentation on how to start creating a dedicated server executable? I can image how a "headless" instance of a game looks like but have no idea how real world implementation should work ^^

#

and ty ofc, gonna check out aws gamelift :)

hollow sandal
#

I don't know I'm afraid, I just saw that passing -batchmode -nographics initialises a player executable in 'headless' mode

#

You would need to detect this in gamecode and become a server.

turbid rune
#

@high moat I've discussed in the past with a company that have published a big product on a popular IP with a headless mode dedicated servers, and tbh, the cost/performance is really poor. (not only cause of poor operational side) but with their calculations they could handle about 6 instances of server per a CPU core. That gave them about 6x7(usable cores)x6(players) per machine, whichis really really poor performance. I've made a cost analysis later for a similar project that for big playerbases (1M MAU+), the cost/player even with grat autoscaling and resource management would be just too big (not counting transfer fees etc.)

#

So I wouldn't go with the headless mode if you want to publish and scale your game, but for learning and funzies, it's a great solution.

high moat
#

good to know, ty :)

gleaming prawn
#

@turbid rune this: > and tbh, the cost/performance is really poor.

#

That's THE point... You nailed it...

#

You start to understand a lot of our business decisions when you try it yourself...:)

turbid rune
#

Oh I abolutely appreciate what u guys are doing @ photon (: we're using a lot in my current company with great success

gleaming prawn
#

When you put on the table that you need to pay a beefy server just to host 6 instances of a game (even if your game can have an avg 50 players per game this is super EXPENSIVE).

#

And you need a 100 player/per instance to reach something like avg 50

#

I don't know the exact numbers, but I think Albion Online (which runs dedicated photon servers with custom authoritative logic running on them) can host in the thousands of players per physics machine AFAIK...

winter solstice
#

Hello everyone, me and some friends (all from the game industri) just started a new project, and we are actually trying to stress test some network midleware such as Photon etc ... as the new Unity network transport is not ready for production and is lacking of documentation. is there any spreadshit with the differents middleware currently used on the market ? (note that we are actually aiming to have like 200-400 players on a game, with Authoritative server architecture) +thousands of AI. so the perfs are important, if you have some Network Middleware to share would be glad having some recomandations ! Thanks everyone if it's DOTS compatible it's a big +

hollow sandal
#

@gleaming prawn @turbid rune I wonder if the progress on Tiny Game and DOTS will help improve this significantly. So if I understand you correctly, you think it's best off to write a custom server rather than use Unity in headless?

gleaming prawn
#

I think it's a case by case decision.

#

Locking into one approach is never best IMHO.

turbid rune
#

@hollow sandal it depends on the project. I've used Unity networking for example for local-hosted apple-tv/iPhone/Android multiplayer where the tv app was the host. I would also go for headless if your multiplayer is terraria-like, so one of the players can be a headless host. If you have a small team and small budget I would go with Photon for p2p/hosted logic multiplayer and maybe top it off with a gamespark/playfab for the business logic. Especially if none of your people is experienced with network programming. Netcode is a hassle. Connection upkeep is a hassle, and using Photon or other solutions will save you COUNTLESS hours of work

gleaming prawn
#

This without mentioning determinism, which can scale and give authority even without running simulation on server 100% of the times.

turbid rune
#

@gleaming prawn @hollow sandal

This without mentioning determinism
THIS SO MUCH.

gleaming prawn
#

It's a lot of different options.

#

It's your gameplay that "chooses" for you which approach to use. Not a tool vendor or anybody...:)

hollow sandal
#

This is helpful thanks. I currently have gamelogic running in a deterministic native plugin. My plan was lockstep simulation but I guess I'm concerned about performance now, my partner wants to support 10 players. Seems like simulating 10 players on every machine might get too expensive.

gleaming prawn
#

Seems like simulating 10 players on every machine might get too expensive.
In lockstep, really?

hollow sandal
#

10 players, each with.. 50 units say

gleaming prawn
#

I mean, take a look at battlelands royale... 32 players, not even lockstep

hollow sandal
#

or 200 units I don't know

gleaming prawn
#

Determinsitic predict rollack on mobile

#

in lockstep you should be fine, if you are coding it rigght

#

I mean, if you can't simulate all players in ONE client, how Beefy do you need your server to be?

#

This will be even more expensive...:)

hollow sandal
#

Well, I remember early games of Total Annihilation, where one slow machine would take the whole game down.

gleaming prawn
#

That's the point, you should not consider server as an infinite resource, quite the opposite:

  • you client's machines power is payed by your player...:)
  • your server CPU consumption is payed by you...:(
#

where one slow machine would take the whole game down.
You are talking about a super super masive RTS.

hollow sandal
#

My deterministic plugin is using software float emulation so it's probably a lot slower than if I had a single server authority and I could write faster non deterministic code.

gleaming prawn
#
  • with a lockstep implementation that does not have server for batching (canceling out slow players)
#

My deterministic plugin is using software float emulation
What do you mean by that?

#

a Fixed Point implementation?

hollow sandal
#

well, a software implementation of floating point, so that it gets the same results across different hardware

#

assuming it compiles with the same settings.

gleaming prawn
#

Are sure that is a good approach?

hollow sandal
#

no 😂

gleaming prawn
#

We're super happy with FP 48.16

#

But I've seen RTS games use (in the same game) several different FP implementations for different problems

#

16.16, 24.8, etc etc

#

But I've never seen a float emulation one...

hollow sandal
#

32 FP was too low for me, but I'd not considered FP64

#

Do you use something off the shelf for 48.16 ?

gleaming prawn
#

you have Q32.32 (64) that has super good accuracy

#

But it's slower on Mult operator (compared to 48-16 that we use)

#

Do you use something off the shelf for 48.16 ?
This can be found all over. It's an open standard, and there are MIT licensed implementations in C#.

#

We have our own because we pretty much manually inline all the code.

#

notice 48.16 is the same accuracy (16 bits decimals) as 16.16, it is just much faster because it does have a buffer for multiplications, ezc

#

32.32 does the same as 16.16, then adding 32 bits for decimals.

hollow sandal
#

Now I'm really struggling with what decision to make! I was just assuming that lockstep sim would be too slow, and going classic client server would solve issues with cross platform play, at the expense of supporting lower unit counts and the cost of hosting a server per game.
Now I'm having second thoughts and thinking that deterministic lockstep is worth sticking with. Just sending player inputs has a lot going for it.

gleaming prawn
#

There's a lot going on with determinism currently... Not even talking about us only.

#

Lockstep is just the basic way... Probably the way to go for your game.

hollow sandal
#

Thanks for your time, this has been an enlightening conversation. If I have questions about Quantum should I direct them to the email address on the website? Or can you answer them here?

gleaming prawn
#

I can answer a few

#

just shot

#

shoot

hollow sandal
#

Sure, platform support? PC, Mac, mobile?

#

When are they expected to drop?

#

and secondly, when do you expect the SDK and pricing to be finalised? When can we reasonably expect to ship a game built with this tech?

#

Finally, just so I understand, how would I port my gamelogic from native plugin to Quantum? What language / programming paradigms?

gleaming prawn
#

Sure, platform support? PC, Mac, mobile?
PC, Mac, Linux, iOS, Android, PS4, XB1, Switch (all with cross platform determinism)

#

When are they expected to drop?
It's in production.

#

production I mean: being used by several studios.

#

and secondly, when do you expect the SDK and pricing to be finalised?
Quantum was released in January 2018. We have a few released titles, with several games in production (around 80 studios using it)

#

When can we reasonably expect to ship a game built with this tech?
Now? This depends essentially on how fast you can finish the game.

#

What language / programming paradigms?
Standard C#, using our own ECS APIs... There's a deep dive video you can watch (just send us an email)

hollow sandal
#

awesome, this is super helpful thanks. The website gives the indication it is an early access kinda thing. I'll email and try and get some more details. Thanks again 🙏

gleaming prawn
#

The website gives the indication it is an early access kinda thing
It's more that it's not free to download and we help you evaluate if it's the right tech for you

#

There are cases in which state transfer is better anyway. In those cases you have Bolt, or something custom if you really want to, etc.

winter solstice
#

Does anyone seen my question ? 😦

gleaming prawn
#

just saw it

#

Maybe you want something from outside, of course, be we'll be happy to discuss ways for you to benchmark our stuff (we do have some test-bench middleware we use internally to stress test our servers)

#

But the approach you want (authoritative state transfer server for 200 players per game is something you don't have out of the box AFAIK). Of course the Albion Online guys do more than that with Photon Server, but maybe that's not exactly what you want.

#

Reading again, IMHO what you are looking for is something really like either photon server raw SDK (like Albion Online uses) or SpatialOS stuff (pricing not really straightforward)

winter solstice
#

i will consider sending a mail to you,

#

have you guys done some prototypes with Photon and ECS ?

#

Albion online can be somthing similar to what we are doing.

#

we are basically more doing something like RUST (by facepunch) than Albion Tbh

graceful zephyr
#

aw i missed the quantum discussion 😦 😄

jade glacier
#

Start your own

graceful zephyr
#

lol

jade glacier
#

Question: How great is Quantum? Super great? or the greatest?

graceful zephyr
#

o.O

#

o/

fading apex
#

Hey I am fairly familiar on how a raltime pvp type multiplayer game with unet works but I want to create a game like shakes and fidget for example. Something that does not use realtime pvp. What would be the best networking solution to use here since unet is deprecated. (my game basically only consists of ui elements)

final depot
#

@gleaming prawn Do y'all have a Photon transport level API documentation?

#

I can't seem to find any on the website

weak plinth
#

Transport level?

final depot
#

I just want to establish connections + send emessages through a Photon relay

graceful zephyr
#

@final depot look up photon realtime docs

#

thats what the low level transport is called

final depot
#

Thanks! Just checked out the API, and it seems useful. Only downside is that passing byte arrays as messages incurs GC unless you pool them.

#

Would be great if it supported raw pointer + length

#

Tangentially related: are there Unity Paackage Manager packages for Photon products

weak plinth
#

Yeah

#

You could use PUN then

#

Uh

#

I think there is the PUN asset

#

Got check it out @final depot

#

Go*

final depot
#

I already have a netwokring solution, I'm just looking to get it to work on something that is platform agnostic.

weak plinth
#

Like u can build your game source around theyr source

#

Anyways

limber flax
#

Does anyone have experience with loading asset bundles into a WebGL build? I am running into an issue where I am not allowed to load data from a domain that is not the same as the webpage that it is being hosted on due to CORS policy. I want to make an HTTP header that states that I am allowed to pull data from a cross domain.

#

I have very basic HTML knowledge and thats it.

fading apex
#

what networking solution should i use if i do not want realtime multiplayer

graceful zephyr
#

@fading apex need to be more specific

fading apex
#

basically you create a character collect gear and battle other players
the batteling is automatic and can not be influenced by the player

#

so i do not need to sync anything in realtime

graceful zephyr
#

Sounds like it'd be enough with a database to store characters/gear/etc in and then a deterministic simulation to run the game

#

i.e. basically no networking at all

fading apex
#

ok is there some nice tool for databases that i should use ?

graceful zephyr
#

¯_(ツ)_/¯

fading apex
#

ok XD thx tho

weak plinth
#

Only ready-to-go solution I know of is Entity Framework 6 or Hibernate

#

Which are both not exactly light-weight

#

And I have no idea how or even IF those run in Unity

graceful zephyr
#

they do not

#

not a fkn chance lol

weak plinth
#

Ah, well that solves that 😄

#

Saves me a lot of trouble hitting that wall eventually

#

Is SQLite a thing that works (well) for client-hosting?

graceful zephyr
#

yeah sure

#

it works ok

#

afaik

weak plinth
#

Good to know, thanks!

graceful zephyr
#

@weak plinth hows ur networking adventres going btw

#

😄

weak plinth
#

Reasonable. I've been busy with my actual job and some other stuff the past few days

#

I'm getting some architecture up. And I've managed to get the player/camera moving via a tick-based buffer

#

Next step is to throw ENet in and connect a client and see about syncing 2 players

stray scroll
graceful zephyr
#

@stray scroll Dont think anyone is using tbe preview drop from 4 months ago 😛

stray scroll
#

pff

manic spruce
#

Hey guys, I'm using the LLAPI (because there's still no suitable replacement) to build a game. So far I have simple data messages sending back and forth from client to server, but I'm wondering how best to do this for rigidbodies. Serializing the whole component sounds expensive, but just position, rotation, and velocity may not be enough. Any advice? Thanks! (please mention me)

jade glacier
#

The correct answer involves going into architectures like snapshot and determinism and such, which you will want to scroll up for - they happen often.

#

But its not as simple as 'sending data' - it involves creating an entire tick system to do correctly.

#

@manic spruce

undone sigil
#

"no suitable replacement" - for the worst library in the universe?

final depot
#

@manic spruce what's the target platform?

#

If you just want a transport level replacement, I have several options for you

#

@weak plinth alternative is to just set up a HTTP server that does that communication, hell a Flask + SqlAlchemy setup works fine too.

#

@fading apex ping since you also asked that question

#

Then the client side logic just needs a HTTP client

manic spruce
#

@final depot target platform it currently just PC (because this is mostly just a test).

final depot
#

You could try lidgren

#

Or ENET-Csharp

#

Or Valve's GameNetworkingSockets

#

If you have a well established server IP, these should work just fine

#

If you are looking to do some P2P

#

You might need to look into solutions with integrated relay network support

graceful zephyr
#

LiteNetLib is a good option if u just want a simple udp/transport lib

brittle plinth
#

Just a beginner question, how would I go about setting up a multiplayer game? Any good tutorial link or a page that is latest. All I can find are 3-4 year old videos

final depot
#

I think the flow everyone has done at one point or another in their game is:

  1. Try the UNET HLAPI, shit the bed and try the LLAPI.
  2. Get frustrated with the LLAPI, then attempt any of Photon's products.
  3. Stick with Photon or roll their own solution.
#

As far as I can tell, there are a few HLAPI like networking solutions out there: Photon, Mirror (great free choice btw), and a few others listed on the Unity forums.

#

By far, I think Photon is the most polished immediate solution.

weak plinth
#

Or you can try websockets

#

Of PUN

final depot
#

But IMO, networking is not built for a one-size fits all solution, probably why there are so many different networking solutions/products, evein within Photon's lineup.

weak plinth
#

Well

#

Ofc

#

But products are made for different needs of people

final depot
#

I understand not everyone has a full education on internet infrrastrucutre and can work at any level in the internetl Protocol Stack, but it's worth learning at least a little about what lies underneath some of the more auto-magical APIs and solutions available.

#

I'm a strong proponent for using a viable and solid transport level API and serialization layer

#

To build game specific netcode

jade glacier
#

I'm working right now on a whole component system for PUN2 for Exit, but not sure when that will beta

weak plinth
#

R u a dev?

jade glacier
#

Its pretty much a pile of interworking components for all of the usual stuff like hitscans, vitals, pickups, projectiles, transform/animator syncs

weak plinth
#

@jade glacier

jade glacier
#

I make networking stuff yeah

weak plinth
#

Nice

#

What are you currently working on?

brittle plinth
#

@final depot @weak plinth Thanks for the help! I'll be using Photon most probably then as I just need to try it for the first time

weak plinth
#

How did i help u?

jade glacier
weak plinth
#

So u dont work with datas?

jade glacier
#

datas?

weak plinth
#

I mean like

#

Fixing bugs

#

Of client/server sides

jade glacier
#

I mean, I fix my bugs LOL

weak plinth
#

Loool

jade glacier
#

Not sure what context you mean that in

brittle plinth
#

@weak plinth

Or you can try websockets
Of PUN

I assumed this was something related to my query, nvm sorry

weak plinth
#

Websockets its a http connection m8

brittle plinth
#

Just googled it :x

weak plinth
#

Nice

#

@jade glacier bugs as exloits

#

Or thats tobias ig

#

Exploits

jade glacier
#

Tobi is working on some security stuff on the server side, if you are talking about the back end?

weak plinth
#

Yeah right

jade glacier
#

I'm all HLAPI and UX, I don't touch transport and below at all

weak plinth
#

Nice

#

U r not on low level

jade glacier
#

Nope, there are much better people than me who do that stuff

weak plinth
#

Lol alrighty

jade glacier
#

I don't even work on PUN2, I am just making this extension system that will play along with PUN2 for them. So I'm not really a PUN2 pro by any measure.

weak plinth
#

What do you think ab albion online

#

Can it be abused af?

jade glacier
#

No clue, never played it

weak plinth
#

Same

#

Anyway

#

Gn

jade glacier
#

Keep in mind that is using Photon Server... not PUN2 as far as I know

#

night

weak plinth
#

Photon server as

#

They control the flow and shit?

#

Or its handled by photon

jade glacier
#

Photon is a collection of layers and APIs, so its a larger discussion than I can really type here. That and I am not the most qualified.

buoyant granite
#

Joined this server seeking some basic info. I'm new to unity, but not to coding and game design.

If I had the goal of producing a competitive multiplayer game, what are some resources and documentation that would be good to look into, assuming I currently lack information on multiplayer/server based games?

I can give context for exactly what project I'm planning on starting if needed.

final depot
#

Also depends on what game you want to make, how optimized you want your system, how deep your knoweledge of networking is, and what your target genre is

#

Oh and ongoing recurring budget for servers

buoyant granite
#

Players go around shooting one another with modular spells, but all hitboxes are perfect spheres, including the players.

I want it to be playable with around 10 players.

I have no knowledge of networking, other than that I would prefer if it functioned in such a way that players could host for games.

Target Genre is third-person shooter.

#

I have a budget of 0 dollars, and am entering in under the assumption that I will be doing everything myself.

final depot
#

Do you need stringent anti-cheat

#

Well, if you are going to do this with servers, it's going to be mroe than $0/mo

buoyant granite
#

Perhaps I misworded then.

#

My preference is that players host the games, rather than relying on a central server.

#

It doesn't require stringent anti-cheat

final depot
#

Target platform is? PC? Mobile? Console?

buoyant granite
#

PC

final depot
#

I would start off with a solution that uses Photon to get used to reasoning over the network.

#

This will however not be free

#

You can at least get a basic implementation on it and see if you ridea works

#

Then if you are planning for PC, I suggest integrating with the Steam or Discord P2P relay networks

#

their matchmaker would make it much easier to make a P2P game

#

but is much more lower level

buoyant granite
#

I apologize for saying this/shutting down your advice, which I do appriciate, but I'm not going to be able to pay money at any stage.

final depot
#

That's ifne

#

Photon is free to start and expriement with

#

and is a good way to prototype

#

Also getting used to the desgin patterns for networked gameplay isn't easy

buoyant granite
#

One big question I have is, do I need to begin the project with a server ready from the beginning, or can I create the finished project, and then implement the multiplayer functionality by modifying this?

final depot
#

For Photon, all logic is client side

#

The server is a mere relay

#

At least he basic version of it is

#

I strongly advise against developing a base game then adding networking

#

a lot of game types need to be architected with netplay in mind

#

you can end up with patterns that just don't work online

#

and will need to find ways around that

#

As for general resoruces

buoyant granite
#

I see. Thank you for your advice. Unfortunately, all of this put together seems to indicate that my project is dead in the water.

final depot
#

I strongly suggest reading Gaffer on Game's articles

#

they're a great look at the lower level mechanisms for networked game dev

raw wigeon
#

argh. i wish i read through these channels earlier.

gleaming prawn
#

@weak plinth Albion uses photon transport layer, but it's not PUN or anything client side. Full logic is server side (custom implementation, using photon server SDK), and they intercept and "digest" every message. You can't send messages that will end up on the other clients directly.

#

And they had to deal with hacking attempts since day 1...

#

So I think it's a good candidate for probes... Good luck...:) They are cool guys... If you approach them with something that works they will probably listen to you as well.

#

They deal with DDoS every day and nastier stuff, so they are probably not naïve... But, you never know...:)

weak plinth
#

Lol

#

That rlly makes it challenging

#

So u cant just get theyr games appid, put it in a diff game and fuck it up?

gleaming prawn
#

They have no App ID

#

lol

#

There's no such concept in their game.

weak plinth
#

Loool

#

Nice

weak plinth
#

I wonder if they patched the serversides shits

gleaming prawn
#

It's not the same logic

#

I don't think they even have the same kind of issues.

#

I think all the things you work on top are relying on simple features from the load-balancing/plugin approach (for client based apps), which is not what they use.

stray scroll
#

@raw wigeon With the naming I thought it was using the actual NetCode :/ , gj and gl

raw wigeon
#

@stray scroll i wish haha

weak plinth
#

Oh

#

I see

#

Well that makes things harder

#

Or diff from what i am used to

weak plinth
#

what should I use for encoding packets?

jade glacier
#

you mean for compression? or encryption?

weak plinth
#

compression @jade glacier

jade glacier
#

Byte packing using your writer, or bitpacking. You can try to compress the whole thing with an RLE as well, but not sure if people have found that to be particularly effective or quick.

#

I personally bitpack everything

weak plinth
#

@final depot I'm not going to pull game data through http requests that is supposed to be local in the first place

#

That literally makes no sense

final depot
#

@weak plinth sorry what's the context for this again, sort of got lost along the way

#

Looking back: I think you were suggesting Entity Framework or Hibernate within Unity and settling on SQLite usage.

#

If it's entirely local, that's probably a good choice, albiet I'm not sure how GC friendly a string based SQLite connector will be.

weak plinth
#

I wasn't suggesting

final depot
#

But the qusetion was about non-realtime networked play.

weak plinth
#

I was asking if it was possible

final depot
#

To which I was suggesting just use a HTTP server instead.

weak plinth
#

Yes, but no

#

I want to get my data today

final depot
#

Or a websocket enabled HTTP server

weak plinth
#

Might as well use just TCP if you're at it

final depot
#

If the game is not realtime, I don't see a problem in the latency of HTTP

weak plinth
#

Needless overhead

final depot
#

It simplifies deployment and devops given how much existing work there is around web infrastructure.

#

Hell, people use Firebase which is HTTP/websocket based for even lightly realtime operations all the time.

weak plinth
#

Doesn't mean it's good

final depot
#

It depends on the use case

weak plinth
#

Rather needless to pretty much wrap your database in a rest endpoint

#

Either access your data via a server that actually handles the data

#

Or access it directly

#

No needless middle-step http

final depot
#

So you're suggesting a direct client <-> remote database connection?

#

For a networked game?

weak plinth
#

Yes, because your client should be a server

final depot
#

Depends on the scale and scope of the game

#

I definitely wouldn't apply this for a game like Pokemon Go

#

which, btw, does use the aformentioned architecture.

weak plinth
#

Want to bet it's not just a http server

final depot
#

If it's a direct turn-based 1v1 game, by all means, skip the server entirely.

weak plinth
#

In cases like pokemon go, and pretty much every case, that server isn't just a http middle man

final depot
#

Even in that case, TCP is fine. the latency of a turn-based game supercedes any connection latency you could have.

#

Especially if there's only one handshake

weak plinth
#

http isn't just tcp

#

Don't compare them as equal

final depot
#

Yes it isn't, but you decried TCP as a issue earlier, which I thought I'd also address.

#

But again, I don't see an issue with HTTP for non-realtime networked games. Particularly since web developerss, devops, and available infrastructural support are in abundance.

weak plinth
#

I do, since it's needless

final depot
#

Another thing I think I should address is that HTTP/3 is UDP based.

weak plinth
#

If there's no business logic on that http server, it's pretty much doing nothing

final depot
#

And uses a protocol that is very similar to that of Valve's GameNetworkingSockets.

#

If you need it for authentication, authorization, input validation, etc.

#

yes, you need that HTTP server.

#

Lest you directly let clients arbitrarily call DROP TABLE ....;

weak plinth
#

But then it's not just a http server anymore

#

It actually has a purpose in that case

#

Also, if we're talking localDB, something like SQLite is obviously better

final depot
#

Wait what do you mean "not just an HTTP server anymore." Those seem like pretty standard features developers bake into those kinds of servers?

#

In fact, pretty much every HTTP server framework I know of offers some variation of those features.

#

If you are talking entirely local for a P2P game turn based game, I wouldn't even use SQLite and just manage my own in-memory state.

weak plinth
#

Depends on how much extra time you want to spend on a propietary sollution that might end up in spaghetti and or poor performance

final depot
#

In what way is this proprietary? I was under the impression pretty much the entire stack is open source now.

#

Save for maybe your Unity client.

#

Insofar as performance goes, yes it'd be an issue if yo uare firing multiple requests per action

#

But if you have control over both the server and the client. I don't see how you couldn't make each action in the game just another endpoint and atomically apply operations on the game state.

weak plinth
#

Yeah, nvm. Much context was missed here

weak plinth
#

Whats the topic

#

Seems to much to read

#

Tcp

#

Its a really nice protocol

#

Not nice

#

But good

#

And u do t get data loss

#

Dont*

drowsy quarry
#

I really have this one question I couldn't find answer for on the internet... I know games like FPS does things like client-side prediction, interpolation, delta compression, lag compensation, etc to combat latency issues. How about games like Diablo (ARPG). Do these big companies try to synchronize all clients for every single monster models running around in the screen? If so, how do they achieve this? Just periodic updates from server with massive states of all the moving parts?

weak plinth
#

IMO , it could be just an animation, and once the players are on enemies sight, they receive the animation of the player aswell, and position gets updated every frame

#

If what i said isnt correct, correct me bois

weak plinth
#

I think the players dont even get rendered if you're x amount away

maiden sundial
#

Hello,

Every player in my game have their own Ray how do i send this Ray to the server?

Iam using photon2

Can provide more information if needed, thanks!

gleaming prawn
#

Every player in my game have their own Ray how do i send this Ray to the server?
Which server? You can send data to the other clients in PUN/PUN2

maiden sundial
#

@gleaming prawn PUN2 Thanks for answering!

gleaming prawn
#

You do have access to a server plugin (that you can write in C#) if you have photon enterprise, but that is normally better suited with either photon realtime or Quantum (which are designed with server logic in mind)

weak plinth
#

what does photon use for packet compression 🤔

gleaming prawn
#

Photon Realtime, the low level transport layer, nothing... then the individual HL products use different things:

  • PUN doesn't do compression unless you do;
  • Photon Quantum uses a few different compression methods on the input batches. Snapshots can be compressed however the developer wants as well;
  • Photon Bolt has its own delta compression mechanisms embedded...
#

But they are all custom compression methods developed for each use case. Not an off-the-shelf library.

#

Photon Realtime has the option to enable Encryption to all messages by default though...

dapper night
#

does anyone did Bandwidth optimization by limiting network streams redundancy ?
(im new to Networking)
im trying to optimize client & server bandwidth by limiting the streams sent from both sides, each time the client sends a message (inputs) i add it to a ring buffer with X elements then i try to see if all elements contains the same message values, if true then i just dont put the current message into the outgoingMessageBuffer.
in client side it's just awesome cause it optimises a lot the Bandwidth without even noticing it, eg when a player is running into the same direction or his just not moving it automatically stop sending message after about 1.5second.
in server side it's more complicated because the server is sending custom messages to each player about all players around him so if the server stop sending messages about specific players a new arriving player in the current area will not be updated about them. so the muted ones need to save informations about notified players. it gets a litle bit complecated XD so im here to ask if anyone already did it and if there is any good approach to do it.

graceful zephyr
#

that's a pretty common technique

gleaming prawn
#

Because you are using state transfer, I guess you need scheduling

graceful zephyr
#

especially for games with larger player counts

gleaming prawn
#

To limit server bandwidth

#

So even players who need to receive info about a lot of "entities" would receive each entity updated data "keyframe" in more spaced intervals, while keeping bandwidth bellow a defined threshold

#

Removing redundancy is nice as well, of course... It's a form of "delta compression" in the end, right?

#

(there are different definitions/flavors of delta-compression)

dapper night
#

that's reassuring, i never seen this approach in any website so by implementing it from scratch i thought it maybe presents hiden bugs XD

gleaming prawn
#

You won't see most of the more complex stuff on websites...:)

dapper night
#

🙂 that's awesome thanks!

#

im limiting the stream redundancy to 20 duplicated messages, is it ok or should i be more greedy about Bandwidth XD

jade glacier
#

If you are bitpacking, you can inline bools to indicate things like that @dapper night

#

I abuse the hell out of inline bools in my serialization

dapper night
#

sorry @jade glacier im new to networking, by bitpacking you mean the whole message pack or boolean values ?

jade glacier
#

How are you serializing your stuff now?

#

With a buffer and Write() methods?

gleaming prawn
#

Try to limit individual packets to < 900 bytes or so (to fit into 1 UDP datagram, no fragments)... And server->client frequency can be something between 10 to 60Hz or even 120Hz (depends on the game actually)

dapper night
#

for the moment im serializing all my structs by their primitive. float are Quantized to 1000, 2 joysticks are compessed to 4 bytes and messages concernes are sent as an int. my game cant have a maximum number of 32 players for the moment so if i want to send messages about player 1, 5, 9 20 i just these indexes bits in the concernes value. (ECS is halping me alot with it's linear data)

jade glacier
#

But you are getting those into you a byte[] somehow. What lib are you using?

#

Sounds like you might be letting a HLAPI do it for you

dapper night
#

im using Datastreams from the unity transport package

jade glacier
#

ah, haven't looked at that - so no clue what they are doing

#

Do they have Write() methods and a buffer?

dapper night
#

DataStreamWriter and DataStreamReader

#

yep

jade glacier
#

Ah, so probably all byte aligned

dapper night
#

yes

jade glacier
#

No fun in that 😛

#

Other option if its all byte aligned is to include a mask

dapper night
#

yes im including masks when sized messages are written to the buffer

#

i saw in some blogs people are compressing to bit Level i didnt get hwo it works

jade glacier
#

same as with byte level

#

it just has more going on behind the scenes to dance around the byte alignment

#

instead or writing and reading bytes from a buffer... you read and write bits

#

but for ECS stuff, that might not be your friend

#

It makes hand serializing really easy

#

either way, sounds like if you are using masks and such you are doing the same thing

#

making markers that indicate what is in the stream

dapper night
#

for the moment i think my optimization is anough for my game type.
for a 6mn game ( 3 players ) the server Bandwidth is about 0.5MB , (without incliding server side streams redundancy)

jade glacier
#

Your main enemy as Erick mentioned is the MTU

#

If you are keeping your packets under that, you are doing well

#

start needing multiple packets per tick, you need to start getting more creative

dapper night
#

ow that's awesome Thanks @jade glacier

#

i have a noob question, by optimizing the Bandwidth does it authorize me to increase the tick rate or should i take more options in consideration ?

jade glacier
#

Tick rate generates more packets, but it does affect latency

#

so its a whole spreadsheet of considerations

#

there are factors like how you are managing your buffer, since the higher tick rates let you run a smaller buffer (in terms of ms) but you may have to increase the buffered number of ticks to stay on top of jitter. Though eventually you should write in some adaptive buffer sizing code, so that you are always running as close to 1 tick of buffer as possible.

#

Then there are server costs

#

and just CPU limits based on the number of connections

#

and if you have to start using a priortization engine to keep your packets under MTU... and how much that is going to struggle at high ticks... and on and on.

#

So basically... don't try to answer that yet. Its kind of a big question

#

I would finger in the air it with "Does this feel acceptable" and get as low as you can with that in mind. You will always be trying to get away with using the least data possible to get the feel you want.

dapper night
#

ow i get it! that's exactly the answer i was looking for ^_^.
for the moment im using ENet for the networking stuff, im checking and sending messages 60/s but filling outgoing buffers at a lower rate (in FixedUpdate) .

#

so generally i send messages the same frame they got written and process them the same frame they are received (60/s)

jade glacier
#

My default settings for my asset is fixed rate of 50 per second and sending every 3rd tick

dapper night
#

i think ill test my server at a lower fps and see how it works it can be really benefic for server costs 🙂

jade glacier
#

I tend to dev at low fixed and send every rates

#

it makes it easier to spot weirdness and frame dependences and such

gleaming prawn
#

@dapper night server costs will be HIGH... That's one of the reasons why I do not agree when people say what we offer is expensive...:)

jade glacier
#

I have gotten into lively debates with some net lib makers on here about that - who think that data is cheap and optimization of data is a waste of time, as it creates CPU usage.

gleaming prawn
#

That's a trade of

#

You need a fine balance

jade glacier
#

CPU usage is a concern, but the scales lean heavily in favor of not making bloated packets I have found

#

PUN2 implodes when you exceed 1 packet

gleaming prawn
#

It's more on the line that:

  • FPS-style authoritative server is a LOT more expensive than other options (unless you are not paying for the server costs, like player hosted games);
jade glacier
#

CPU usage got crushing compared to the cost of bitpacking to stay under the MTU

gleaming prawn
#

Bloated (UDP) packages don't make sense, and don't scale (on the contrary, it's a death spiral) no matter the transport layer you use...

jade glacier
#

with 50 characters with transform/animator syncs... PUN2 needed to create 3 packets and bitpacked it was just one... and the CPU difference was massive

#

So, not scientific

gleaming prawn
#

transport layers like ENet alow you to send beefy messages, but that doesn't mean you should do that in runtime every tick...

jade glacier
#

but it was a massive difference

#

bitpacking won by a landslide

gleaming prawn
#

PUN2 doesn't schedule updates AFAIK.

#

Neither does compression (except for basic delta compression I think), so ...

jade glacier
#

PUN actually forces a new packet every 20 net object writes

gleaming prawn
#

To avoid MTU I guess

jade glacier
#

Which came out about right coincidently

#

packets were about 900 bytes

gleaming prawn
#

Yeah, it's an educated guess... the 20

jade glacier
#

Not sure how or why 20 was arrived at

#

but a transform and an animator produced about that

gleaming prawn
#

Tests with the most common use cases...

jade glacier
#

seems so

weak plinth
#

Whats le topic

dapper night
#

@gleaming prawn for the moment our team (army of 4) found that kubernetes fits our needs with it's free 300$ trail and agones library to manipulate the game servers easly.
we are also looking for a server provider that have low costs and as less a possible downtimes.
we are hosting our Social,Store Server in contabo but downtimes are really frequent.(daily)

weak plinth
#

Then

#

U could try getting sdk

#

Which you can edit the ss by your self

gleaming prawn
#

The thing @dapper night is that as soon as you have real players and the numbers grow... Bang...

weak plinth
#

And make as less downsides as posskble

#

Possible

gleaming prawn
#

Social,Store Servers normally are fine with these options, the load in there is not nearly as high as the game servers (specially if you run headless authoritative servers)

#

This becomes super expensive...

weak plinth
#

How much would photon quantum cost?

gleaming prawn
#

It's on our website

#

1K/month for SDK access

#

Or you can pay 4-5k / month for a (good) developer to write something similar over 3 years or more..::)

jade glacier
#

way too many people reinventing that wheel for how hard it is to do right

gleaming prawn
#

And not finishing...

weak plinth
#

Hire AI's

#

Problem solved

jade glacier
#

There are just not enough great game networking people in the world vs the number of people who want to make net games

#

That and most net games fall into some very common archetypes... which make them very conducive to just using a premade library

gleaming prawn
#

I think the reason is another

#

Single player, local multiplayer games do not COST to the developer over time much (with infra-structure)... Games run on the player machines...

#

Multiplayer games have an inherent cost that people just don't think about when they say: I'll write an MMO.

#

Premade libraries EXIST, and many of them are free, some are good as well....

#

But how many good online games exist from smaller developers? (they exist, but not a lot).

#

The business model is totally different. Reason is not technical.

jade glacier
#

Good point

#

The tail on MP is a bit longer and messier

faint fern
#

Anyone have the new links to the new Unity3D Networking information. I see some stuff pinned, but it doesn't look updated.

graceful zephyr
#

@faint fern thats still the latest

faint fern
#

@graceful zephyr what about this talk?

#

I feel like there is more here I'm just not seeing

delicate sorrel
#

@faint fern

stray scroll
#

Is it possible to add extended build platforms in unity e.g. for servers to mark assemblies to be included in? I.e. I want to have both all of my different servers and client in same project, but be able to build the different executables with different assemblies. I see you can tick by platform, but not sure if you can extend this list?

gleaming prawn
#

That's a good question... But I never see the Unity guys answering here.

stray scroll
#

Maybe there is a better way to do this? I don't know.

#

I just figured there are some pros of having them in same project, and now with ECS and multiple worlds it feels like a neat option.

azure quail
#

@stray scroll asmdefs have a setting for 'Define Constraints' which are like preprocessor defs but on assembly level

#

so you could put UNITY_EDITOR and it'd only be included in editor

#

or anything you define yourself in build

stray scroll
#

Thanks a lot!

gleaming prawn
#

Thanks

winter solstice
#

Does anyone here have some informations about Unity UNET 2.0 (connected games netword) and a possible release date ?

#

or if there is a chance to try it, on the actual state, cause the sample project is so broken

gleaming prawn
#

There will be no UNet2 AFAIK

#

What they are working on is DOTS netcode, and that's essentially it

#

That's what is being stated with all the samples and blog posts (all of them posted here as well BTW)

#

It will not be even remotely close to what UNet was...

#

It's a different approach, more focused on high performance and less on simplicity of use.

winter solstice
#

yeah yeah, i know all this already, but still it's a middleware that fit well with DOTS as it will be made for it

#

i am not asking for what it will be, but on when we will be able to try it out really with a proper doc

stray scroll
#

@winter solstice No proper doc, you can watch the vids on youtube and try it out https://github.com/Unity-Technologies/multiplayer . Some things will change in the next update, I would assume it comes with 2019.3, and that is struggling to be released afaik, as it should've been released already. Most likely before next year?

solar tendon
#

i have a webserver, I want to connect my unity project to that server and read the account/password for a login system. I cant seem to find anything that is working. any help is apreciated

brazen cairn
#

I would like to control my unity 3d software via a webpage. for that it would be handy, to host the webpage over my project because of CORS. What can I do to use an already built webpage in a unity 3d software. At the moment I build listeners and stuff by myself, which is ugly, unhandy and doesn't support the REST API ...

faint fern
#

@brazen cairn this has been done a bunch of different ways over the years. Some have used a tcp client, I was just actually looking for Discord hooks into Unity3D.

#

Since Discord is so popular as of late.

stray scroll
#

@solar tendon UnityWebRequest?

solar tendon
#

@stray scroll yea i realized that im not having an issue with unity but rather with the form on the site

stray scroll
#

@azure quail Maybe you know this as well, but I have now made two defines for Server.asmdef and Client.asmdef, both uses Mixed.asmdef which in turn uses Base.asmdef . I've turned off Auto Referenced on Mixed & Base, because those are referenced in Server & Client .asmdef and shouldn't be included without either of them being included. But now the compiler doesn't find code from Base.asmdef in Mixed.asmdef . Is there some concept I've misunderstood here?

#

Or is this one of those cases where I must have them defined in the project, but the build will be fine?

winter solstice
#

i feel a bit frustrated as we are starting a new networking project, and i feel like the new Unity network system is about to be released.... it would be such a pain in the ass to start a project and see the new vrsion being release 2 week after

#

is fully bugged

#

with 2019.3

#

and the last update was 4 month ago 😢

stray scroll
#

I'm using 2019.2.12f1 and it works, there are some "bugs", but you can work around them. However next release won't be production ready, so if your release date is close, I wouldn't start there.

winter solstice
#

no close release date, just starting a new game

azure quail
#

Mixed.asmdef has a reference to Base.asmdef? that should work

stray scroll
#

I'm going to redo the process then.

azure quail
#

to be clear you gave it a reference in Assembly Definition References on the Mixed.asmdef right?

#

and also not the other way around

stray scroll
#

{ Client, Server } => Mixed
{ Client, Server, Mixed} => Base

azure quail
#

hmm

#

i think that should work

#

unless Base is somehow not being included

stray scroll
#

Hmm, ok it seems to work now.

azure quail
#

noice

#

sometimes you might need to restart while fiddling with asmdef's because unity's dll handling seems to be weird sometimes

#

like dll's not unloading once they are loaded even when you delete them from the project

#

until you restart unity

stray scroll
#

Yeah ok, something is still off. When I have no defines, it still includes Mixed and Base into the Player assemblies.

azure quail
#

what is the Player assemblies

stray scroll
#
using UnityEditor;
using UnityEditor.Compilation;

public static class AssemblyLister
{

    [MenuItem("Tools/List Player Assemblies in Console")]
    public static void PrintAssemblyNames()

    {
        UnityEngine.Debug.Log("== Player Assemblies ==");
        Assembly[] playerAssemblies = 
            CompilationPipeline.GetAssemblies(AssembliesType.Player);

        foreach (var assembly in playerAssemblies)
        {
            UnityEngine.Debug.Log(assembly.name);
        }
    }
}
#

Wished Unity would've named it differently x)

azure quail
#

huh didn't know that was a thing

#

so Player means build in this context then?

stray scroll
#

Yeah

#

You can choose Player or Editor

azure quail
#

just tested your script and seems to work for me

#

tho that's without any references to other assemblies

stray scroll
#

Yeah, so I can see in the logs that Client, Server - assemblies are not included. But Base and Mixed are.

azure quail
#

what do Base and Mixed look like

#

the asmdefs

stray scroll
#

And only amsdef:s in my Asset folder that have Auto Reference ticked are dots NetCode and Wwise, which both doesn't reference any of the other.

azure quail
#

hmmm looks fine

#

oh

#

i dunno if you just removed them for testing but if you don't set any define constraints they'll always be included

stray scroll
#

Oh, isn't that what Auto Reference solves?

azure quail
#

i think auto reference just makes it so it's referenced from the normal assembly (like putting scripts in Assets) but i could be wrong

#

lemme test that

#

yea that seems to be what it does

#

naming isn't really clear

stray scroll
#

Humm

#

So are constraints || or && ?

azure quail
#

&&

#

seems you can also put a ! in front for requiring it to be undefined

stray scroll
#

Ugh, so I need to have 1 define for client, 1 for server, 1 for mixed and base ?

azure quail
#

hmmm

stray scroll
#

Then if I add another server, like Login, I'll need to create 3 new defines, {login, commonServer, commonClient} .. what if unity just added some logic to the defines x)

azure quail
#

yea i'm not sure how to get around that

#

i'd def make an editor script to make this easier tho if you're gonna have so many different build types

#

like something that automatically sets defines through a button/dropdown

maiden sundial
#

Anyone familiar with photon. I have done alot but just recently found its all on the client side. As soon as a second player joins nothing gets sent to serverside. Is this a huge hazzle, is it smarter to start over and get it right from the start? I have movement syncronized but other stuff such as pushing a button and doors is not syncronized and iam not sure how to do that.

Any help is appreciated
Thanks!

azure quail
#

@stray scroll btw if you set the platform to Editor unity won't let you add the monobehaviours to a scene (i guess it doesn't check Editor marked assemblies) but if you do a UNITY_EDITOR define it will

thx for bringing this thing up, i ran into the issue earlier when trying to make benchmark scenes but didn't realize defines could be the solution

solar tendon
#

How can I get a confirm/deny message from a webpage when using wwwform to submit a username and password. I get no errors in unity however I can’t seem to figure out how to get a response reading from the post. Any help appreciated

#

Note: what I’m trying to do is use my webserver login system to weigh the account is active when logging into my game in unity,

maiden sundial
#

Hey! I created a script that removes whatever the player is leftclicking at. When my friends join and deletes something on his side it works sometimes on the serverside and sometimes not. Any idea why? Iam using Photon

stray scroll
#

@maiden sundial The RPC code will trigger one each client? So if they're not hovering the object it wont be removed?

solar tendon
#

I was hoping that after submitting the username password that right there in the c# script on unity it could tell me “correct” or “incorrect” for password and teach accordingly, is that something possible?

stray scroll
#

You want to stall the main thread until you get a response back from server which might take several milliseconds or seconds even?

solar tendon
#

Yes. All I want is a nice “success” of “failure” step notification

#

Or*

#

String*

#

iPhones + fat fingers = frustration

#

Ideally I’d like to be able to
Post username;
Post password;
Wait however long
Get response if password was ok or not

stray scroll
#

I'm not sure but I guess you can do a while(requestOperation.isDone == false) { } ?

solar tendon
#

Yea, the issue I’m having is detecting the success or failure based on whether the password/username successfully logs in

stray scroll
#

You can use coroutines as well, but I guess you don't want that as well.

#

But what are you doing on your web side then?

solar tendon
#

Registration of accounts and housing that data (username/password) in a DB

stray scroll
#

in php?

solar tendon
#

Yea

stray scroll
#

so just echo 0 if it's success and 1 if not?

solar tendon
#

How would I go about getting it to echo?

stray scroll
solar tendon
#

And that goes in unity project or webserver?

stray scroll
#

webserver

#

It checks the DB if row exists of the credentials, from IsValidSession functions.

solar tendon
#

Ok ok right on thanks man, I’ll definitely give that a shot

stray scroll
#

Then from UnityWebRequest..downloadHandler.text you get the response you have to parse.

livid spear
#

Does Unity have a dedicated server able to be built from editor like Unreal does? I'm thinking on making the switch to Unity but if it doesn't have Dedicated server support then I can't...

#

Or if there is another way

final depot
#

There are headless builds if you want it

#

Though management and deployment of multiple sessions is basically, as far as I can tell, 1:1

#

So you'll need something to orchestrate game sessions

livid spear
#

Ah yeah like a master server?

#

To send info between and push players to the game server etc?

final depot
#

If you need a relay server or just something to coordinate clients

#

You can make that without Unity

#

I would suggest using Unity as a server only if you need the Unity game loop

#

Or other Unity systems

#

On the server as a source of authoritative simulation

livid spear
#

🤔

left ember
#

Hello. I have a question:

I want to make an app that access a website, search its products, save images (optional), name and price of the selected items on a wishlist. I'm trying to learn about web request command but i can't understand how it works. Can someone please enlighten me? Thank you

left ember
#

Anybody?

stray scroll
#

@left ember I answered something about web request like 5 messages up, is your question unity related?

warped urchin
#

Hey all, I've got a two questions / issues (I am using UNET).

  1. My player UI shows up for all players. Is this a camera problem or can I simply solve it with isLocalPlayer? Ie if the player is not local then hide the UI? At the moment I just have one camera per scene.
  2. Whats the best way to make line renderers visible on a network? I can spawn in projectiles but am having trouble with line renderers.
    Thanks.
delicate sorrel
#

Anyone else get ClientServerBootstrap interface error when using multiplayer netcode?

#

Looks like the hybrid renderer API has changed and the ClientServerWorld.cs hasn't been updated

#

Anyone fixed this on their own?

stray scroll
#

I haven't tried netcode the newest released ECS update no.

arctic forum
#

but the second one is never called any ideas?

#

@ me if you find any solution

weak plinth
#

I'm using Mirror Networking (which is UNET, but more up to date), but I am stuck with a predicament. I'm creating a 2D sandbox game, with procedural generation, but I don't know how to sync the generation and any world modifications to clients.

gray pond
#

@weak plinth We can help you in Mirror's discord

arctic forum
#

I fixed it by adding a boolean to switch on second token on update()

#

so if anyone is against that or has a better suggestion tell me

#

though now the chat is fully functional from what i can tell.

winged veldt
#

anyone here knows how to use firebase database?

#

im having a trouble with getting jsons

burnt axle
#

@winged veldt Strange, i was just gonna ask a question regarding firebase lol

#

Is firebase the best option to store scoreboards? And should i store results to the cloud in the game or in the lobby after a game session? Im thinking that storing results in a game can cause some performance issues with extra network requests

winged veldt
#

meh

#

if you are doing a tiny game just dont use a scorboard based on a database

#

is easier to use google play services

burnt axle
#

Right, i thought about that service earlier but overlooked it. Does it provide any analytics or reports about crashes? I saw firebase had this, not sure if i need it atm but it would probably be nice to have to optimize the game further.

winged veldt
#

honestly idk, but it does his work

arctic forum
#

Playfab also stores user scoreboard

#

But don't know if it can work with Google services

#

Needs research

merry kite
#

what is best photon engine or other staff

arctic forum
#

i use photon but dont know about the others

#

cause im using playfab to authenticate

karmic void
karmic void
graceful zephyr
#

@karmic void Any reason you're posting random articles/githubs without any messages? lol 😄

karmic void
#

First article is about Coherence, second is a question. Anyone use KCP in Unity?

graceful zephyr
#

only one using KCP i know of is Improbable

karmic void
#

Interesting. It is better than UDP? What the difference?

graceful zephyr
#

KCP is reliable, trades bandwidth for latency

#

KCP is built on top of UDP

karmic void
#

@graceful zephyr Thank you for you info...

burnt axle
#

Is there a good tutorial on how to set up the social api? It says it uses the default gamecenter depending on the platform, but it seems like i still have to considering if the user is on android or ios because the leadeboard ID is different since google has game play services and ios has gamecenter (im assuming i need to create a leaderbord ID for each gamecenter in order to sync data relative to my game)

lucid stag
#

Hello fellow developers!

#

This is not very Unity related but more of HTTP

#

So in HTTP Status Codes 301 means "Moved Permanently"

#

Does that overwrite my domain to the new domain?

#

Because I have a friend using HTTP 301 to redirect user traffic rather than 207 "Temporary Redirect"

candid sorrel
#

"Fall (Q3) this year: Preview DOTS-Netcode will be available sometime this fall providing a server-authoritative stack, including entity serialization, delta compression, forward prediction, and interpolation. Given the Preview state, developers should still expect breaking changes to the API surface until the stack achieves verified state."

Has this "Preview DOTS-Netcode" been released yet, or are we still waiting?

vagrant relic
#

not released yet

#

But the update to entities package is out

candid sorrel
#

What is the entities package?

vagrant relic
#

Thats what DOTS uses.. the Entity Component System (ECS) with their jobs system. Basically they are contents of the DOTS

candid sorrel
#

ok, so an update was made to DOTS but the new netcode is not yet available

vagrant relic
#

exactly..

candid sorrel
#

Thank you!

vagrant relic
#

The other samples that use that entities package is not out yet which includes the netcode

candid sorrel
#

So the FPS sample is not using the preview dots netcode?

vagrant relic
#

The current fps sample uses the older code. They are going to release the new one which uses the new package pretty soon now I think.

candid sorrel
#

OK, thank's for the info, I look forward to trying it when it comes out!

#

I think I'll lay low and learn about DOTS while I wait...

jade wharf
#

so is DOTS actually available via package manager or what

vagrant relic
#

yes. Just enable preview packages in the package manager and you should see it.

stray scroll
#

Weird when you're asking for "DOTS" in networking channel, Entities package is available yes, but not DOTS netcode.

jade wharf
#

yea it was the netcode specifically i wanted to check out

#

is it available in the 2020 alpha build?

grand wasp
#

it's not out yet.

The latest Entities package has dropped (0.2.0*) but nothing else from the FPS demo at Unite copenhagen (animation, netcode) has released yet

graceful zephyr
#

@jade wharf it's not out yet, wait a couple of weeks

jade wharf
#

Rip

burnt axle
#

@lucid stag It depends on what the 301 redirect adress is. Usually 301 just redirects domain on http to https for safety purposes.

#

Anyone familiar with the Unity Social API? Im trying to figure out how it works with Google Play Services and IOS Gamecenter

stray scroll
#

Or well, you can already download manually if you can't wait x) But not in package manager yet of what I can see. ;; I knew it would be release just as I can't work on my project for a few days sobs

hallow comet
#

Asking for console development: Will voice chat be supported through the new networking subsystem?

#

Like in, if NAT punch fails for P2P voice chat, the PSN / XBoxLive relays will be used. Anyone know? I would greatly appreciate, thanks.

#

(not trying to start a scary console NDA discussion here, just a yes / no answer will suffice)

stray scroll
#

Not sure what you are asking. Are you talking about Dots netcode?

hallow comet
#

I'm not familiar with Dots, but I'm pretty sure it isn't directly related to online services for consoles.

lucid stag
#

@burnt axle Kk

hallow comet
#

@stray scroll Right now if you do a console game with UNet LLAPI (for transport only) and dedicated servers, you'll still have to solve encryption, ping and voice chat.

#

Voice chat is the only thing left to do and requires to implement the networking subsystems of the consoles to leverage the PSN and XBoxLive cloud (so we won't pay anything for voice bandwidth)

#

This is a game in Unity 2017 and we want to know if it helps to upgrade to 2019. Is there anything in the works for voice chat support?

stray scroll
#

No, not that I have heard off yet. Also the new network system is based on ECS so that might be a problem too.

hallow comet
#

Oh ok. I'll try to e-mail support and see if anything is in the works. A year ago they didn't know if they'll add it or when. Thanks for the help!

worldly cedar
#

Hey all, I am experimenting with the new transport layer, and whilst everything works in editor, as soon as I build I get a 'plugin expected x86 architecture, got x64'. I have check the com.unity.transport folder, found the dll but it has all checkboxes ticked. Any ideas?

#

(its the networkbindings.dll btw)

worldly cedar
#

sorted mine. (need to change the setting in build settings :P)

faint fern
#

@worldly cedar Let us know how it goes

#

I'm interested in hearing more

worldly cedar
#

Its actually going fairly well (im pleasantly surprised at this point). The layer is low level, doesnt hold your hand that much, but it does cover up all the memory management and core networking that I want to avoid. Ive got transforms and rotations syncing across a central server. Im a VR programmer, so I'm going to spend some time over the next week setting up a simple VR networking system, see how I go.

faint fern
#

I want to see how you interpret it

#

Let me know when you get your demo going

#

@worldly cedar

worldly cedar
#

Will do :)

livid spear
#

I'm learning C# for unity at the moment but it seems no matter where I look it's all single player tutorials. What is different between single player and multiplayer when it comes to C# for Unity? Like what should I search for when it comes to guides?

I want to learn the server authoritive kind of c#

I was thinking on using Photon or Atavism or something as server software but I think I still need to network my code to allow it to talk to the server right?

gleaming prawn
#

If you are still learning to program, I think you should really consider finishing a (single player, simple) game before venturing into multiplayer...

livid spear
#

I just don't want to relearn stuff if I can help it.

#

I see there's a new networking system coming in. I guess if I spend the time to learn the workflow of Unity and C# I can later update my knowledge once the new system gets released?

gleaming prawn
#

Really, trust us. Just take your time to learn solid foundations. Not really more to say, sorry.

livid spear
#

Ok

#

Any recommendations on good tutorials to learn Unity besides the ones from Unity directly?

#

Paid or free, either one

#

🤔

gleaming prawn
#

I'd say it depends a lot on your goals.

livid spear
#

I'm looking to make a Isometric Action RPG a bit like Path of Exile

gleaming prawn
#

What do you want to do?

  • develop games just for fun?
  • become a professional (if yes, a programmer, a game designer?);
  • develop games in a small team or alone (if on a team, which role like above?)
livid spear
#

As my final product

gleaming prawn
#

Each path would require more or less proficiency in programming (which is something you need YEARS to get, there's no shortcut)

#

Isometric Action RPG a bit like Path of Exile
Multiplayer?

#

Alone?

livid spear
#

Was hoping for multiplayer but you recommended single player for my first game which makes sense I guess so I'll say single player.

Alone for the coding and functionality, hoping to find someone later for graphical assets

gleaming prawn
#

If you aim to be a programmer

#

Start by learning C (not even C#)

livid spear
#

Yep

#

I know some cpp

gleaming prawn
#

sole programmer... Sorry to disapoint you, but this will take you some time.

#

But yeah, start with single player

livid spear
gleaming prawn
#

The path doesn't change much. But you'll need some time...

#

Tutorials it's more about which ones YOU feel confortable

livid spear
#

I'm expecting at least a couple of years to complete a game at least.

gleaming prawn
#

People learn in different ways and paces, so what I like might be boring for you, etc

livid spear
#

True

gleaming prawn
#

Try free tutorials on Youtube + Unity's docs

#

If you are more of a formal guy, try solid C# tutorials, not related to Unity.

livid spear
#

Ah yeah that's probably me

#

Thanks for pointing me in the right direction

#

I appreciate it

gleaming prawn
ocean ledge
#

can a NetworkBehaviour marked with ServerOnly Call RPCs?

jade glacier
#

Sure, since RPCs are called from the server

#

However, not if that RPC is inside of that serveronly code

#

that I would expect to fail

#

If you are using Mirror @ocean ledge then there may be some changes in that behaviour, best to ask in the Mirror chan for that

hollow dirge
#

Communication would be via a simple text-based protocol

#

The Transport Layer can use two protocols: UDP for generic communications, and WebSockets for WebGL
Looks like that's a no for TCP

#

Looks like only way is with the Sockets standard lib (System.Net.Sockets)

burnt axle
#

@livid spear Youtube and Udemy

livid spear
burnt axle
#

Do i need to create an leaderboard in google play console before i can use it with the Unity`s Social API? There is very little info from Unity and google results on this

ocean ledge
#

@jade glacier no I'm using UNET in 2017.4 I have an object with a network identity component marked as Server Only. A script component on that object is calling a RPC on a different networkbehaviour and that one isn't marked Server Only in the network identity component. for some unclear reason to me this doesn't work when i build the project however works flawlessly in editor mode (having 2 pcs - 1 client and 1 server)

worldly cedar
#

so, simple question, is there an established method for retrieving client/server IP using Unity Transport Layer (the new mulitplayer system)?

jade glacier
#

@ocean ledge I don't fully recall the quirks of unet. I would though make all methods and fields involved public, and you may need call the RPC from inside the same class... Meaning making a second method in the server only class that is not an RPC, and have that call the RPC. The Weaver is quirky.

upbeat basalt
#

Sorry in advance if this is the wrong channel, seems like you networking guys would probably know DB's the best and it didn't seem to fit in anywhere else other than "general code".

So I'm making an MMORPG which requires quite a bit of traffic/storage in ye ol' database.
Have looked into what to try and since I am working with limited funds I was mainly looking into Open Source DB's. MySQL seems to be used everywhere but I am not a big fan of oracle and SQLite is probably my favorite so far but apparently it gets slow when handling big amounts of data. So, what would you guys consider to be a good choice for this and why?

#

One of the top contenders for me right now is MongoDB since I have nothing against NoSQL DB's and it seems like a very quick and fast DB and if I do reach the need to scale it up, I can use the cloud SQL service...

weak plinth
#

i can get some help for photon

#

please

solar garden
#

@jade glacier Can i ask you about client prediction ? i didn't understood the input resim part, from what i grasp the client sends numbered inputs to the server while also using it for local movement AND also storing it in a input buffer, the server moves the player with the input and sends back the position with its tick number, the client that may have stored/used inputs receive the real position and check if we are almost at the same position if yes i clear the input buffer up to the server tick number, if not what now ? what is the resim ? applying the inputs remaining in the buffer and if we are still not good just apply the good pose ?

#

is what i said even true ?

jade glacier
#

I use ring buffers, but that is the idea yeah

#

@solar garden

solar garden
#

What about the resim ?

jade glacier
#

The resim is the reapplying all inputs past the disagreement

#

You move objects to the server stated state, and run the ticks again with you history of inputs

solar garden
#

but why would i do the history of inputs when i has a chance to be wrong counting packets lost ?

#

just move the player to the right pose and move on right ?

#

i don't understand this input buffer business

#

inputs can be wrong to the eyes of the server wich is autoritative anyway so when you predict + store the inputs and get your pose back but its wrong on your side why re applying inputs matter if there is a chance that it wasn't recived by the server ?

#

i mean your prediction was wrong, replaying it will still have the same result right ?

jade glacier
#

But more than I can explain here on a phone sorry. But it's all the standard handling of prediction and correction after desync

solar garden
#

Its ok thanks anyway !

gleaming prawn
#

If you don't reaply inputs again (it's just advancing the local prediction one more time) your client will be "laggy" just interpolating server confirmations

#

Information confirmed from server is always "in the past", so you need client side prediction again (all modern games do it, otherwise it will fell slow)

#

I think only quake 1 did this way back without local prediction

#

Only way to do the client side predictio then is too keep the input buffer (even if slight different than the server ones - these will come later in the next confirmations).

#

That is the bread and butter of client side prediction. Notice I'm not talkinh about deterministic predict rollback (which is another story completely as discussed here many times)

solar garden
#

does the server has a input buffer too or it just sends position and tick number ?

gleaming prawn
#

Server also uses input buffers yes, but it will accept them in order...

#

There is normally a queue to control the input rate, etc

#

In some implementations you also might want the client to be "aware" of the server clock, so the client tries to comply with the server input rate...

#

It might send input with tick numbers, etc...

#

The client queues in the confirmations and applies them smoothed (then adds the re-prediction on top)

#

I think the best explanation of this is the video by the overwatch team

solar garden
#

So tell me if i got this senario right: Client sends inputs to server + stores them + use them to move locally, server gets them and sends back tick number + position, client receives it, tests if we have the right position, if yes continue + remove inputs up to the same number as the server tick, if not re apply the inputs in the buffer

gleaming prawn
#

If not, apply partial correction directly to position (and keeps the extra error to apply over next ticks smoothed).

#

No matter if correct or not (position for tick), always discard local inputs up to tick

#

They are not useful anynore

#

You only need the local inputs from confirmed tick to last tick (+ the new input for this next local tick)

solar garden
#

sorry to come back to this but if you apply server position what are to inputs doing in the equation ?

gleaming prawn
#

The higher the ping the larger the buffer

#

I think me and emotitron explained this at least twice. Let me give you numbers so you undersyand

#

Local machine simulates with my own input ticks 40, 41, 42 (I keep this in a buffer and the positions)

#

At some point, server receives my input for tick 40... Applies it there, sends down confirmed position for tick 40

#

Let's say that (due to the speed of light, damm, we can't be faster) this confirmation (for tick 40 position) arrives on my client exactly after I have predicted tick 42 for the first time (as stated above)

#

My client checks position for tick 40 if it matched the confirmed one... If yes, I just discard my local input for tick 40, as it is not needed anymore

#

If it doesn match, I replace position for tick 40... But I CAN NOT render this confirmed position, because it is "in the past"

#

I then reuse the local input buffer 41 and 43 (re running the player movement logic for those 2 ticks).. this will move my character to the present time + the correction

#

Then, finally.... It's probably time to simulate yet another new tick (43)

#

New inout is polled from local controller, simulation runs.. input 43 appended to local buffer...

#

Loop forever... Profit

#

That's it, I don't know how to explain bettwr

#

There are small variations of how to smooth these corrections in (the way I described the corrections would look jaggy)

#

But this is it in a nutshell...

#

@graceful zephyr did I say any obvious bs?

#

Notice the local input buffer necessary is directly proportional to your full ping to server + the server buffer (if it has one)

solar garden
#

This lit some part i didn't know i have just an other question, if you feed all pooled inputs to your movement script in one single frame won't your player shoot out ?

gleaming prawn
#

So I described with you keeping 3 ticks. At 60hz this is equivalent of a super nice 50ms real ping (including processing)

#

Shoot out?

#

You don't pass all at once

#

You call your movement logic once per input... One at a time

#

With the fixed delta time every time... So if you are moving with a KCC query, it will move smoothly over surfaces, etc

solar garden
#

ah i thought you add dthem together

gleaming prawn
#

Nop, this doesn't make sense

#

Input is not a vector

#

Might be just digital directions, for example

#

You reapply your input logic, that might include jumping, etc

#

Input is a struct, with maybe a vector, maybe buttons pressed, etc

#

There no "definition" for "adding" a complex inout struct

#

These input buffers can be quite long....

#

At 60hz and 200ms ping, you are talking about at least 12/14 ticks

#

Think of CS running at 120hz...

solar garden
#

this i understand 😄

gleaming prawn
#

200ms ping would imply in at least 24 input structs in the buffer

#

Notice this is so complex that many times you only use it for stuff like movement

#

Because you don't need to reinstantiate a bullet... You either confirm it was shot (and then it becomes a networked entity on its own), or you cancel it (remove the rendered entity)

#

This is so complex it hurts my eyes on the special cases... Lol

#

Gosh bless predict rollback determinism...:)

solar garden
#

yeah and we didn't even discus the demo feature 😄

#

where bullets and projectiles can be rewinded

gleaming prawn
#

Not touching on how to transfer data efficiently... How to smooth the data for non local players, etc

#

Bullets and projectiles are normal entities after instantiated... They use the very same logic...

#

Just that they don't need an input buffer (just the direction anyway)

solar garden
#

but if they die it means they'll be re instantiated when you rewind ?

gleaming prawn
#

What I mentioned was about the very tick where the projectile is created (the logic of resimulating the trigger)

solar garden
#

ahh ok

gleaming prawn
#

No, they become separate entities, remember that

#

If that is necessary, lol

#

Many times it is NOT

#

You use the local bullet just for rendering (you just delete in case of cancellation), including predicted shot hit... Particles

#

Then server only confirms or not the damage (and here we go again...)

#

Damage logic, hit checks is another soap opera

solar garden
#

yeah i tried out cs with lag + loss and bullets are indeed shot in local

gleaming prawn
#

Done with lag compensated raycasts, the famous favor the shooter mechanic

#

This I again recommend watching the overwatch "let's talk netcode" video

solar garden
#

yeah will do thanks for your time @gleaming prawn this was interresting

tepid steppe
#

I'm looking to develop a game using Unity, I want to make an online action turn based rpg style game and I'm wondering if nodejs using restful api and tcp websockets would be alright for the back end?

I know there's BaaS out there, but I feel like it would be easier to shape out if I build my own backend and have full control over the database and relations.

gleaming prawn
#

Turn based, I've made something like this about 10 years ago over Google app engine at the time.

#

I fear doing directly over the backend for every turn might be dangerous, because rest + dB is not really made for instant response etc... It really depends ontm the game pace

#

We tend to offer now solutions that work on a game server keeping the game state as a memory transaction model there...and you push to the back end periodically, or even only at the end game.

#

But it really depends on the game pace, and the scale you think you'll need

weak plinth
#

is there an time estimate on unity's "new" network solution?

graceful zephyr
#

Its technically out

gleaming prawn
#

If it's really really slow paced and a movement confirmation can take a couple of seconds, then fine

graceful zephyr
#

On package manager @weak plinth

weak plinth
#

as in complete or untested bits and pieces ?

graceful zephyr
#

The latter

weak plinth
#

ty @graceful zephyr 🙂

tepid steppe
#

For turns I would use sockets rather than rest

gleaming prawn
#

Notice you need two way communication from backend to all players (like some websockets or notification system)

#

Yes, that makes sense then... But I would also not make every turn a dB transaction

#

I'd put the game model in memory and save asynchronously

tepid steppe
#

Yeah for sure

jade glacier
#

I just keep user inputs on the same size ring buffers, so I don't bother discarding

tepid steppe
#

Database would just be where it gets the user characters info initially, as well as enemy info

jade glacier
#

But same outcome

gleaming prawn
#

As for nodejs, whatever... If that's what you are best at... I fear it is way too barebones and a lot of reinventing wheels... But it's whatever you are more comfortable with.

#

Makes sense then WL

#

Tô me at least

tepid steppe
#

I don't mind using a different language if node wouldn't be efficient

graceful zephyr
#

C# on both ends, means you can share code

tepid steppe
#

What do you think would need to be reinvented?

graceful zephyr
#

Between server and client

tepid steppe
#

That's true

graceful zephyr
#

Less to write, less bugs

gleaming prawn
#

Net standard for the model

#

So you can run a net core backend, and unity uses the net standard model as well

#

No code duplication... Also decouples simulation model from unity, normally a good practice

tepid steppe
#

I was thinking of using Net Core as well

gleaming prawn
#

Imho it would be a better choice for the reasons exposed by Fredrik

tepid steppe
#

Thanks for your input, that's probably the route I'll go then

#

I'm worried nodejs being single threaded might be a pitfall anyways if there are a lot of interactions happening at the same time

#

which wouldn't be an issue unless there were a lot of players

hallow comet
#

@tepid steppe a lot of those BaaS solutions are hyperscalable, you won't be able to even come close to that.. Why would you reinvent the wheel?

#

The best BaaS for games are developed and maintained by pretty big companies. What's your experience by the way? Do you require only a subset of the functionality?

tepid steppe
#

I think because I already have clear idea of how I want my game to be and what it needs, and I feel a BaaS might have more than what I need or can't cater specifically to how I want it perform

#

But I might be looking at it the wrong way because I haven't actually played around with a BaaS yet, only read what they have to offer

#

I have a couple years experience in full stack web development, as for game development I've only made a couple small rpgs with vb6 awhile back

hallow comet
#

Playfab, GameSparks and the others are really powerful. If you don't want to waste your time or start your own BaaS provider, don't..

#

Yes you can make it do anything, especially something like GameSparks. And even if you have a corner case, just extend it in AWS, they play well together.

tepid steppe
#

Alright I'll experiment with some BaaS

hallow comet
#

Thank god :))

tepid steppe
#

Saving time is a good thing haha

hallow comet
#

Playfab is easier, but not as flexible / powerful as GameSparks. Just take a look at it's website. If that isn't enough and you have time on your hands, go with GameSparks. I don't have much experience with the others but really using any of those services is a big win. Are you a game developer or a middleware / services provider? The answer to that question will make things obvious.

#

Also, if this is your first game, make a single player. If not, go multiplayer. If you already did that, go multiplayer with backend. And at each stage, actually ship it (as in you sale it on Steam / consoles / etc). This is a common advice everywhere, by the way.

tepid steppe
#

Thanks for your advice

hallow comet
#

You're welcome ✌

rare crypt
#

is that official now ? just noticed a massive change in the repo

weak plinth
#

is there any other network systems like photon PUN so i dont need to care about NAT?

jade glacier
#

I suspect there are some other basic relay services like PUN, but not aware of them

steep pendant
#

so, as someone completely new to working with multiplayer in Unity, what framework/resources would you recommend?

graceful zephyr
#

@rare crypt yes you can get them on the package manager now

#

the new networking

#

but its early early early

#

like... early.

#

proper early

#

0.0.1-alpha-preview-only-for-testing early

rare crypt
#

@graceful zephyr hmmm... true that, i think ill still give it a shot and keep checking for updates, so once its gonna mature like good wine, ill be ready to drink that delicious net code.

fickle sleet
#

@graceful zephyr 👋

graceful zephyr
#

lol

#

'ye 'ol fucker

#

hey

#

😄

fickle sleet
#

whadup duder

graceful zephyr
#

not much

#

trying to get youngest kiddo to sleep

#

and getting sick

#

lol

#

you? 😄

fickle sleet
#

kid-less this weekend

graceful zephyr
#

ah

fickle sleet
#

so i'm writing a FPS-character controller thing for funsies

graceful zephyr
#

so furious self gratification marathon?

#

😄

fickle sleet
#

oh yes

#

plus i just realized grimes is elon musks gf

graceful zephyr
#

think he fially

#

fell asleep

#

finally

fickle sleet
#

that dude gets it all xD

graceful zephyr
#

thank god

fickle sleet
#

gz

white apex
#

yay got the new netcode up and running

#

i hope unity uses some doors and triggers in their upcoming sample because I've no idea what's the proper way

#

right now i went for a predicted ghost for the door

#

where i'm still having trouble is with different objects for the same ghost type. seems like there's no pipeline for this at all. like different platforms for movers or different characters for predicted character ghosts. the only way to change it would be in DefaultGhostSpawnSystem in the netcode

stray scroll
#

Yeah, the way I did it on the previous version was to use an ID synced to spawn locally with a system.

solar garden
#

I have a question: when there is a state desync we reapply the inputs we have in the buffer but do we snap back the player to the desynced state and the apply the inputs ? and if you apply them once per update won't this mean that the player won't have control of the player until the input of the buffer are applied or do you separate the render and do this on a hidden object for the player ?

graceful zephyr
#

@solar garden you snap, and reapply all inputs

#

That are after the frame that desynced

solar garden
#

ok and i do this on the render player ?

weak plinth
#

Hi! I've been looking to learn a bit of multiplayer and googling around has me a bit confused. Where should I start to give my html5 games some human interaction?

jade glacier
#

@solar garden for monobehavior/non ECS I create a second lightweight physics scene and do limited resins there, then copy the results of the object in question back

#

On the DOTS side that will play out differently, since things are all moving forward with stateless physics

solar garden
#

when you say physics scene you mean a "level.scene" scene ?

jade glacier
#

2018.3 and later let you make isolated physx scenes

#

And manually run . Simulate on them

#

You can do work on the main scene for resim, but you have to be more careful there

solar garden
#

so you use this scene to simulate the player and if the render player is too off you snap it to the one of the physics scene ?

jade glacier
#

You put into that scene things you consider important to the resim

#

The player, relevent terrain, intractables, whatever is applicable to you

#

OR, use the main sim... Just the you have to rewind everything

#

A small scratch pass sim let's you make you resim a lot more lightweight

#

But totally depends on what your game is, and what needs to be in the resim

solar garden
#

all this is for the server side ?

jade glacier
#

Either, depends what you are resimming

#

On the client for missed predictions

#

On the server for rewinding shots

#

For rewind checks, it's not so much a resim... Since you don't simulate forward after rewinding

#

Have you read the stuff on how csgo works? And the overwatch videos?

solar garden
#

i've seen the valve doc for css but i didn't saw this kind of physics thing

#

But they don't use this kind of hermite physics scene system right ?

#

essentially this physics scene thing is to kind of hide the raw processing in the background while the render players are walking freely until they are corrected right ?

jade glacier
#

Not sure of the details of how they run rewind. More just making sure you are aware of the different uses for rewind and resim

#

The second scene is not a thread

#

There is no 'background processing' for this, since all work on the next frame can't happen until after the resim

solar garden
#

oh yeah i didn't ment background as separated thread i meant like its invisible

jade glacier
#

The second scene is just about making a smaller physics scratch pad

#

It isn't a critical thing, it's just my preference for work on older unity

#

This assumes you are using physx at all for your sim

solar garden
#

Ah i wanted to switch to havok when it gets out

#

but can't you do this in the normal scene ?

#

without all this fancy physics scene system

#

when you mention the stuff off csgo and overwatch was the links i sent what you were referring to ?