#archived-networking

1 messages ยท Page 108 of 1

uneven egret
#

I understand it now

wraith monolith
#

i dont understand what you mean still but as long as you understand it that's all that matters ๐Ÿ™‚

uneven egret
#

@wraith monolith sorry my english is not good

wraith monolith
#

what do you mean by "decentralized game"?

#

what is a "dynamic page"? a page whose content changes over time? if so, why would that cause timeouts...?

uneven egret
#

@wraith monolith trying to build a play-to-earn game. The page gets constructed by javascript, so it takes some time to load. webcrawlers like google time out on such pages, but no problem, got a rest solution thanks to github

#

so i got a blockchain wallet, made with qml and use a webengineview to run webgl build in unity. Works. now I want to try to let the char try to chop a wood block and make it sent a coin to its wallet address

wraith monolith
#

where does unity come in? the google crawler isn't going to make any sense of a untiy canvas

uneven egret
#

the webrequest just times out and returns a 404

#

new to unity

wraith monolith
#

that has nothing to do with unity though

uneven egret
#

doing the request from within unity

wraith monolith
#

sorry, what is the page you're trying to load?

uneven egret
#

block explorer page made with insight api

wraith monolith
#

is this like a JSON endpoint?

#

and you need to access that data from inside the unity player?

uneven egret
#

now it is ๐Ÿ˜„

#

I exposed its REST/api it works

#

now to pump the return data into a json thing

cedar cloak
#

Using WebGL how can I retrieve a data from the browser using a key?

silk helm
#

Hey guys, is there a good tutorial on mmr matchmaking with photon?

weak plinth
prime salmon
#

What is the recommended networking method for self-hosted local LAN games? (host/join button that spawns a "server" and "client" both running on peer devices in the same local network)

#

i checked out photon but it requires a login and you cant selfhost in the free version

#

is there any other one i should check out?

olive vessel
#

Mirror or MLAPI (Netcode for GameObjects)

uncut urchin
#

Hi, I am planning to add Online Multi Player To my Game, Should I use MLAPI. If not what should I use? I heard about Photon but I am not sure about how well it works.

#

and also I heard that MLAPI is experimental

uncut urchin
#

Bump

olive vessel
#

Photon PUN, MLAPI, Mirror. All good choices, Photon PUN does more of the heavy lifting for you I'd say

uncut urchin
#

Thank you.

granite yew
#

So I made a multiplayer game with photon unity networking and I made an among us-like kill system. How do I make it that the player is declared dead to all clients? (The player dissapears for now when killed but I also want a pop-up to show to tell u that u died) how can I do this? thanks.

fierce niche
granite yew
#

ty

fierce niche
#

np if you have any questions feel free to come back here

granite yew
#

Can I play a murder animation on top of this?

fierce niche
#

ya jsut make sure you use a PhotonAnimatorView

granite yew
#

ok

#

Also how do I make it so only traitors can kill?

#

AKA the impostors

#

u press F to kill

fierce niche
#

well your getting back into non network logic, just find tutorials for what you wanna do and remember that everything needs to be instanced or destroyed using photon and must have the photonview component. beyond that everything else you need to get the game working should be fairly straight forward. if you dont know how to set up photonview stuff i recomend blackthornprods tutorial its very simple

granite yew
#

alright ty

sinful flare
#
public bool isImposter;

void Update() {
    if (//Check Input) {
      //Do checks and call the kill function.
    }
}

