GithubHelp home page GithubHelp logo

jbruening / pnet Goto Github PK

View Code? Open in Web Editor NEW
74.0 74.0 22.0 1.9 MB

Networking middleware for unity using Lidgren, with a custom dedicated server. This library is now obsolete in favor of its successor: https://bitbucket.org/jbruening/pnet2

C# 90.93% JavaScript 9.07%

pnet's People

Contributors

jbruening 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

Watchers

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

pnet's Issues

wrong parameter

I have issues.
( I deleted already, cannot quote).

There is many methods with Recycle() It takes wrong parameter. It wants NetIncomingMessage but the variable type is NetOutgoingMessage ( or inversed ).
So couldn't test it.

Debug

I wanted to know if I could disable the Unity side debugging code in the console, and if I can what do I need to change

Issues sending and receiving data

Hi. My name is Tom. I sent you a PM in Unity Forums. I started testing PNet on your server example this week with Jitter Physics which looks good though very basic at this point. The server spawns a local NPC in the BasicRoom which jumps and move's around at random using Jitter. The client players however send their positions which the server only relays their movements back to the clients using Unity physics.

Taking things a step further. I updated my clients to Serialize a Byte Enum of player movements like LEFT, RIGHT, FORWARD, BACK, JUMP, yada and then have the server calculate the player positions authoritively sending the movement back to the clients.

What I find odd is that the client who is sending movement commands isn't actually getting any position data back from the server (Serialize is not firing on the Servers PlayerComponent). If I start the NPC on the local server. My OnDeserializeStream on the server side's PlayerComponent seems to be getting Both my NPC Vector 3 data and my Unity client Enums data (Controller commands). So I'm at a loss to what's going on. Also note the Serialize callback only starts firing on the server side when the NPC starts up. It seems Serialize starts firing when I have more than one client connected. Also I find it odd that if I decide not to send any controller commands on the client side (Player remains still) the Server side OnDeserializeStream still reports data even when I stop the NPC.

I'm doing what I can to check ownership of the network view so that the sends and receives don't get mixed up but I'm confused as to what's being broadcasted to everyone, to just the server, to just a player and to even back to one's self.

So if you can give me any tips / advice please do thanks.

NullReferenceException in HeartBeat

I cloned your code, I made sure to use the exact revision of Lidgren you are talking about, and I followed all the instructions about slimmath and such.

However when I run the code it seems to be working, until I connect a client. At which point I get a constant flow of errors

System.NullReferenceException: Object reference not set to an instance of an obj
ect.
   at Lidgren.Network.NetConnection.Heartbeat(Single now, UInt32 frameCounter) i
n d:\Development\Olympus\Server\PNet\Lidgren.Network\NetConnection.cs:line 260
   at Lidgren.Network.NetPeer.Heartbeat() in d:\Development\Olympus\Server\PNet\
Lidgren.Network\NetPeer.Internal.cs:line 383
   at Lidgren.Network.NetPeer.NetworkLoop() in d:\Development\Olympus\Server\PNe
t\Lidgren.Network\NetPeer.Internal.cs:line 228

I am using your example server/example client, and this is the error I am getting, no customization. Am I doing something wrong that might not be documented?

I am having trouble understanding

I have come to love this lib over the past week, but there are a lot of things I can't grasp, what I was asking is do you have any internal documentation that you use, I want to make a full fledged demo multilayer game and post the code along with explanations, on the wiki, so other people can get into it more easily. I went though the Example but it leaves a good amount left to be desired. Just to clarify I don't want to to work on the example and turn it into a game I just want some documentation so I can work on building a example game(s). any help would be appreciated.

P.S. sorry if this was the wrong place to post it but I see no other way to contact you.

Lidgren patching problem

I might be doing this wrong but when I try and run the patch included for Lidgren so I can build it properly I get this

C Lidgren.Network\Lidgren.Network.csproj

    rejected hunk @@ -10,7 +10,7 @@
    hunk @@ -27,6 +27,7 @@ already applied
    rejected hunk @@ -38,6 +39,7 @@
    rejected hunk @@ -47,11 +49,12 @@

G Lidgren.Network\NetBuffer.cs
hunk @@ -69,8 +69,39 @@ already applied
G Lidgren.Network\NetConstants.cs
hunk @@ -33,7 +33,7 @@ already applied
C Lidgren.Network\NetPeer.Internal.cs
rejected hunk @@ -1,5 +1,5 @@
C Lidgren.Network\NetUtility.cs
rejected hunk @@ -17,7 +17,7 @@
Summary of conflicts:
Text conflicts: 3

Network Discovery

I noticed that Lidgren has a peer/server discovery system, and that PNet implemented that in a way, but I don't see a way to actually send Discovery Request message to the server in any way.

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.