Giter VIP home page Giter VIP logo

captainsmess's People

Contributors

floduno avatar hengineer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

captainsmess's Issues

Errors opening project in Unity 2020.1.7f1

I am trying to open the project with the specified Unity3D version. But a seria of popup windows with error message appearing: "Failed to load window layout. This can happen if layout contains custom windows and there are compile errors in the project, Load default layout / Revert Factory Settings / Quit"
image

Cannot connect through specific Wifi

I am developing in Unity 2019.1.4f1, and when I am trying to connect different devices through specific Wifi connection, the connection will be blocked and all devices cannot connect to the same lobby. But when I switch to other Wifi including mobile hotspot, the local connection works properly.
Are there any solutions like changing the protocol to avoid being blocked by firewalls or secure system?
I tried connecting through Unity editor and also the space team app in different Wifi environments, it only works in specif wifi connections and didn't report any errors or warnings during the connection.
Thanks for your time!

CaptainsMess attempts to connect to another server after creating its own

With the right timing (2 devices connecting at the same time), it is possible to make CaptainsMess to throw an exception.

It seems that, after creating a server, a new server discovery arrives and then it (also) tries to join to that server. This is the full log:

CaptainsMess# Initialized peer 4614f236, 'CM2', 1-4 players

OnStartConnecting

CaptainsMess# Restarting server with data: 1:4614f236:0:0:999::

CaptainsMess# Discovered 1:9d9c3e7d:0:0:999::

CaptainsMess# Should NOT join.

CaptainsMess# Discovered 1:4614f236:0:0:999::

CaptainsMess# Should NOT join.

CaptainsMess# Hosting candidates: 1:9d9c3e7d:0:0:999::,1:4614f236:0:0:999::

CaptainsMess# MaybeStartHosting? Found 2/1 candidates

CaptainsMess# Hosting candidates: 1:9d9c3e7d:0:0:999::,1:4614f236:0:0:999::

CaptainsMess# Picked 4614f236 as best candidate

#CaptainsMess# StartHosting

CaptainsMess# Discovered 1:9d9c3e7d:1:1:999::

#CaptainsMess# Should join!

CaptainsMess# Joining ::ffff:213.201.97.205 : 7777

CaptainsMess# OnLobbyClientExit (num players = 0)

CaptainsMess# OnLobbyServerConnect (num players = 0)

CaptainsMess# OnLobbyServerConnect (num players = 0)

CaptainsMess# OnLobbyServerCreateLobbyPlayer (num players 0)

CaptainsMess# OnLobbyClientEnter MyCMListener

CaptainsMess# Restarting server with data: 1:4614f236:1:1:999::

CaptainsMess# OnLobbyServerConnect (num players = 1)

(Exception) A connection has already been set as ready. There can only be one.
(Exception) ClientScene::AddPlayer: playerControllerId of 0 already in use.

CaptainsMess# Restarting server with data: 1:4614f236:1:2:999::

I solved it myself adding a internal state variable "hostingServer" and using it as a guard, ignoring any server discovery if CM already hosting a server:

public void OnDiscoveredServer(DiscoveredServer aServer)
{
if (verboseLogging) {
Debug.Log("#CaptainsMess# Discovered " + aServer.rawData);
}
if (hostingServer)
{
if (verboseLogging)
{
Debug.Log("#CaptainsMess# Already hosting a server, ignoring " + aServer.rawData);
}
return;
}
...

Don't know if it is the best solution, but it avoids the exception and the app can still run correctly :-) . If you like it I can do a pull request.

Cheers, Néstor.

CaptainsMess does not recover from a temporary connection loss

Hi! I found that if wifi connection is lost while CaptainsMess is finding a server or the game already started, the following message appears after disconnecting and trying to connect again.

By some reason host doesn't have broadcast addreses
UnityEngine.Networking.NetworkDiscovery:StartAsServer()
CaptainsMessServer:RestartBroadcastInternal() (at Assets/CaptainsMess/CaptainsMessServer.cs:106)

This can be reproduced easily in the ExampleScene by:

  1. Load ExampleScene
  2. Press autoconnect
  3. Disconnect wifi
  4. Press Cancel
  5. Reconnect wifi.
  6. Press autoconnect

I found a solution here here: http://forum.unity3d.com/threads/broadcast-discovery-already-running-startbroadcast-failed-err-8-startserver-listen-failed.357852/

adding a NetworkTransport.Init(); at the beginning of CaptainsMessNetworkManager.AutoConnect()
and NetworkTransport.Shutdown(); at the end of CaptainsMessNetworkManager.Cancel() solves the issue.

Cheers Néstor.

No example of placing something on the shared world map?

I just compiled this demo to two iOS devices. Tracking and connection seems to work, but how do you access the shared worldMap to place objects? I'm surprised this example doesn't show anything done in AR once it's connected. Any advice would be greatly appreciated.

CaptainsMessDebugGUI won't compile for Windows Store

Minor issue, but thought I'd document it as I noticed it.

The "Network" class was for Unity's old multiplayer system. It is still included for legacy reasons on platforms like Windows, Mac, Android, etc. But it is not included on the newer "Windows Store" build target for Windows 8.1 or Windows 10

The line in question is #21:

serverString += "Hosting at " + Network.player.ipAddress + "\n";

I tried searching around, but I didn't see an easy/direct replacement for getting the current device's actual local IP address (rather than something less useful like "localhost")

Luckily, since this is just debug information, I commented out the line and now things seem to be working nicely for Windows Store builds.

May be worth trying to find an alternate method to get the local IP in order to allow for maximum cross platform compatibility. Also because Network is deprecated, it may be removed in future versions.

ProjectSettings not needed?

Since the point is to just copy the Captain's Mess files into your own Unity project, shouldn't the files in ProjectSettings not be tracked/included as part of the Git repo?

Bluetooth?

Hey, is this still WIFI only? :) We're just starting our BLE stuff now and were just curious where you'd gotten to.

Cannot connect using Android 6

I downloaded Spaceteam on a Motorola Moto G2 with Marshmallow and I cannot enter the lobby, I stay in the black hole.
I don't know where to find debug logs to identify where the error comes from.
Tested on two different wi-fi networks without success.

Can't open on latest unity 2019.3.0a4

After upgrade. I get those errors:

"The type or namespace name 'NetworkSystem' does not exist in the namespace 'UnityEngine.Networking' (are you missing an assembly reference?
"

"
Assets/CaptainsMess/CaptainsMessClient.cs(23,35): error CS0246: The type or namespace name 'NetworkDiscovery' could not be found (are you missing a using directive or an assembly reference?)
"
I guess cause the networking library was updated

Certain broadcast identifiers can lead to a invalid broadcast key

Hi again! sorry for the spam, but I've been doing intensive test to this module as we are preparing a prototype using it. If you don't mind I'll keep posting bugs and what I did to fix it.

How to reproduce the error:
set broadcast identifier to "asdasd2"
try to connect.

The set broadcast key is negative and Unity launches an exception.

I solved it just by setting the absolute value of the identifier hashcode instead of just the hashcode itself.

Autoconnect and IPv6

On Android, when connected to an IPv6-only network, NetworkDiscovery does not seem to work. It gives the following error:
By some reason host doesn't have broadcast addreses

On iOS, the error does not show up, but it doesn't discover other devices. I suspect it's because iOS still issues an internal IPv4 address.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.