void Kill() {
  if (!isImposter) {return; //Do this on the server to stop cheaters from setting themselves to an imposter and killing everyone}
  // Do kill stuff
}
granite yew
#

ty

#

wait the killing still doesnt spread throught the clients

#

I may did it wrong

sinful flare
#

i'd learn about Remote Procedure Calls

granite yew
#
 void Die()
    {
        PhotonNetwork.Destroy();
    }

sinful flare
#

if you want to handle a load of stuff after the player is killed; you need to call an RPC after the server has dealt with the death

granite yew
#

I do have a photon view

fierce niche
sinful flare
fierce niche
#

thats local

sinful flare
#

I'm not sure exactly how Photon does their sequence of events but generally:


void Update() {
  if (Input.GetMouseButton(0)) {
    ServerMouseDown();
  }
}

// This needs to be turned into a server only function
void ServerMouseDown() {
  RpcMouseDown();
}

// This needs to be turned into a client only function
void RpcMouseDown() { 
  // Some stuff
}
#

@granite yew ^

#

Rpc should only be used if there is stuff you need to specifically do on Clients.

#

Server Commands are used to stop players from cheating their variables

granite yew
#

so I just add a [RPC] on top of it?

sinful flare
#

So when you set someone to an imposter; the server should hold the variable as to whether they're an imposter or not; to stop a non-imposter player from just turning themselves into an imposter and murdering everyone else

fierce niche
#

if you havnt used photon why are ytou trying to help??

#

i dont wanna waste my time on this but I wouldnt listen to this guy

sinful flare
#

its important that all variables that you use that you don't want the player to cheat are assigned to only in server commands and not in client RPCs

#

@fierce niche I've been making a Multiplayer game for the last 3 months. The concepts are all transferable

#

If you don't know that concepts are transferable, why are you trying to help?

granite yew
#

HEY plz dont argue

sinful flare
#

If Photon uses the [RPC] tag to handle Remote Procedures, then yes

#

use the [RPC] tag

fierce niche
sinful flare
#

that documentation doesn't handle Yoshi's issue at all.

#

It just deletes the player from all clients

fierce niche
sinful flare
#

they want to turn the dead players into Ghosts

fierce niche
#

ok im getting trolled lol

granite yew
#

agreed

sinful flare
#

It's a Forum post, that just discusses how to use Network.Destroy()?

#

You want to turn the player into a Ghost? @granite yew

granite yew
#

Yeah

sinful flare
#

Yeah, don't listen to Tracy.

#

Destroying the object; when it's assigned to a player with authority; will completely bodge any controls.

#

The owner of a PhotonView (which I assume from like, 10 seconds of just looking at the doc; is the thing that syncs the instance on the server?) has Authority.

#

If you Destroy it, there is no longer anything for the player to control.

granite yew
#

Can I just instantiate a new ghost player prefab?

sinful flare
#

Seeing as i've not used Photon; I use Mirror; then can you quickly tell me how you assign the "Player prefab" to the Photon script?

#

You can send a screen shot here so I can see it; just want to know that what i know about Mirror is the same as what Photon uses in concept.

#

for example, Mirror here uses a "Player prefab" slot built in to the component

fierce niche
#

photon uses messages for everything

#

you just give it strings

sinful flare
#

my Player Prefab is just a generalised Prefab, with no specific "State" inside of it. @granite yew

#

The code dynamically instantiates a "state" as a child object inside of the Prefab

#

So you would have Photon instantiate a "Stateless" player prefab; then when the player is spawned and set to be alive; instantiate an alive Prefab as a Child of the main prefab with

Instantiate(child, parent)

(obviously altered to your liking)

#

then when they die,

Destroy(child.gameObject)
Instantiate(ghost, parent)
#

you'd use the ghost/child as a motor, and then move the parent using functions

child.cs

void Movement() {
  // Assuming you're using transforms
  parent.Move(1.0f, 0.0f)
}

parent.cs

void Move(float x, float y) {
  transform.Translate(1.0f,0.0f)
}
granite yew
#
   public void KillAnimation()
    {
        if (Playa != null)
        {
           Playa.GetComponent<Play>().Die();
        }
        else
        {
           
        }
    }

 void Die()
    {
        PhotonNetwork.Destroy(Playa);
    }
#

Here is my code

sinful flare
#

that will just Destroy the Playa (gameObject?, I can't see the type declaration)

#

it won't spawn a Ghost

#

Where is this code? In the player?

granite yew
#

Yes

sinful flare
#

you don't need to get the component of the script you're calling it in.

Is that script called Play.cs?

#

or is the Die function in a different script?

#

To put this very simply:

If you want something to be destroyed for all people; use PhotonNetwork.Destroy()

If you want something to be destroyed locally; use Destroy() and an RPC

#

the upside to the top one (Network) is that it is destroyed on all clients without the need for an RPC

#

but the upside to the bottom one is that you don't have to destroy the main player Object, allowing you to instantiate a ghost inside of it, and then get rid of the alive child

#

I believe you can still destroy the Alive Child with PhotonNetwork.Destroy

#

and then use an RPC call to spawn the Ghost

granite yew
#

The Play script and the die function are in the same script

sinful flare
#

then you don't need to use playa.getcomponent

#

you can just call Die

#

unless you're trying to kill another player

granite yew
#

I am

sinful flare
#

ah, okay\

#

and what assigns the Playa function?

granite yew
#

Playa is the player who you are targeting (sorry that I didnt respond earlier I was doing something) @sinful flare

weak plinth
#

Hello... I am having troubles to enter store.

Can anyone please send me PUN 2 free edition so that I can download it?

#

it doesnt matter if Google Drive or something like that

#

I don't want to rush you, but I have a client waiting for me and I need it as soon as possible, so if some of you guys can send me that I will be thank to you

agile spade
#

soooo MLAPI was a big waste of my week

#

dont use it guys

#

doesnt work with websockets or webgl in general

#

and it doesnt use proper object authority for more complicated linux VPS. It ran great on unity, then I thought I did something wrong then, googled it and found mod staff reports like,

#

@olive vessel

#

So eah, MLAPI is kinda hot garbage. and dont get hyped into using it

#

its far from ready for any mid-large scale projects and isnt even supported for github testing via webgl

#

Thanks again unity dev team for making another useless feature that cant even do anything thats needed of it for the scale that it "needs" to be used for.

#

I sware everytime unity doesnt just out-right BUY someone elses product, they make their own sandwiches without bread.

spring crane
#

@agile spade Unity MLAPI is still marked as being experimental, so the expectations might be a bit high here.

agile spade
agile spade
agile spade
spring crane
#

As a WebGL developer I would also like to think WebGL support has this level of importance, but I don't think that is really the case. Also worth noting that Unity moderators are generally just people from the community, so take suggestions and opinions with that in mind.

#

@agile spade Do you have links to threads where Unity MLAPI was recommended?

gleaming prawn
#

Danny, you're super active here, so let me give you some light on a few reasons why WebGL sometimes does not get the same level of "support".

#

Of course I can only speak for us (photon), not other companies, but here are my two cents.

#

We do not (yet) support WebGL in a couple of products (namely fusion and quantum) because they are designed around native memory operations (long story short that's the only way to do what they do with the performance level necessary), and these were not even well supported by browsers until recently (there are long discussions on browser sandbox forums about providing a high performance version for memcpy, for example)

#

This has come a looong way since then, and looks like all necessary operations are now exposed with decent performance on all major browsers, and unity webGL builds do give access to them.

#

Because of this, we're constantly re-evaluating actually fully supporting webGL builds (in quantum and fusion, as photon realtime and PUN already support them). Not YET done, but we're scheduled to try again soon...

#

So it's not that we do not WANT or do not give enough attention. Hopefully it will change soon (for those two products).

#

The other source of concern is WebSockets... They are TCP, which is far from ideal for high performance multiplayer (which is the main focus of quantum and fusion).

#

So, unfortunately, WebGL is not the most straightforward platform to support (as you perceive "externally"). It does impose a lot of restrictions for us tool and engine developers.

#

@spring crane just my two cents... Hopefully things will keep evolving positively.

prime salmon
#

@gleaming prawn what Photon product would you recommend for local LAN only? (different devices, someone is host, others are peers, ..)

gleaming prawn
#

All of our products are for online, and involve connecting to our clouds...

#

But both bolt and fusion try to connect directly to the Unity instance that is the server (if using client server mode on fusion)

#

so technically the connection will be fast/local

#

but we do not have products for Offline/LAN only....
Although we expect to ALLOW this (without direct connection to cloud) for fusion soon...

#

But notice that LAN only is the exceptional extra feature, and that the actual product is for online

#

but technically the best product for you game should not depend on this, bug actually on the Gameplay

prime salmon
#

okay, so photon might not be the correct solution for my goal then ๐Ÿค”

gleaming prawn
#

It's the gameplay that normally dictates which kind of networking you need

#

like, RTSs require determinism, shooters basically require tick-accurate state transfer + snapshot interpolation + lag compensation, etc

spring crane
#

Yea browsers definitely have their own challenges that people should be aware of. In that comment I was primarily trying to counter the implication that the product is not successful unless browser platform is supported.

gleaming prawn
#

You mean yours?

spring crane
#

object authority and multiple scene layor syncing etc might not be in the scope of 50-80% of unity game devs but, the websocket and webgl thing definitely is.

gleaming prawn
#

There are many categories where that is true, I agree (that browser support is important) like audio/video conferencing, etc

gleaming prawn
spring crane
#

Exactly.

gleaming prawn
#

So I may not agree 100% (to that particular statement)...:)

#

but you have a valid point on being super important. Agreed

prime salmon
#

what would the networking reqs for an action-based co-op game?

gleaming prawn
#

Action like what? Like an action RPG?

prime salmon
#

yes

#

Midwintรคr catches you at Khazar's Pass.You shelter in a cave as the days and nights grow long and cold,as the snow seals you in and as the world darkens.Midwintรคr is a narrative-driven stealth action game inspired by medieval horror folklore that combines careful tactical planning with fast-paced arcade execution and innovative gossip mechanics....

Release Date

Coming soon

โ–ถ Play video
#

maybe steam page might give better info ๐Ÿค”

gleaming prawn
#

is this your game? or an example?

prime salmon
#

my game

verbal lodge
# agile spade Thanks again unity dev team for making another useless feature that cant even do...

Did you see this page? We are stating pretty clearly on our docs site what we do not support WebGL and even have community driven workarounds for how to make WebGL work with MLAPI. https://docs-multiplayer.unity3d.com/docs/develop/getting-started/about-mlapi

Being disappointed in something is completely fine but it's hard for me to digest information for how to improve out of your feedback. If you could provide us with more constructive feedback so that we can improve we'd really appreciate that.

gleaming prawn
# prime salmon my game

looks super nice...
From our products, both Quantum and Fusion would fit well... Specially fusion could give you the probably required interest management etc.

#

But you mention there you have online and lan MP already, so you probably already have a lot of things implemented using a certain approach.

#

Which may impact any different decision.

#

But you super welcome to try out fusion, or send us an email if you have more questions, etc. You can PM me in that case.

granite yew
#

Hi. I asked this yesterday but I didnt got any good help. My among us inspired kill system is not working nor spreading throught the clients. How can I fix this?

agile spade
#

For one, https://www.youtube.com/watch?v=RwKkJNc8UcQ mirror has 0 issue ignoring object authority until I activate a online scene.. MLAPI threw tantrums over it. Just saying, mlapi shouldnt even be a discussion (yet). Give it a good 8 months until you guys drop it like everything else. xD (sorry that was maybe a bit too heat towards you but, still funny to me)

small test for the mmorpg I'm making, connecting to my temporary AWS server, connecting to mirror transport, and logging in and authenticating with PlayFab.

โ–ถ Play video
granite yew
#

I am using photon btw

agile spade
agile spade
agile spade
#

should be that simple.

#

not sure how you programmed that though.

gleaming prawn
#

photon you mean PUN?

granite yew
#

no

#

photon unity networking

gleaming prawn
#

photon is the company name

#

pun then

granite yew
#

ah

granite yew
gleaming prawn
#

Sorry, I can't help much with PUN

granite yew
#

its ok

agile spade
#

umm i dont see a network animation attached

granite yew
#

I removed that animation

#

dont worry about it

agile spade
#

also, whos listening to the Input.GetKeyDown?

granite yew
#

wait what?

agile spade
#

if (Input.GetKeyDown(KeyCode.F))
{ is a unity solution

granite yew
#

so how must i change it?

agile spade
#

do you have a #IF UNITY_ENGINE at the top of your class?

#

also, do you have photon script syncs enabled in you player settings?

granite yew
#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI
agile spade
granite yew
#

no?

#

but how do I do that?

agile spade
#

[PunRPC]

agile spade
#

there you go buddy

#

now, im gonna watch netflix, cause i just spent 14 hours programming and making 3d assets for my MMORPG. lol i need a break before I do ubereats for food money tomorrow and sunday. lol

granite yew
#

ok

agile spade
#

you can add me tho if you want.

gleaming prawn
#

@granite yew you can also join photons public discord

granite yew
#

yeah

glossy widget
#

hey! I have a problem that appeared for some reason and I can't fix with PUN.
Basically when I use "tranform view classic" if I put Lerp for example, the other player keeps lerping back and forth, from zero to the new position... it used to work fine but now it just doesn't..

sterile inlet
#

why this? ๐Ÿ˜‚

olive vessel
#

You need the Photon.Realtime namespace I think

sterile inlet
#

im using it

#

JoinLobby(); works fine

#

Can't no one help :(

glossy widget
#

I'm just using Photon.Pun; and it works

sterile inlet
#

I'm using both an it doesn't work

#

But only Create Room doesn't work

#

If I do RoomOptions = new RoomOptions ()...

#

It works

weak plinth
#

I only need you to send me PUN 2 free version so that I can drag it into Unity. It can be via Google Drive if you want.

olive vessel
#

It's literally on the Asset Store

#

Then you add it via Package Manager

weak plinth
#

I cannot access asset store I have trobles.

Can you please send me the package?

olive vessel
#

I personally cannot, you will have to find someone who will

weak plinth
#

ok, I will wait, thank you

full light
#

whats the easiest framework to set up small scale stuff

granite yew
#

Small question: How can I set a GameObject variable to a player that ur touching? Thanks

regal delta
agile spade
#

so, will this work for one an individual player?
like, one thing i always get confused about with multiplayer is how to single out local players with objects that arent already associated with a local player.
i want to nest this networkmigrator to the player panel. and unnest it in the players base. so, that way the network manager doesnt throw errors when I'm trying to move a player around in their base without server authority.
but obviously i just want this to nest/unnest on the local machine.
i think im in the right direction but, since i have little experience with this shit. i could be waayyy off.

#

btw, the void start doesnt do anything (yet) which, im aware of. im just putting it there as a "logic holder" so, you see the way my brains thinking i should grab the panel in scene.

#

lik, idk if it will get a hit with EVERY player panel with the 100 people on a scene at one time or not.

#

or just the tag on the local machine. don't know. lol

#

btw, im using mirror

agile spade
#

is this better?

agile spade
#

think i did it with [TargetRpc]

#

but, not i gotta start an "autoServer" aka a port-port auto cnonect until i get enough patrons to get the paid version of a VWS

cloud nebula
#

How can i make variable same for every player with Photon?

sterile inlet
#

Hey, how can I
gameObject.SetActive(false);
for everyone ?

Its not Syncing if I want do deactivate a GameObject, im using Photon btw

sterile inlet
#

And how do I pass GameObjects with RPC?

spring crane
#

PUN does this with the PhotonView component, which has a viewID attached to it

spring crane
agile spade
golden plume
agile spade
#

its funny, gamemaker support websocket but, unity doesn't. i just do not understand why unity is so behind in somethings..

#

making users download your game is not as easy as getting them to click a game.io link

jolly wadi
#

Can someone help me explain in steam Networking why SteamMatchmaking.LeaveLobby((CSteamID)current_lobbyID); Doesn't actually leave the lobby? ๐Ÿค”

acoustic python
#

Has anyone use polarith ai with mirror networking? I can't seem to get it to work together. My Ai works fine without any mirror component.

timid compass
#

Hey, does anyone know what is the common practice for networking a game in unity 2019.3 ? i wanted to use MLAPI but its not supported. and Unet isnt going to work anymore either

olive vessel
#

You could try Mirror, it might work

timid compass
#

Is mirror reliable? im working on a fighting game so i want to keep frame delay as tight as possible

olive vessel
#

I would say it's more reliable than MLAPI

timid compass
#

it may also be worth noting were planning on putting this game on steam

#

will that change anything?

olive vessel
#

Mirror has a Steam transport if you wanted to use Steam matchmaking

timid compass
#

Alright thank you! i appreciate the help

spring crane
#

@timid compass Something like Photon Quantum would probably be more appropriate than average state transfer networking solutions like MLAPI or Mirror. Fighting game networking is a pretty specific case when it comes to networking.

agile spade
#

i made a netbutton that, listened for on authority, and runs a client publiv void to bring the client to their base. scene.

#

obviously, it turns inactive on run.

#

but, it uses network info. and should have a network Id(i think)

#

but, either way, id like the answer on how to save a network object to the scene so it automatically loads.

odd kite
#

I'm new at photon

#

um this is about photon I don't know

#

I want it too random healthBox in list

#

and RPC to everyone

#

but I cannot get HealthBoxScript

#

why

fathom light
#

Im using unitywebrequesttexture.gettexture(uri). But it seem it mentioned it success &isdone but data i got is null.

I even tested on webbrowser with the uri and it show correct picture .

Any idea on how can i debug this issue?

fathom light
#

Hmm, seem like need dispose webrequest when done using it. The issue are happening when requesting multiple times.

Not my original code, helping debugging stuff

agile spade
#

what is it with programming boards being so worthless? you ask a question. no one answrs or they pick out dumb shit in the context while avoid the main fucking point

olive vessel
#

I'm not gonna lie to you, I don't really like you, and I can't share my exact thoughts on you without being warned.
I find it unbelievable that you thought it acceptable to continue pinging me despite the fact we haven't spoken in days, and that you thought it acceptable to ping a moderator, and that you thought it acceptable to slate MLAPI, and demand support for a deprecated package.
Perhaps you should leave the server, and make your own game engine, so that it can have all the lovely features you demand, I'm sure you'll make a mint with it!

#

You don't get to ask your question here, because UNet is, and has been deprecated for 2 years. Go and find another solution that is supported.

weak plinth
#

hello I have a question, which is better Photon BOLT or PUN
on the website I see Bolt is better but I also hear that PUN is very important
anyone who has more info on the subject??

modern drift
#

took 5 seconds to google

gleaming prawn
weak plinth
gleaming prawn
#

just check photon's Docs website

#

Fusion has been released in beta a few months ago, we're about to publish a sample on the asset store (already authorized). This same sample/demo is available from our website already

weak plinth
#

thank you, I will check it out...
I was planning on waiting for the asset store to be released cause I am afraid my game will be bugged due to fusion.... especially that the game's networking is completely FINISHED using PUN

gleaming prawn
#

Fusion is the replacement of both PUN and Bolt, which are legacy products already in maintenance mode (receiving only bug fixes)

gleaming prawn
#

PUN will still be supported with bug fixes...

#

I suggested because you asked if PUN or Bolt...

#

Neither is the answer... If you were considering moving to Bolt (which is also totally different than PUN), you should consider Fusion instead

weak plinth
gleaming prawn
#

But being an almost done game, I would not suggest this blindly... You should evaluate if it's worth for you.

#

Basically depends on the features you need, etc.

gleaming prawn
weak plinth
#

is there a tutorial on fusion that I can read

gleaming prawn
#

If you consider changing, change to Fusion

olive vessel
#

Where is the pricing for Fusion?

gleaming prawn
#

there's the Fusion 101

gleaming prawn
#

Not on the website yet, I think

weak plinth
#

I never tried an SDK

gleaming prawn
olive vessel
#

Hm, weird not to put the pricing on the site but ok

gleaming prawn
#

the link to these videos are also on our Discord, fusion channel, pinned messages

weak plinth
gleaming prawn
#

The princing is public

weak plinth
#

@gleaming prawn thank you a lot this is really helpful

olive vessel
#

Just a little box with it in on the introductory page would have been mightily useful

#

Could even put a disclaimer saying that it could change before launch

gleaming prawn
#

we don't plan to change the announced prices.

gleaming prawn
#

We're not hiding anything, as it's been publicly shared

olive vessel
#

Believe me I am interested in Fusion, I just don't want another Discord server in my list

gleaming prawn
#

Makes sense... It's just that this channel here is too small for so many different solutions

#

It's totally optional, but there's a growing community of people using fusion, with a pretty big momentum already in place

#

I'm fine answering any question here, sure

#

But there's a lot more technically rich stuff being discussed there, etc.

weak plinth
#

is there a fusion discord server?
and are there any tips moving from PUN to Fusion?

gleaming prawn
#

it's a very high-level summarized guide, not a step by step one, as there are some important differences

#

I can't share a link to the Discord server here (as it's against the community rules), but feel free to PM me and request the link if you are interested.

weak plinth
#

i was about to release a demo to the game on thursday ... I am gonna release it with FUSION!

weak plinth
#

I want to build a dedicated server for like 100max Player, following a Tutorial from Tom Weilland and want to host it for free, any suggestions?

olive vessel
#

Free hosting seems like an oxymoron

gleaming prawn
#

want to host it for free
That is the difficult part

weak plinth
#

what is the cheapest solution then?

gleaming prawn
#

you want 100 players, do you want a high-quality, high tick rate solution? or just the cheapest ones?

#

The cheapest ones are mirror and mlapi

#

but I can't attest they will run 100 connections at high tick rate.

#

You need to check that with other devs

#

Maybe you don't need high tick rate

weak plinth
#

I don't know if I need a high tick rate, it's like a Star Wars Squadrons VR clone. And I know Mirror and MLAPI are using ports that players need to port forward and a lot of players won't be doing it.

gleaming prawn
#

well, you said you wanted to HOST the servers

#

If you are ok with some players also acting as the server, you can try photon fusion (no need to port forward). But that is NOT free. So I'm actually not trying to "suggest"...:)

#

the only free options (for the netcode part) will be those (mlapi, mirror) and a few others around (that may not be super popular - I'm not aware of them)

#

But that does not include any connectivity options that will reliably work over the internet....

#

Honestly, you want to build an online game, most likely you need to pay (someone has to pay for servers, bandwidth, etc).
One option is to use Steam networking - or Epic game services (but those are not netcode frameworks, just transport layers). So they won't solve your 100 player question either...

weak plinth
#

Alright I will look into it, Thanks for your help ๐Ÿ™‚

shut yarrow
#

@jade glacier just want to say thanks for the tip about interpolation you gave me about 1 year ago. I haven't been working on my server for quite some time, but we had some talk about why my movement was jittery and you brought to light the flaw in my approach. I was only setting position on 0.1 second intervals (as soon as I received a packet update) instead of constantly running interpolation in the update method between the current position and the newly received position. I've completed rewrote my networkingsystem and with your suggestion I managed to get it to work ๐Ÿ‘

feral oak
#

Anyone here any good with Photon?

verbal lodge
indigo thicket
#

Hey guys, do you know about any tutorials about MLAPI for a survival multiplayer? I know how to set basic connections, but I have no clue on how to set multiple scene management (one per client) or how to handle huge worlds with chunks for each client.... And seems like google has no answers ๐Ÿ˜ฆ

naive niche
#

If a UnityWebRequest exposes 'downloadProgress' why doesn't it expose the download size somewhere? if they have access to the percentage, they should have access to the file size right?

#

or did i miss a property somewhere

cerulean crescent
#

Is there a way I can specify and change which clients have access to a specific NetworkVariable ?

#

(MLAPI)

cerulean crescent
#

I've tried using the ReadPermissionCallback like this

    NetworkVariableBool gunBool = new NetworkVariableBool(new NetworkVariableSettings { ReadPermission = NetworkVariablePermission.Custom, ReadPermissionCallback = NetworkViewManager.CheckReadPermission }, false);
#

The issue with this is that the method checking for read permission has to be static, so I have no clue to which Client (player) the NetworkVariable belongs to in the check itself

#

Or maybe Object Visibility is a better way to do this, as I assume if a player is hidden it won't be receiving the network traffic

#

?

topaz roost
#

Hello is there a good tutorials about tcp, kcp, udp and all network transport,relays?

jolly wadi
#

In this first part of my C# networking tutorial series, we set up a TCP connection between a dedicated server and a Unity client.
If you get stuck or have questions, ask them on my Discord server: https://tomweiland.net/discord

Kevin Kaymak's channel: https://www.youtube.com/channel/UCThwyD-sY4PwFm7EM89shhQ
List of commonly used ports: https://...

โ–ถ Play video
#

thats episode 1 but go inside and it goes to like episode 14 i think not sure if this is what u want but it is good

jolly wadi
haughty osprey
#

does anyone know why my mirror network manager isn't showing up in DontDestroyOnLoad when i press play?

spring crane
#

Is it present in the scene you are starting in?

haughty osprey
#

yes

#

oh wait

#

found the issue

mellow void
#

Hey I wanted to ask if its possible for someone to help me with something incredibly important..
People are stealing my friends gumroad packages and I wanted to do a script that opens a window stopping anyone from going into the project and then asks for a special license that gumroad gives you and checks if its a valid license

modern drift
#

i mean this isnt really networking related

#

but you can do that but thats a whole project not just one problem

indigo thicket
#

Hey! I tried to install MLAPI with git installed, in the package manager, pasting the link found in the documentation but..

#

it gets me this error

#
  • Starting ILPostProcessorRunner
    ILPostProcessorRunner caught the following exception while processing arguments:
#

And I have no clue on how to fix it: the only forum post that I found with this error says to install git, or install the package from the link in the package manager, or adding the link in the manifest.json file, and I've done everything but it still doesn't work

cedar cloak
#

Can I ask help regarding Photon PUN?
Is there a way to manually call the roomlistupdate to get an updated list on open rooms?
Also the server behaviour seems pretty inconsistent, now I'm testing with 3 players and the server only detects 1...

olive vessel
indigo thicket
#

It's full of directories paths, almost all finish with Mono.Cecil.dll

#

The first are:

#

ILPostProcessorRunner caught the following exception while processing arguments:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'. General Exception (0x80131500)
Could not load file or assembly 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'. General Exception (0x80131500)
Could not load file or assembly 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'. General Exception (0x80131500)
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at ILPostProcessorRunner.<>c.<ProcessArgs>b__7_7(Assembly asm)
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at ILPostProcessorRunner.ProcessArgs(String[] args)
System.IO.FileLoadException: Could not load file or assembly 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'. General Exception (0x80131500)
File name: 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e'
---> ILPostProcessorErrorException: Could not find assembly file for assembly named 'Mono.Cecil'.
Tried the following paths:
Library/Bee/artifacts/1900b0aE.dag\Mono.Cecil.dll
C:/Program Files/2021.2.0a15/Editor/Data/Managed\Mono.Cecil.dll
C:/Program Files/2021.2.0a15/Editor/Data/Managed/UnityEngine\Mono.Cecil.dll
C:/Program Files/2021.2.0a15/Editor/Data/NetStandard/compat/2.0.0/shims/netfx\Mono.Cecil.dll

#

And it's about 8x this big

verbal lodge
indigo thicket
#

Oh, yeah, my name cointains a space and a '... Thanks!

feral oak
#

@cedar cloak I just started on Photon as well, but my guess would be to create a button and connect roomlistupdate to that button so when you press it, it will update.

#

Does anyone here know where I'd find how to create like a pregame lobby in Photon, for example.. Among Us before they click start because they're waiting on more people or Phasmophobia where you join a lobby and can talk before starting. I can do it with all text but I was wanting to spawn them into a level together as they joined before actually starting the game

versed yew
#

uh youre using photon?
id put all the players in a room with basic movement and crap and when the games ready (i guess when the host pushes a start button or something) call an rpc via the server to all the players that starts the actual game

#

uh have a ping @feral oak

drowsy schooner
#

anyone have any thoughts why my objects movement is slower in editor than a server build. Im using Mirror for my networking. Below is a code snippet from my movement code and the difference Im seeing in movement speed.

    {
        if (_IsInitialized && isServer)
        {
            UpdateFrame();
            
        }
    }
    
        [Server]
    public void UpdateFrame()
    {
        if (_Initialized)
        {
            Transform goal = _WaypointProgressTracker.target;
         Vector3 vectorToTarget = goal.position - transform.position;
         float angle = Mathf.Atan2(vectorToTarget.y, vectorToTarget.x) * Mathf.Rad2Deg;
         Quaternion q = Quaternion.AngleAxis(angle, Vector3.forward);
         transform.rotation = Quaternion.Slerp(transform.rotation, q, Time.fixedDeltaTime * rotationSpeed + speed);
         transform.Translate(speed, 0, 0);
        }

    }```
#

Editor Server -> Editor Client

#

Server Build -> Editor Client

weak plinth
#

Any tutorials on how can I communicate data from a game to another game?

jolly wadi
weak plinth
jolly wadi
#

Hmm

weak plinth
jolly wadi
#

I don't but i know where ur getting at

#

Why does everything have to go to the andrid build?

weak plinth
#

I guess it's possible to have a common data base but I dunno if that's efficient

jolly wadi
#

Why not host the info somewhere else or somin?

weak plinth
#

Because I wanna have the minimap and chat on mobile

jolly wadi
#

ok

#

Would this be like stats?

weak plinth
#

Maybe too

jolly wadi
#

hmm

#

Ive never really experienced something like this

jolly wadi
#

Like a central system where one can set and the other can get info?

weak plinth
#

Doesn't sound that secure tho

jolly wadi
#

Tru

jolly wadi
weak plinth
#

It doesn't need to have flaws if you know how to code and protect your project

jolly wadi
#

yeah

cedar cloak
jolly wadi
#

it does

#

public override void OnRoomListUpdate(List<RoomInfo> room)

cedar cloak
#

Doesnt the OnRoomListUpdate gets only called in response to photon and so cant be manually called?

jolly wadi
#

If you want help with the RoomInfo calling manually it shouldn't be too hard

#

Basically

#

Just store a list like

#

List<RoomInfo> room;

#

then add the room to that list in the override methos

#

with

#

room.Add(room);

#

then you can reference all the rooms and their info whenever you want

#

But

#

This wont help with updating the rooms in which you will need the callback

cedar cloak
#

Wait what room should I add?

jolly wadi
#

You don't need to add a room

#

?

cedar cloak
#

I need to gets updated on EVERY room available, for now I refresh by just disconnecting and reconnecting to photon

#

But this thing is inconsistent

jolly wadi
#

what

#

I told you a viable solution

#

You can add the rooms to a list which you can reference from anywhere

cedar cloak
#

Can you please make an example method on how could I do that?

#

Cause for now I'm still struggling to understand, I get it that I need to get new rooms but how I get them updated?

weak plinth
#

And they told you how to do it if you pay attention

cedar cloak
#

Ive already tried to manually calling it but its not working

weak plinth
#

Define not working

#

Any errors?

cedar cloak
#

And docs dont have a description for this kind of issue

weak plinth
#

Docs don't need to have a description for your issues

#

Docs tell you what's possible and what's not

cedar cloak
#

then seems like its not

#

PhotonNetwork.GetRoomList() is gone. You get rooms list and updates from ILobbyCallbacks.OnRoomListUpdate(List<RoomInfo> roomList) callback.

#

and the callback is only called by the server interactions so doesnt depend on the client

jolly wadi
#

That is not for Pun

#

that must be for REaltime

cedar cloak
#

...

jolly wadi
#

hmm i've never used that in my life

#

but it is probs that same as
public override void OnRoomListUpdate(List<RoomInfo> rooms)

spring crane
#

You are probably remembering PUN1

jolly wadi
#

Really

#

nah

#

it is in pun2

#
    {
        UpdateCachedRoomList(roomList);
    }```
#

thats a snippet from the doc

spring crane
#

Though you can also inherit from MonoBehaviourPunCallbacks instead of using the interfaces

jolly wadi
#

Yeah

#

That would make more sense in my opinion

#

but idk what works for u

cedar cloak
#

another very bad inconsistency I'm getting is that photon is not refreshing its playercount or other server infos in a reliable way

jolly wadi
#

it should update properly tbh

cedar cloak
#

I just logged with 3 different builds and the PhotonNetwork.CountOfPlayers was most of the time 1 (sometimes even 0)

jolly wadi
#

In your current room?

cedar cloak
#

connected to the master server

jolly wadi
#

Yes but you have to be in a room to call that right?

#

Oh wait

#

i understand

cedar cloak
#

you just have to be connected to photon

jolly wadi
#

nvm

#

yeah

gleaming prawn
#

@cedar cloak what is that you are trying to do?

cedar cloak
#

its the global playercount

gleaming prawn
#

I'm from Photon

#

AFAIK we don't expose the global player count from the client API

gleaming prawn
#

Do we @stiff ridge

#

?

#

So maybe I'm wrong...

#

You said it's returning 0 to you

#

and you test with several clients on the same region, right?

cedar cloak
#

yes

#

and in other tests the SAME thing worked

gleaming prawn
#

I'll ask here if you need to be connected to the Master when you perform this query

cedar cloak
#

so thats why Im becoming crazy

gleaming prawn
#

I'll ask here

#

give me a few minutes

cedar cloak
#

my condition is PhotonNetwork.IsConnectedAndReady

#

sure take your time

#
    {
        if (PhotonNetwork.IsConnectedAndReady)
        {
            connectionStatus.text = "STATUS: ONLINE";

            nickname.text = "NAME: " + PhotonNetwork.NickName;

            roomCount.text = "ROOMS: " + PhotonNetwork.CountOfRooms;
            playerCount.text = "PLAYERS: " + PhotonNetwork.CountOfPlayers;
        }
        else
        {
            connectionStatus.text = "STATUS: OFFLINE";

            nickname.text = "ID: /";
            roomCount.text = "ROOMS: /";
            playerCount.text = "PLAYERS: /";
        }
    }``` this is what I call on my little debug panel just to understood what are the info received
#

and sometimes I get status online but playercount 0

gleaming prawn
#

I mean, you have 3 servers you may be connected to:

  • nameserver (initial handshake, authentication)
  • master server (matchmaking, create/join rooms)
  • game server (when in a room)
#

I'm asking here in which of these you can query that info...

jolly wadi
#

You can only get it on Master

#

tobi said right here

gleaming prawn
#

to be clear I do not work with PUN much (I work with Quantum and Fusion).

gleaming prawn
weak plinth
#

I use modified mlapi UnityChanClever

cedar cloak
#

Indeed I call it outside of a room

#

and as I said this behaviour just worked with the same code, but some time its not

#

same for the roomcount

spring crane
#

You sure you are actually landing on the same region and room?

jolly wadi
#

Yes

#

Make sure the fixed region is set

cedar cloak
#

I use eu as fixed region

#

plus were testing with really near connections

jolly wadi
#

have the values ever been correct?

#

Cause if they fluctuate thats a different story

#

But if they never that doesn't seem like a Photon thing to happen

#

tbh

cedar cloak
jolly wadi
#

Also there is a delay i think on this

cedar cloak
#

On my previous project the issue was there but was a lot less frequent

#

as far as I understood its called every 5s

jolly wadi
#

In my opinion i have never faced this problem ๐Ÿ™‚

gleaming prawn
#

ye, I confirmed again with Tobias (and suggested him to make the inline doc to be more clear). Make sure you are connected to the MASTER server when you perform that query

#

If you are in the name server, it will give 0... same for when you are in the master

gleaming prawn
#

name

#

as I said above, there are three servers

jolly wadi
#

no like the last thin

jolly wadi
gleaming prawn
#

so that query only works while connected to 2 (master server)

jolly wadi
#

oh

#

ok

#

make sense

gleaming prawn
#

does not work when you are in name server neither in game server (room)

jolly wadi
#

Yep

#

Btw since you have worked with Quantum would you reccommend it over Fusion? ๐Ÿ™‚

#

Cause i believe fusion is a rising project with lots of potential

cedar cloak
#

it is connected to master when I get the roomlist info

jolly wadi
#

but currently it is in developement

jolly wadi
cedar cloak
#

and when I do refresh

jolly wadi
#

I would not disconnect then reconnect

#

that is a bad way to do so

#

as i said

#

Store a list of roomInfo probably then work of that then use the callback to update that list ๐Ÿ™‚ that way it is easily accessaible while staying up to date ๐Ÿ™‚

cedar cloak
#

Debug.Log(PhotonNetwork.Server == ServerConnection.MasterServer); this return true everyframe but I still didnt get the right server info

jolly wadi
#

Nah it is ok i read your message

#

in the Photon server ๐Ÿ™‚

gleaming prawn
#

Both Quantum and Fusion are high end netcode solutions... I personally do not recommand one OVER the other... It's more of a decision based on these two aspects:

  • gameplay (certain genres basically push for Fusion, like FPS, TPS, etc - while others push for Quantum like RTS, Brawlers, Fighting, Tower Defenses, etc)
  • your team (Quantum's ECS is actually a game engine that fully decouples simulation from view, which is a great way to keep the code super clean and organized, but you need to check if your team enjoys working with it - most do; Fusion is Unity-land)
#

I think this one is complimentary to that one.

jolly wadi
#

I think Fusion is the way to go

#

For me personally

gleaming prawn
#

sure

jolly wadi
#

Also very cool projects on your youtube

#

love watching them

gleaming prawn
#

Btw, I stream every Wed and Fri about Quantum.

jolly wadi
#

Oh nice what do you stream on ?

gleaming prawn
#

And I recently started a new project, and the first stream was this:

  • single player wave-simulation + boat physics
  • ported to Fusion
  • ported to Quantum
  • all on the same project
  • playtests all against each other, and showed the code, comparing the differences, etc...
devout whale
#

what is the cap for mlapi?

gleaming prawn
#

it will probably be deleted soon by Twitch...

jolly wadi
#

Why would twitch delete it

gleaming prawn
#

this is the full description of the stream:

Coding an online multiplayer boat game using efficient water simulation and buoyancy:

- start with basic single player prototype (bare Unity, no extra assets).
- port to multiplayer using two different approaches: determinism (Photon Quantum) and state transfer (Photon Fusion).
- playtest and compare all three versions.
- continue development of multiplayer mechanics (probably with Quantum).

Other topics:

- periodic multi-wave sampling as water simulation.
- vertex-shaders for efficient rendering.
- spring damper physics for buoyancy.
- surface drag physics for keel, rudder and hull.

Note: the goal is to create fun and engaging mechanics with efficiency techniques. No focus will be given to accurate water simulation.
jolly wadi
#

it is useful to society unlike some things on twitch tbh

gleaming prawn
#

ty

devout whale
#

what is the limit of mlapi?

jolly wadi
#

Im not too sure tbh

gleaming prawn
#

Sorry, I do not work with mlapi... Someone from the Unity team will answer.

devout whale
#

ok

#

got it

cedar cloak
#
    {
        roomList = p_list;

        UpdateRoomList(p_list);

        base.OnRoomListUpdate(p_list);
    }

private void UpdateRoomList(List<RoomInfo> roomInfoList)
    {
        Debug.Log("UPDATING ROOM LIST");

        roomcount = 0;

        foreach (RoomInfo roomInfo in roomInfoList)
        {
            Debug.Log("ROOM FOUND: " + roomInfo.Name);

            roomcount++;
        }

        Debug.Log("ROOMS AVAIALBLE: " + roomcount);
    }``` I tried this but it still gives me 0
weak plinth
#

Please don't ask in 2 channels

wind hinge
#

why can I join a game, then leave it but when I try to join another game after that, I get an error.

spring crane
#

What error? What networking framework are you using?

wind hinge
#
PhotonView ID duplicate found: 999. New: View 999 on RoomManager (scene) old: View 999 on RoomManager (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.
#

thats the error

#

im using photon

spring crane
#

Do you end up with multiple RoomManagers?

wind hinge
#

when I leave the game, my RoomManager gets removed, I only have one in the game

spring crane
#

How is it getting removed?

wind hinge
#

idk

#

its just not there when the scene is switched

spring crane
#

PUN seems to disagree

#

You sure it isn't marked as DontDestroyOnLoad?

wind hinge
#
InvalidOperationException: Duplicate key 999

i also get this error

spring crane
#

It probably isn't getting destroyed if it is marked as such

wind hinge
#

it is marked as that

spring crane
#

Since you know, don't destroy

jolly wadi
#

You have to destroy it

wind hinge
#

but its not there when i switch scene

jolly wadi
#

it will thrwo the error

#

if you do not destroy the object

#

as there is a previous trace

#

say i do this

spring crane
#

Did you check the don't destroy scene?

jolly wadi
#

Menu>Game>Menu the second time i go to menu there must have been a ROOM Manager the (Old Instance)

wind hinge
spring crane
#

Things marked with that are moved to a special scene

#

You can view it like any other scene at runtime

wind hinge
#

i always have a roomManager until I leave a game. i have it before and in the game but not after

#

i dont understand

spring crane
#

Hierarchy shows you all the scenes loaded with their contents

#

If something is marked with DontDestroyOnLoad, it will be moved to a scene called that to avoid being destroyed with the scene

wind hinge
#

ok

#

but how do i fix the errors

#

the room manager has a script on it

#
 public static roomManager Instance;
    void Awake()
    {
        
        if(Instance)
        {
            Destroy(gameObject);
            return;
        }
        DontDestroyOnLoad(this.gameObject);
        Instance = this;

    }
#

@spring crane

#

@jolly wadi

jolly wadi
#

Just destroy the singleton on leacing

#

you have an name for the objet

#

so when moving back to the old scene make a coroutine giving enough time to destroy the singleton then go back

#

something like

#

Destroy(roomManager.Instance.gameObject);

indigo thicket
#

Hey, what's the best way to handle hundreds of projectiles? I want my 2d multiplayer to have physical projectiles and not raycasts, but giving each one a network transform component seems a bit... overkill

#

Should I send an RPC by each client that is shooting with the data of the projectile, and then spawn each projectile locally in the client?

jolly wadi
#

Photon?

#

Or Mirror

feral oak
weak plinth
feral oak
#

You said you were trying to store data?

#

Itโ€™s a solution that can be a little more secure also, and you can grab the information from the database and place it in your game via code

weak plinth
#

Giving me an online database provider is not answering my question, but thanks UnityChanwow

weak plinth
weak plinth
#

what

#

yes thats efficient what are you reading lol

#

why would two databases be more efficient

#

Do you have billions of players

opal finch
#

Has anyone used any of the steam relay transports with MLAPI? I've just checked out the various community versions but can't get them to work well:

  • ImprovedSteamTransport -> can create host and client, very very laggy, loads of exceptions about unknown messages. Disconnect doesn't seem to get propagated.
  • FacepunchTransport -> can create host, client gets "Invalid Connection"
#

Without diving in to the errors, I'm just interested if anyone is using them successfully right now

feral oak
# weak plinth Efficiency???

I skimmed through and from what I saw you need a database.. I also didnโ€™t know you had a database, so maybe telling us what you have would lead to better help? You should 100% be using your database to store and get the information.. thatโ€™s what theyโ€™re for.

weak plinth
feral oak
#

I mean I doubt you need it that often? But unless youโ€™re reading and writing a ton of data I feel like it would be fine.. thatโ€™s what theyโ€™re for lol

weak plinth
#

I need it every 5 secs xD

feral oak
#

Why?

weak plinth
#

Real Time data

#

I think I should make an api and that talks with the db

#

It's the only solution I can think of

feral oak
#

Well then make an api

cerulean crescent
#

As the particle system can be used to create a wide variety of different guns in an interactive way

#

Not sure if this will work optimally yet. As the client you sent an RPC when you press and let go of the mouse button which toggles the particle system on both client and server

opal finch
#

@weak plinth look up n-tier architecture

weak plinth
#

You have to put all data into a query

opal finch
#

It's not slow no, but if performance is critical there are other ways you can build it

#

For instance, you could have a hosted app that keeps all the data in memory. If the app goes down you lose the data though.

cerulean crescent
weak plinth
#

It takes all data from game then queries it untill its able to store it while the dB is not being read so it might get some lag in game while storing data

weak plinth
cerulean crescent
#

Datastore that works as fast as cache

#

As it lives in RAM

opal finch
#

redis isn't a bad idea, it also has pub/sub etc

weak plinth
#

I prefer having data on my own server

cerulean crescent
#

Redis is something you'd launch a server instance of

#

And communicate through an endpoint

#

Like a normal relational database

#

Or you can use it locally on one machine and communicate through it with multiple applications

#

It'll perform better than a relational database in speed

#

However, you usually don't use it to store persistent data, as once it is turned off the data is gone

weak plinth
#

It's too much data to be hold into ram and cache :(

opal finch
#

Redis supports persistence

cerulean crescent
#

It does, but I'd suggest storing persistence data in a regular database like postgres etc, and then load it into redis at launch for the real time communication

opal finch
#

@cerulean crescent what's the benefit of that? you're just adding extra steps to achieve the same thing

cerulean crescent
opal finch
#

Ok sure, I'm just considering the realtime requirement ๐Ÿ™‚

cerulean crescent
#

Yeah if all the data should be read and written in real time then I don't see why redis persistence mode shouldn't be used

opal finch
#

I guess we need to know the problem in more detail though

cerulean crescent
#

But I feel like that is usually not the case

#

Yeah I agree, the scope of the problem isn't really all that clear

opal finch
#

I worked on a project where we stuffed everything in Redis instead of spitting stuff out in to appropriate databases, so definitely agree with your point.

#

I guess we are talking about CQRS really

cerulean crescent
#

Though it was mentioned that it would be done as "frequently as 5 seconds" or did I misunderstand that

#

Because that's not really that frequent in terms of read and write conflicts goes

cerulean crescent
unkempt thunder
#

How can your mmos dataset not fit in ram... there isn't a game out there that isn't storing game state in memory. Either way the db tech you use should be abstracted away by your 'db server' that's handling any additional logic like locking a char etc. Your game server shouldnt be speaking directly to the db

opal finch
#

@weak plinth can you to try to specify your problem more clearly?

  1. What are the types of clients? (e.g. game, mobile app, webpage)
  2. What data do the clients send? (type, size, frequency etc)
  3. What data do the clients receive back?
  4. How many clients are connected?
  5. Does the data need to be persisted? If so, what data?
weak plinth
# opal finch <@456226577798135808> can you to try to specify your problem more clearly? 1. Wh...

The only aim in Rust is to survive. Everything wants you to die - the islandโ€™s wildlife and other inhabitants, the environment, other survivors. Do whatever it takes to last another night.Rust is in its 8th year and has now had over 300 content updates, with a guaranteed content patch every month. From regular balance fixes and improvements to A...

Price

$93.49

Recommendations

542099

Metacritic

69

โ–ถ Play video

The official Rust companion app from Facepunch Studios.

#

Game and mobile app

#

They need to communicate

#

Player position real time ( a lil delay ofc)

#

Server status

#

Game chat

#

Events

#

Etc stuffs I store in db

#

It is possible and it's not hard, but I wanna do it as efficient as possible

#

Without corrupting the database

cerulean crescent
#

Any reason you don't want to use the networking solutions such as MLAPI, Photon PUN or Mirror etc?

weak plinth
#

How does that help me?

opal finch
#

Have you written any 'server' apps before? e.g. a socket or rest endpoint?

weak plinth
#

Yes

cerulean crescent
opal finch
#

Here's what I recommend:

  1. Create a 'server' app
  2. Don't bother with a database for now, just store the data in memory
  3. Implement the various APIS (e.g. GET players, PUT position)
  4. Test it out with your clients
  5. Implement the databases on the backend later
weak plinth
#

I do use mlapi for networking

opal finch
#

The in memory solution will be blazing fast, but wouldn't be resilient. But adding in a database later is easier (and standard practice)

weak plinth
#

How can I communicate player position to an apk without database

opal finch
#

What kind of endpoints have you written before?

weak plinth
#

Wdym, what sort of apis I made?

opal finch
#

For sockets: you have an app running, listening for socket connections, then you write data back/forth over that connection. You have to handle the data serialization yourself.
For rest: you set up some HTTP endpoints e.g. https://yourserver.com/api/players - and then use GET/PUT etc requests just like a web browser does

weak plinth
#

Yeah I did say that I'm planning to make an api to communicate to game

opal finch
#

But you haven't got experience with either yet?

weak plinth
#

Only theoretical knowledge

cerulean crescent
#

I just get the image that you want to communicate the live data (game traffic) though a database, but maybe I've misunderstood as you say you're using MLAPI

opal finch
#

OK, you'll have quite a bit to learn but it is possible

weak plinth
cerulean crescent
#

Postgres handles concurrency to great degrees

opal finch
#

Database is a red herring here, it's not the right solution

#

Redis would work because it also implements a few protocols on top

#

But you don't want all your clients connecting directly to a database

cerulean crescent
#

Yeah communicating game traffic through a database seems quite unorthodox

opal finch
#

@weak plinth do you want to write this in C#? Or are you familiar with other languages?

cerulean crescent
#

And inefficient

opal finch
#

@cerulean crescent I don't think it's the game traffic. I think they want to use MLAPI for the normal networked game stuff, plus a second channel to share data with a server + other apps.

opal finch
#

And do you want to host it yourself or run something in the cloud?

weak plinth
#

I have a server computer

opal finch
#

OK cool

#

So I guess you want to pick whatever stack you are most comfortable with. Personally I'd use ASP.NET (because it's C#) but you might want to use node js

#

I would try setting up something simple to send data to, query data from first

#

If you haven't done that before, it's a little project in itself

#

When they send the data, you can just keep it in memory somewhere, then query it when they request data

#

Once you've got all that working, then you might look at persistence etc.

feral oak
#

Iโ€™ll ask again since it seems more people are here. Iโ€™m using Photon for networking and I want players to join a scene after the master creates the room. Essentially a Phasmophobia type pre game lobby before the game starts where you can all walk around and ready up before starting.

I know how to change the scene for all but canโ€™t quite figure out how to get players individually joining a scene but syncing together

#

Sorry if Iโ€™m not explaining well

#

Among us is another example where the players spawn into a scene as they join and once the master says start they all change to the new scene

odd kite
#

How can I set object active across network? (Photon PUN)

feral oak
#

I think itโ€™s OnPhotonSerializeView

#

@odd kite

#

Youโ€™d find a lot of solutions on this just by googling that are pretty helpful

odd kite
opal finch
#

๐Ÿ’ฏ for posting the solution once you found it

cerulean crescent
#

(MLAPI 0.1.0)
Is there a way for my client to know whenever another player has been made "Visible" for said client by the server with the Object Visibility API?
I was thinking of using OnBecameVisible, but that is only when an object becomes visible within the camera but I want to know if they're outside of the camera vision as well.

Is there any method to do this as of now, where the client is notified and if not, would be it be reasonable to suggest such a feature? Thanks

weak plinth
#

Hey I got a question when I Change a bool in my SceneManager, for other players the bool doesnt change. how can I fix it?(using Photon)

opal finch
#

Has anyone used the SteamNetworking P2P transport? I'm running a host and client locally and there's extreme lag between the two

silk helm
#

Hey guys, I have an issue with my photon. My region is connected to the same region as everyone else (Canada) and the build versions are all the same but my device specifically cant join a random room.

opal finch
weak plinth
olive vessel
#

Yes, you can be a host, which is yourself being a server and client at the same time

#

But with the Steam transports, you can't use the same PC to have a host and client at the same time, because they use the same Steam ID

opal finch
#
  1. I was starting host in one instance (so it logins in to steam, then starts host on steam relay)
  2. Then starting client (logs in with same steam id, then sends connect to relay)
    But you send messages to a steam id, and because both host and client have the same steam id, it gets delivered to one... so for instance when the host replies, the message gets delivered back to itself
#

I'm going to test it works on different PCs, and if it does, just use a non-relay transport for local testing

timid compass
#

Is there anyone familiar with rollback netcode that could help me get started on implementation? (i fully understand rollback and lockstep and how they work)

I can also pay per hour, mostly looking for a mentor

jolly wadi
gleaming prawn
#

His implementation is not the predict rollback I believe heโ€™s asking for here

#

If I understood right, the question was for GGPo style rollbacks,

#

I am one of the devs of photon quantum, which is like that on steroids. I did not say anything because heโ€™s asking for mentorship, not a productโ€ฆ:)

#

Tom Weilland does not teach everything he implemented with his state transfer, he barely touches the surface of the complex topics

#

Itโ€™s a nice channel and content, but very far from being a complete source for whoโ€™s starting (it has some ideas good for intermediate level developers though)

wise stratus
#

Hello everyone). Maybe someone fumbles well straight for different multiplayer implementations and can help with advice? I myself personally have only a very basic idea of โ€‹โ€‹it, and now I have an idea to make a 2D game, where it will be with 99% probability - only 1vs1 battles, but there will be a lot of other objects, maybe hundreds (of course, I can clients to count according to the same formulas, but then there is a huge risk of catching this data by a smart person, changing it (in general, cheating)). And I do not want to have p2p for sure, at least for the top reason, well, and the fact that then the connection will depend on the main host, well, it will have a big advantage, which should not be in my idea at all. So, I suppose, all I have to do is use a server that will handle a bunch of small "rooms", if I can call them that in my context. And that's why I look towards MLAPI (it doesn't matter to me at all that it is only developing there. The main thing is that it gives what I need and that's it) or DarkRift2 (noticed somewhere and how it understood it is the lowest-level one (but that does not mean that. I need to write everything from scratch) compared to all other implementations, but if it gives more control over the situation, then it's for the better). I donโ€™t want to use a photon or a mirror from the principle. I don't want to use it 100%. Maybe someone can tell their opinion)? Of course, in theory, I can make my own multiplayer, but for sure it's too long, especially when this word "multiplayer" brings boredom on the part of me as a developer. Well, itโ€™s right at the lowest level of reel, Iโ€™ll get tired of working with him, huh).

