GithubHelp home page GithubHelp logo

saishy / tinybirdnet-unity Goto Github PK

View Code? Open in Web Editor NEW
96.0 96.0 8.0 2.17 MB

[DISCONTINUED] A high level API for making networked games in Unity, utilizes https://github.com/RevenantX/LiteNetLib

License: MIT License

C# 100.00%
csharp network reliable-packets udp unity3d

tinybirdnet-unity's People

Contributors

saishy 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

Watchers

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

tinybirdnet-unity's Issues

I am working on a similar asset for Unity utilizing LiteNetLib

First let me say awesome work.
I wanted to introduce myself. Hey im Mike. :)

The goals of my project are to create a networking library more similar to Amazons GridMate. I may also help contributing to LiteNetLib for some of the features that people have been requesting that I would also love to see.

If your down we should chat some time about the current implementations of networking that Unity and third parties have to offer, and what we see as limitations, and how we can improve networking in the unity community.

Take care and awesome work. My email is listed on my profile.

Example project does not change back to menu on remote host quit

Machine A: Windows 7 x64 Japanese on an Atom CPU
Machine B: Windows 10 x64 English on a Ryzen 3 CPU

Problem:
Machine A runs the Example Project included with TinyBirdNet as host mode. Machine B connects to Machine A and everything is synchronized correctly, etc. However, when the host instance of the example project on Machine A is quit, Machine B remains "connected" and does not get kicked back to the main menu. This leaves Machine B in a limbo state.

Severity:
Low if it's just the example project at fault. High if the actual library (TinyBirdNet) is at fault.

Expected behaviour:
If Machine A goes down and it was the host, then Machine B should be taken back to the main menu.

I guess the fix would be very trivial and I could probably fix it in a few lines of code. It just needs to load the main menu scene if the disconnection event is fired.

When connecting to a server, the registered scene prefabs remain disabled (plus spawn-in questions)

This is a two-part issue ticket. Let's start with the puzzler:
In my test scene, I have 2 prefabs that are called "Floor" and "Game". "Game" contains management scripts that the controller I'm porting to TinyBirdNet. Each gameobject has an attached TinyNetIdentity and the Asset GUID is correctly set (as part of the prefab saving process). For example, here's what the "Game" gameobject has attached:

image
And I have them in the scene, enabled as usual:
image

However, upon connecting to the server, they get disabled and never get re-enabled (as in, they get grayed out in the inspector). I don't know what's going on, but I have a Network Manager gameobject that contains a very barebones script as follows:

using UnityEngine;
using TinyBirdNet;

public class ExperimentalTinyBirdNetManager : TinyNetGameManager
{
    string hostAddress = "127.0.0.1";
    int hostPort = 31337;

    // Use this for initialization
    private void Start()
    {
        print("ExperimentalTinyBirdNetManager started up");

        instance.SetPort(hostPort);
        instance.StartServer();

        instance.StartClient();
        instance.ClientConnectTo(hostAddress, hostPort);
    }

    public override void ClientConnectTo(string hostAddress, int hostPort)
    {
        base.ClientConnectTo(hostAddress, hostPort);
    }

    public void OnClientReady()
    {        
        print("OnClientReady fired!!");
    }
}

Part 2 of the issue ticket:
What would be the TinyBirdNet Equivalent of this UNET code?

      public override void OnServerAddPlayer(NetworkConnection conn)
        {
            var spawnPosition = Vector3.right * conn.connectionId;
            var player = GameObject.Instantiate(playerPrefab, spawnPosition, Quaternion.identity) as GameObject;
            NetworkServer.AddPlayerForConnection(conn, player);
        }

As you can probably tell, this code is called if you issue a server-side AddPlayer command on the Server side. It would spawn a player object and assign the connection as the owner of that GameObject. I see you either haven't implemented such functions or I'm looking in the wrong place. I cannot use TinyNetPlayerController as the kit I'm using would break and it already uses a lot of RPCs and whatnot for server <-> client communication.

If it's unimplemented then I am going to have to stop porting the kit my project uses to TinyBirdNet because this is a show-stopper.

Sidenote: This looks like a showstopper...
image

Highest Means?

image

I don't understand the meaning of "Highest". Do you mean the new value is written below this "Highest"?

The idea of server switching?

I am very grateful to you for your help.😭

Because I am not familiar with the Internet, I would like to ask you what you think about server switching?

Server switching means

when a server disconnects, it allows a client player to become a server.

Is this project... abandoned?

Hi there,

Just wondering if the current version of TinyBirdNet-Unity is stable or if it's got any bugs/gotchas that need to be addressed? I also wanted to know if the project is still alive and kicking, because I really do like the idea of a UNET-like HLAPI that will plug directly into LiteNetLib rather than going through and having to manually write adapters, wrappers and all that painful things. However, the last commit date was a little concerning, so I thought I'd open a issue ticket and ask.

Cheers!

SyncVars: No hook functionality?

Apparently the SyncVar implementation that TinyBirdNet features does not support hooks. As the kit I'm trying to migrate to TinyBirdNet uses some of these hooks, I'm going to have to implement workarounds.

Is there any reason why hooks are not implemented or are they currently on the to-do list?

Update on fixed frames, also multiple listener ports?

Hey there,
I have been researching lots of different networking solutions, trying to determine what I would like to use for my small online rpg and came across yours. I noticed network activity is tied to frames, is this not a bad idea instead of having network possibly run on its own thread or something like that?

Also, is it possible to have the server listen on multiple ports and then handle messages differently based on which incoming port is used? I wanted servers to interconnect on one port but then clients connect on another port and their messages of course would end up being handled appropriately. I was able to get this working for the most part using standard LiteNetLib by just making a second netmanager, but when I tried using this, I keep getting null reference errors in TinyNetScene.InternalUpdate().

Thanks!

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.