suriyun-production / bomber-io-docs

This is document for Bomber IO project (https://www.assetstore.unity3d.com/#!/content/102515?aid=1100lGeN)
https://suriyun-production.github.io/bomber-io-docs/
0 stars 0 forks source link

Big multiplayer connection problem #5

Open MagicRS opened 4 years ago

MagicRS commented 4 years ago

Since recently without having touched a multiplayer configuration or a script etc.. As soon as someone connects to a running session, all the game bugs for them.

I have no idea where this can come from, Photon's configuration is good! The game being online this is very problematic, do you have an idea?

To try the game / problem , game : "BOMBERX" You just have to be a player joining a game.

Thank you in advance!

BUG1

BUG2

insthync commented 4 years ago

I can't find your game, I have some questions

MagicRS commented 4 years ago

image

There are as many bricks as the original card and the number of bot can be from 1 to 9, it doesn't change. I just noticed this problem that was not present during my testing phases.

Errors on the console are as follows: When a person joins the waiting room: image

Errors are constantly on the rise (In Game :) When the player invited to the game, leaves the game, the errors stop rising.

image

image

image

I tried putting the original "gameplay / network and gamedata" scripts, but nothing works. Try with the original (empty) map, problem persists.

insthync commented 4 years ago

Oh, you have to clear transform from bomb entities, powerup entities, character entities, bot entities.

Screenshot_271 Screenshot_272 Screenshot_273

MagicRS commented 4 years ago

The errors target the bricks, so I removed the PhotonView component target from the bricks and the errors are no longer there. How do you explain such a situation all of a sudden?

However, connection bugs / latency with the incoming person persist.

image

insthync commented 4 years ago

Hmm, you don't have to remove PhotonView component from bricks, just remove transfrom from Observe Component setting.

MagicRS commented 4 years ago

Yes, yes, that's what I apologized for. So the mistakes are gone (which is good for the eyes) but the player bug remains. What blocks the multiplayer.

the remaining errors are as follows: 2 First are in waiting room et the last are In-Game steadily increasing image

The error target "UINetwordGameScore.cs" image

Thank you for your help, I hope I won't have to solicit you as much afterwards ^^

insthync commented 4 years ago

Check your score Uis, any of User Rankings must not empty Screenshot_274

MagicRS commented 4 years ago

They are all present in all game modes (and well defined above). image image

This mistake is not a problem in itself, I don't see any consequences.

insthync commented 4 years ago

Hmm, weird, it should not be null, you may add code if (userRanking) at line 35 to avoid null exception.

MagicRS commented 4 years ago

I added the code and it's all good.

When I start a game in offline mode, after clicking on "SRART GAME", the following error appears : image

Either I open a waiting room for no reason, or start a game without naming my character. image

Error Detail (Only in offline mode) :

Parameter name: key System.Collections.Generic.Dictionary2[TKey,TValue].FindEntry (TKey key) (at <599589bf4ce248909b8a14cbe4a2034e>:0) System.Collections.Generic.Dictionary2[TKey,TValue].ContainsKey (TKey key) (at <599589bf4ce248909b8a14cbe4a2034e>:0) UIPhotonWaitingRoom.DestroyPlayerUI (System.String id) (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/UI/UIPhotonWaitingRoom.cs:219) UIPhotonWaitingRoom.CreatePlayerUI (Photon.Realtime.Player player) (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/UI/UIPhotonWaitingRoom.cs:240) UIPhotonWaitingRoom.OnJoinedRoomCallback () (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/UI/UIPhotonWaitingRoom.cs:203) UIPhotonWaitingRoom.Show () (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/UI/UIPhotonWaitingRoom.cs:53) UIPhotonNetworking.OnJoinedRoomCallback () (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/UI/UIPhotonNetworking.cs:107) SimplePhotonNetworkManager.OnJoinedRoom () (at Assets/BomberIO/SimplePhoton2NetworkManager/Scripts/Network/SimplePhotonNetworkManager.cs:534) BaseNetworkGameManager.OnJoinedRoom () (at etc..

Target line in UPPhotonWaitingRoom.cs (219) : if (waitingPlayers.ContainsKey(id)) SimplePhotonNetworkManager.cs (551) : PhotonNetwork.JoinRandomRoom(); And many other line etc..

Or if no error appears the game launches in error with no data : image

insthync commented 4 years ago

BomberIO-UpdateSimplePhotonNetworkManager.zip Try import this package to fix it.

MagicRS commented 4 years ago

No more in-game errors and correct game start, thanks ! but still no player name in play

insthync commented 4 years ago

It is occurring whennplaying offline?

MagicRS commented 4 years ago

Yes,

Online mode (normal) : image Console error : nothing

Offline mode only : image Console error : nothing

This problem wasn't present before, it's as if the offline mode didn't read the playerprefs of the player name anymore.