Before that, I just thought that I would write everything on DOTS, but the project tiny (and only on it you can write 2D games on DOTS) is so incredibly experimental that it's rave... And then was only one choice of multiplayer from Unity herself (DOTS-Netcode).

spring crane
#

Curious to know what principle Mirror is violating considering the overlap between Mirror, MLAPI and DarkRift. PUN is understandable considering that you are not looking for "p2p" and are looking for authority or some other from of security. Sounds like one of the high end Photon products could be a good fit there.
Unity Tiny has supported 3D games for a long time (check out their showcase projects), but Unity ECS is in a pretty unknown state when it comes to what is and will be available in the near term. There technically is at least one thirdparty networking solution from vis2k (primary author of Mirror) called DOTSNET.

wise stratus
crude mural
#

Looks like people here have got experience with Mirror? Currently following Brackey's UNet Multiplayer FPS Tutorial (as it's deprecated I'm doing it with Mirror) - but I'm getting a Null Reference:

NullReferenceException: Object reference not set to an instance of an object
PlayerShoot.Update () (at Assets/Scripts/PlayerShoot.cs:32)

It only happens when the second player is added. It looks like I'm not getting an object reference to the second player's 'CurrentWeapon' .. but it's got through script not in inspector and works when only one player is connected .. so not sure where I'm going wrong!

