#Multiplayer Game Architecture

1 messages ยท Page 2 of 1

gleaming trellis
#

it has networkbehavior

#

i delete it and replace it later

gleaming trellis
#

error is gone, it seems to be that it was caused by calling network manager in loops while a connection was attempted to be made

#

but the client does not connect still

indigo umbra
#

See that last message there

#

that is proviing to you that the SErver ID is the Owner ID

#

not the Lobby ID

#

so you can take that to them

gleaming trellis
#

i did yeah

#

but it's correct, right?

indigo umbra
#

yes that is correct

gleaming trellis
#

the server ID SHOULD be equal to the lobby owner ID

indigo umbra
#

I just like to show proffs

#

yes

#

you connect to a User not to a Lobby

#

that is what your showing

gleaming trellis
#

yeah so my code (technically our code) is correct

#

but the client is not connecting for one reason or another

indigo umbra
#

yep have to work with them on that

gleaming trellis
#

so question

#

if i call the start client on GameServerSet(LobbyGameServer server)

indigo umbra
#

as far as Steam is concerned assuming both users are legit and not limited then all should connect

gleaming trellis
#

shouldnt i do a check to only run this if ur not the host?

indigo umbra
#

You dont want the host to do that

#

there are several ways to insure the host doesn't do that

gleaming trellis
#

yeah... so i wrote if Network host then return

indigo umbra
#

and the best one is that the host is not in that scene any more

gleaming trellis
#

but they told me to remove it

#
        public void AttemptToConnectClient(ulong hostID)
        {
            if (NetworkManager.Singleton.IsHost)
                return;
            transport.ConnectToSteamID = hostID;
            Debug.Log($"Server ID = {hostID}, Lobby ID = {WorldLobbyManager.instance._lobbyManager.Lobby.SteamId.m_SteamID}, Lobby Owner ID = {WorldLobbyManager.instance._lobbyManager.Lobby.Owner.user.id.m_SteamID}");
            _networkManager.StartClient();
        }```
indigo umbra
#

I usuaklly use Lobby.IsOwner

#

so in yoru case

_lobbyManager.Lobby.IsOwner

gleaming trellis
#

awesome

#

i guess now we wait

gleaming trellis
#

@indigo umbra i installed facepunch transport, to see if the transport is the issue

#

but i got this error Packages\com.heathen.steamworks\Runtime\API.Voice.cs(13,53): error CS0433: The type 'SteamUser' exists in both 'Facepunch.Steamworks.Win64, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'com.rlabrecque.steamworks.net, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

indigo umbra
#

its a completly different wrapper

gleaming trellis
#

i am trying to see if the transporter is the issue

#

because i restarted and connected

#

it worked twice

#

and didnt like 8 times?

indigo umbra
#

if the transport was the issue mate ... EVERYONE would have the issue

gleaming trellis
#

maybe it's my internet?

indigo umbra
#

it has to be something unique to your situation

gleaming trellis
#

or i am missing something

indigo umbra
#

but Facepunhc is not compatable with our kit or Steamworks.NET in general

#

it is its own thing

gleaming trellis
#

i'll read the wrapper documentation

#

from my debugging

#

it seems like the event that tells the client to connect

#

does not always get called

#

it gets called sometimes and not others

#

the one time the connection worked

#

it spawned 2 players (correctly)

#

but i can control the movement of one character

#

and the animations of the other one

#

xd

indigo umbra
#

again your not the only person building games on NGO using that transport

#

so

#

its not fundamentally that transport

gleaming trellis
#

i know

#

its obviously my implementaiton

#

that's wrong

indigo umbra
#

1st rule of programming it is 99.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999% of the time ... Your code ๐Ÿ™‚ that caused the issue

#

course there is that fraction of the time time it is the underlying API

#

but its supper rare

#

you have a better chance of winnign the lotto

#

but ya I cant really help you with NGO

#

I dont use it

#

I dont use Unity much anymore actually

gleaming trellis
#

unreal?

indigo umbra
#

yep

gleaming trellis
#

how hard is it to learn?

indigo umbra
#

internally we use Unreal for all our projects

#

that is a very loaded question ๐Ÿ™‚

gleaming trellis
#

compared to unity

indigo umbra
#

its not apples to apples

#

cant really compare that

#

Unreal is much more structured

#

it is a far more complete engine

#

I would say in general that I would think its easier for indies to build a complete game with

That said I cant really say if its easier to learn or not that really depends on way to many factors to make it a relivent thing to try and say

gleaming trellis
#

i think i am going to make a new blank project, just for lobby + networking

#

and once i get a solid understanding of how it works