Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Building a free networking solution [MoBA testing project]

Discussion in 'Works In Progress - Archive' started by Christian-Tucker, Jul 17, 2014.

?

Do we need a free networking solution that teaches users?

  1. Yes

    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    So, I figured I'd go ahead and post a 'Project Thread' type of thing on here, as a place to keep updates. Basically what my end goal is, is to have a completely abstract server in which people can build off of very easily. I had decided that I might as-well develop a (actual)project to use while testing the server, instead of just a fake client sending what I wanted it to for testing. This project has allowed me to start working on an C# Client API that simplifies connecting Unity3D with my 3rd party server.

    Because of the nature in which I have setup the server, there's not any confusion when adding additional packets to the server, and all of the clients work is yours, of-course. So if you would like to create a packet to be handled on the server with a Packet ID of 79, it would be as simple as this.

    Code (csharp):
    1.  
    2. @PacketOpcodeHeader( { 79 })
    3. public class Foo extends PacketDecoder
    4. {
    5.     ...
    6. }
    7.  
    So, a few questions that people might ask right off the bat are:
    • Q: Which language is the server written in.
      A: Java
    • Q: Which networking protocols will this support.
      A: Currently we support TCP and UDP, however we have not yet created an optional reliable layer for UDP Packets.
    • Q: Why are you writing this, and planning to give it out for free?
    • A: Because Unity needs to progress. We currently have a few networking solutions that work with unity, such as SmartFoxServer and Photon, and we can't forget the already implemented version of RakNet that the default Unity networking uses. I'm tired of seeing all of these decent networking solutions go to waste, by lack of tutorials, explanations, etc. What I don't think people understand is that most people who download a game-engine and want to create a multiplier game typically don't know anything about programming. If they do, it's usually not much. Networking solutions should put effort into helping people learn and get started in the industry, that way if they have a version of something to sell, people will feel more comfortable buying it. Anyway, starting to get off track here. Tl;Dr - To help people

    Currently most of the server-sided code is cramped up into a few classes. There's nothing on the game-side worth showing just yet, as I haven't finished the movement packet. (Considering I'm using an authoritative setup for this game, I'm not just brute-forcing a movement packet. ) I'm not very design friendly, so anything you see on my unity project uses GUI.Box and what-not. If I decide to take this further once I'm done with the server I'll open a collaboration thread.

    ---
    As you can see, just like I stated before most of the code is all clumped up right now and I haven't abstracted most of it yet. I'm working on functionality first. Once i have functionality working at a level I'm pleased with I'll start abstracting everything and getting it ready to distribute.
     
  2. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    Bump -- Started working on the Asynchronous Client API.
     
  3. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    So, I started working on an A* implementation for the Client and Server, this will allow the Client to send paths and the server to verify them for authorization.
     
  4. madcow66666

    madcow66666

    Joined:
    Dec 11, 2012
    Posts:
    9
    This should be a very useful add-on if you can get it to do everything you want, I am currently completing my java training, and would love to help beta test this with you, just having a free network framework I could plug my game into and build off of would be amazing.
     
  5. EdgarCarrera

    EdgarCarrera

    Joined:
    Apr 21, 2014
    Posts:
    255
    yes i want