Here is my PlayerShoot Script: https://www.codepile.net/pile/BNWvbZRM
Here is my WeaponManager Script: https://www.codepile.net/pile/d3orgj1D
Here is my PlayerWeapon Script: https://www.codepile.net/pile/L8m56W8J

Thanks in advance!

gray pond
gray pond
cerulean crescent
# wise stratus Hello everyone). Maybe someone fumbles well straight for different multiplayer i...

If you use MLAPI, the Object Visibility API could be useful if you want to put multiple players into the same server, but separating them to only communicate and see each other (1-on-1). However, this is only visibility of what clients see, so your server will still have all the players in the same scene. But since you're making a 2d game, you could even divide physics (collisions etc) so that they all act on their own Z position. That way each 1-on-1 pair won't interact with each other, and will only also be rendered on the clients correctly

fathom light
#

guys, what would be the best way to use webrequest and able to abort it?
I think the code im helping debugging using 1 variable that i assume got override by another webrequest

another method is to use "using ", so that it properly dispose after connection complete
but iirc the code was using it at beginning, but was removed because cant be aborted

anyone have tips?

#

also, the problem i had earlier still happening randomly
it will get a picture from online server
the webrequest said it "isDone", but the data is empty / null
but if i get the via browser, its fine
uri / address is correct

late swallow
#

I have a saving system where the data gets saved for players and the world

#

the world save is saved only on the host's pc

#

when a client joins

#

how could I request that data from the host?

#

and also

#

the way I'm saving is a bit weird

#

there's a singleton gameobject in the scene that has a script that sends a command that saves the world data for the host

#

that's all and good

#

but when a new client connects, the singleton doesn't have an instance anymore

#

so, those are my two problems

#

anyone know how to do this?

twilit viper
#

Hi guys, i'm working on simple tcp server/client system. And now i'm going to implement the movement and i want how to deal with smooth movement with sync position between server and clients.
Any know any documentation, reference to see?

wind hinge
#

no

olive vessel
wind hinge
#

How would i make a killcounter. With the script i have it only lets me count deaths as it only gets kills when the player has below or 0 hp and because of that I can only know how many deaths some1 have and not how many kills. pls help

wide girder
#

please don't ping random people.

vast ingot
#

should I use multi threading or select for my server?
I am creating a 2D fighting game with a max of 4 players

late swallow
#

quick question

#
public class ItemSlot
{
    public int itemId;
    public int amount;
    public string scene;
    
    public ItemSlot(int _itemId, int _amount, string _scene)
    {
        itemId = _itemId;
        amount = _amount;
        scene = _scene;
    }

    public static Item Item(int index)
    {
        return ItemDatabase.instance.GetItemWithIndex(index);
    }
    
    public static int Id(Item item)
    {
        return ItemDatabase.instance.GetItemIndex(item);
    }
}```
#

it's saying it doesn't have a default constructor

#

the public static functions are there just so I can access the data in a cleaner way instead of just writing that whole ItemDatabase.instance.GetItemWithIndex(index);

snow orbit
#

default constructor is ItemSlot()

sonic harness
late swallow
#

yeah yeah I fixed it

#

I think

#

I hope-

#

nope

#

still gives me the same error

#

ItemSlot can't be deserialized because it has no default constructor (at ItemSlot)

sonic harness
#

Add a public ItemSlot() { }, otherwise the serializer can't create the instance

late swallow
#

it doesn't work

#

I tried taht

sonic harness
#

It should though

late swallow
#

does it affect it in any way if I have one file for inventory and itemslot?

#

like this?

#

should I separate them into different scripts?

sonic harness
#

It needs to be public

late swallow
#

or do I need to make it public?

snow orbit
#

make it public

late swallow
#

oh ok

#

I see

#

OK NOW IT WORKS

#

:/

#

thank you

snow orbit
#

Constructors always needs to be public, as you almost always create instances of that object from other classes

late swallow
#

ah! I see!

#

thank you!

snow orbit
#

np ๐Ÿ™‚

late swallow
#

^^

late swallow
#

I come back with another problem

#

I'm instantiating an object in a function as a command

#

and then spawn it on the network server

#

if I check for authority

#

it just gives me an error

#

now I'm getting another error-

#

NullReferenceException: Object reference not set to an instance of an object

#
    {
        Debug.Log(GetComponent<NetworkIdentity>().hasAuthority);
        if (!GetComponent<NetworkIdentity>().hasAuthority) return;

        if (PlayerInputController.inputActions.Player.Attack.triggered && Time.time >= nextTimeToConsume)
        {
            CmdConsume();

            nextTimeToConsume = Time.time + consumeCooldown;
        }
    }

    [Command]
    void CmdConsume()
    {
        playerStats.currentHealth += consumableItem.health;
        
        inventoryHolder.RemoveItem(new ItemSlot(ItemSlot.Id(consumableItem), 1, SceneManager.GetActiveScene().name));
    }```
#

this is the code

#

now it has authority

#

but just gives me an error whenever I call CmdConsume()

#

I think it might be the inventory.RemoveItem thing

south palm
#

I'm getting into developing multiplayer games, and I want to buy server space to test the games I make. I already have a webserver and a domain name, but I'm told it would be tricky to run multiplayer with a webserver, and someone suggested I look at the AWS options

#

I'm looking at this one specifically

#

the amazon EC2 T2

#

does anyone know if I can use something like this for multiplayer games?

normal dust
#

Can someone show me using MLAPI how to share an INT from the Host to Clients? I've watched 10+ tutorials and I cannot figure it out. ๐Ÿ˜ฆ (The INT from Host is mapSeedValue that I want given to the Clients so they can generate the same world).

indigo thicket
#

Hey guys, I'd like to do a local object spawn per client triggered by a client event (spawn of a projectile) and I'm trying to use RPCs to do that, and the RPC's parameters are the position and proprieties of the object. I'm using a ServerRpc to call an RPC with the client, but the rpc must be executed by the client, so this ServerRpc just calls a ClientRpc that spawns the objects per-client. Is that the correct method to handle it? It seems a bit... weird, to me, but I'm not experienced enough to find better solutions.

#

Here is a bit of example code that uses a Debug.Log and a string:

#
    void Update()
    {
        if(IsOwner)
        {
            if(Input.GetKeyDown(KeyCode.Q))
            {
                SendMessageServerRpc(number.ToString());
                number++;
            }
        }

    }

    [ServerRpc]
    public void SendMessageServerRpc(string msg)
    {
        SendMessageClientRpc(msg);
    }

    [ClientRpc]
    public void SendMessageClientRpc(string msg)
    {
        Debug.Log(msg);
    }```
indigo thicket
#

It seems to work well

indigo thicket
normal dust
#

@indigo thicket "seed as a parameter", I have to set this though to call it. So a client joins game, they need the mapSeedValue to generate the Hosts world. So I'm confused how to set it to the method as a client. I've managed to build everything so far in the game and its alpha ready btw. so I'm not 100% noob.

indigo thicket
#

A client joins the game and remains in a wait state until the ClientRPC is called, so the client does literally nothing if he never receives the seed. However, when a client connects the host will send a ClientRPC with the seed, and the ClientRPC will be executed by the client with the new seed

#

Once the client has the seed he can begins to spawn things and execute the game as normal

normal dust
#

ok trying to follow along.

indigo thicket
#

I have no clue on how the host handles the new connection event, or how to send a ClientRPC to a single client so I can't help with that, but I'm pretty sure the docs have everything because I was reading them some hours ago

normal dust
#

I'm spawning the player, I call a method to activate player then another method to generate world.

#

So I call a ClientRPC when player joins, give all clients hosts map seed, with the mapSeedValue as a parameter. But I'm calling this from the clients side when they join, so I don't understand how I can set the parameter as the Hosts seed.

#

My brain aint working I guess on this.

indigo thicket
#

A client RPC is called BY the server (or the host, that is both the server and the client) and is executed BY the clients.

#

So a client connects, the host detects it, and calls the SendSeedClientRpc(int seed) function

normal dust
#

NetworkSendRpc() ?

indigo thicket
#

The client(s) will then execute this function

indigo thicket
indigo thicket
#

The host should detect the new connection and call the ClientRpc only for that client

normal dust
#

ok, how does the host call it though when a player connects?

#

I understand everything till that point.

indigo thicket
#

I have no clue, use the docs or internet

#

that seems like an easy problem

normal dust
#

yea, sounds easy right?

indigo thicket
normal dust
#

@indigo thicket thank you

#

I have approval connection, oh.......

#

I understand now

#

I have to do it there. got it!!!! makes sense now
! ๐Ÿ˜„

indigo thicket
#

Well, if it works, no problem

#

I hope it works

normal dust
#

It should work. thank you so much!

jolly wadi
indigo thicket
#

MLAPI

jolly wadi
#

Yeah

indigo thicket
#

Whoops

#

forgot to mention it sorry

jolly wadi
#

The formatting looks to be fine so I would agree with what you have coded there

#

Like I can somewhat understand how it works does it produce positive feedback๐Ÿค”

#

But obviously Iโ€™ve not really used MLAPI ๐Ÿ˜…

indigo thicket
#

Ok so I spawn local projectiles with an rpc call. This should be ok because there will be thousands of them in the scene. However, I've got some problems, that a networkTransform and a NetworkSpawn would fix kinda easy: 1) the projectile's position are not 100% in sync, and 2) if I need to destroy a projectile the server/client has no idea on how to identify each projectile, and giving an id each projectile seems kinda... overkill, maybe. Am I doing everything right? Should I use a networktransform, or should I use an ID on the projectile and check the collision on the client?

#

I'm using MLAPI

#

Checking collision with projectiles on the client should be cool, but checking enemies collision on the client is ..ok?

#

I'm not sure if that works

golden plume
#

does anyone know why i am getting an error with this code ```using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using UnityEngine.SceneManagement;
using System.IO;

namespace a.parkour.fps
{
public class Manager : MonoBehaviourPunCallbacks
{
GameObject player;
PhotonView PV;

    void Awake()
    {
        PV = GetComponent<PhotonView>();
    }

    private void Start()
    {
        if(PV.IsMine)
        {
            Spawn();
        }
    }

    public void Spawn ()
    {
       Transform spawnpoint = SpawnManager.Instance.GetSpawnpoint();
       player = PhotonNetwork.Instantiate(Path.Combine("Resources", "player"), spawnpoint.position, spawnpoint.rotation, 0, new object[] { PV.ViewID });
    }

    public void DisconnectPlayer()
    {
        StartCoroutine(DisconnectAndLoad());
    }

    IEnumerator DisconnectAndLoad()
    {
        PhotonNetwork.Disconnect();
        while (PhotonNetwork.IsConnected)
            yield return null;
        SceneManager.LoadScene(0);
    }
}

}```

#

error:

golden plume
#

wait srry wrong error

jolly wadi
#

Oh I know why

golden plume
golden plume
jolly wadi
#

Ion

#

Ok

#

So no error

golden plume
#

it dosnt spawn player

#

no error but dosnt work

jolly wadi
#

Hmm

#

Can you put a debug when spawning

#

Wait how you fix the old error

golden plume
#
        {
            Debug.Log("spawnning...");
           Transform spawnpoint = SpawnManager.Instance.GetSpawnpoint();
           player = PhotonNetwork.Instantiate(Path.Combine("Resources", "player"), spawnpoint.position, spawnpoint.rotation, 0, new object[] { PV.ViewID });
        }``` dosnt get called
golden plume
jolly wadi
#

Well that means pv isnโ€™t yes

#

Urs

#

And pv is null

#

So it doesnโ€™t even call that

golden plume
#

how do i make it not null?

jolly wadi
#

Do you have a photon view on the object?

#

Also I recommend taking the line you put in awake and putting it on the start of the start function

golden plume
#

ok i fixed it thx

golden plume
jolly wadi
golden plume
jolly wadi
#

hmmm

#

well this is pretty much the same code i implement

#

so i dont see a reason for this too happen tbh

golden plume
#

there is updated code

#

anything wrong with it?

jolly wadi
#

u dont need if PV is null

#

cause it can never be null

golden plume
jolly wadi
#

hmm

#

can you put this in your start method

golden plume
#

what?

jolly wadi
#
{
Debug.Log(player.NickName);
}
golden plume
jolly wadi
#

oh add

#

using Photon.Realtime;

#

at the top

golden plume
#

still no work

jolly wadi
#

ok

#

are you inheriting from MonoBehaviourPunCallbacks ?

golden plume
#

like? public class Manager : MonoBehaviourPunCallbacks

golden plume
#

no errors just only instantiates first player and not second

#

can anyone help?

#

@jolly wadi are you still there?

jolly wadi
golden plume
#

i am too

#

the code seems fine

golden plume
jolly wadi
#

Pls stop pinging me

golden plume
#

ok

#

srry

jolly wadi
#

i will look over the scripts

golden plume
#

thx

jolly wadi
#

wait so you know this original one

#

did that work?

golden plume
#

yes

#

no errors

jolly wadi
#

ok

golden plume
#

but then i edited for multiple spawns

golden plume
#

is there anything wrong with it?

jolly wadi
#

Hey guys. I am using Photon Transform View to sync players spine rotation but it is not syncing. I have added a transform view to its head and that is syncing tho. This is a mixamo character btw. Any help would be appreciated ๐Ÿ™‚

astral gull
#

Hello! May I ask, is it possible to make one photon 24/7 running server which can be turned off for maintenance and updates while saving it's state(players' buildings, stats, levels - it's a really small mmorpg) and on? If so, is it easy or not? Is there a guide for that?

jolly wadi
astral gull
jolly wadi
#

this is possible with photon cloud

#

yeah

astral gull
#

the problem is that all guides that I found describe room-based mp but I want something a little different

jolly wadi
#

hmm

agile spade
#

heeyy whats the mlapi name now?

#

github link is down

olive vessel
#

Netcode for GameObjects

agile spade
#

i know this isnt mirror discord but, anyone know why there manager destroys network id objects n "awak" instead of iterating through an index and updating scene id checks or conn? after 3 weeks had to go back to mlapi cause mirror literally cannot be made for a game using multiple map scenes.

#

mind numbing why anyoe would program a awake function like that

#

setting in a dictionary to look for index(scene) connection id path, and obj would be FINE for scene changes

#

does mlapi plan on dealing with multiple scenes?

#

Library\PackageCache\com.unity.jobs@0.8.0-preview.23\Unity.Jobs\IJobParallelForDefer.cs(77,85): error CS8377: The type 'U' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NativeList<T>'

btw, anyone know why after downloading mlapi the unity.jobs add on is giving this error?

agile spade
#

@stable charm proud of you guys, you added multiscene support it looks like and websocket within 3 weeks of my breakdown last month. thats fast. Question though, can you guys make a video or list on how multiscenes will work? Can you message me one of the devs making mlapi. i have a very clear vision and explaination of my game and how the mechanics will work, i know mlapi is new but, so is my project and id have no issue making my mmorpg a showcse of the mlapi capabilities if you guys were willing to work with me.

#

i have been using unity for single player since 2011

#

but, mlapi is new but, already looks better than photon and mirror now. and thats after just a month after i started my project.

dry egret
#

Hey everyone, do you guys have any recommendations on networking beginner tutorials? I'm not sure which service to use... I need voice chat too so I don't know which ones have it.

olive vessel
#

Doesn't Photon have a voice product?

dry egret
#

Should I start with MLAPI?

olive vessel
#

MLAPI (Netcode for GameObjects) is pretty nice, I find it easier to use than Mirror

#

But I don't believe it has voice capability built in, so you'd have to look for that solution elsewhere

dry egret
#

I see... Thanks!

agile spade
agile spade
agile spade
agile spade
# dry egret Should I start with MLAPI?

but, is waayyy better then mirror. because everything in mlapi can be over-written. mirror has really dumb mechanic they put behind encpasulation blocks and it makes it impossible to do your own logic "especially with multiple scenes etc"

agile spade
golden plume
#

does anyone know how i can make it choose from multiple different spawn points in this manager script? ```using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using UnityEngine.SceneManagement;

namespace a.parkour.fps
{
public class Manager : MonoBehaviourPunCallbacks
{
public string player_prefab;
public Transform spawn_point;

    private void Start()
    {
        Spawn();
    }

    public void Spawn ()
    {
        PhotonNetwork.Instantiate(player_prefab, spawn_point.position, spawn_point.rotation);
    }

    public void DisconnectPlayer()
    {
        StartCoroutine(DisconnectAndLoad());
    }

    IEnumerator DisconnectAndLoad()
    {
        PhotonNetwork.Disconnect();
        while (PhotonNetwork.IsConnected)
            yield return null;
        SceneManager.LoadScene(0);
    }
}

}```

pseudo adder
#

make a array and then use Random.Range

golden plume
#

ok

golden plume
pseudo adder
#

1 sec

#

this is my spawn manager script using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpawnManager : MonoBehaviour
{
public static SpawnManager Instance;

Spawnpoint[] spawnpoints;

void Awake()
{
    Instance = this;
    spawnpoints = GetComponentsInChildren<Spawnpoint>();
}

public Transform GetSpawnpoint()
{
    return spawnpoints[Random.Range(0, spawnpoints.Length)].transform;
}

}

golden plume
#

do i use it?

pseudo adder
#

add it to your other script and make sure the spawn points are the chidren of the spawn manager game object and make sure they have a spawnpoint script

#

or any other component just make sure only the spawn points have it

golden plume
#

so just copy and paste into mine or only certain parts

pseudo adder
#

your script should look like this

golden plume
#

is SpawnPoint another script?

pseudo adder
#

it deleted it