Giter VIP home page Giter VIP logo

hazel-examples's Introduction

Hazel-Examples

Okay, this first example is a little too complicated and a little rushed, but it sets up a server and a client, allows the client to create a game, or join a known, existing game.

It should demonstrate lots of best practices, and I've tried to comment near the few bad ones.

In general, you should:

  1. Clone the repo
  2. Fix the reference in the server code (Reference Hazel.dll)
  3. Copy Hazel.dll and HazelNetworkManager into Unity
  4. Make a GameObject with HazelNetworkManager
  5. Call CoConnect as a Coroutine
  6. Call JoinGame or CreateGame

I'll clean this up sometime later. I promise. But also, it's not meant to be a full server demo. This should be more than enough to get a user started passing information across the internet.

hazel-examples's People

Contributors

willardf avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

hazel-examples's Issues

Compilation Error

Trying to compile the server im getting this compilation error :
using VC 2017

1>------ Build started: Project: HazelServer, Configuration: Debug Any CPU ------
1>D:\Dev\my\cpp\UDP_servers\Hazel-Examples\1 - SimpleServer\Player.cs(70,41,70,47): error CS1061: 'DataReceivedEventArgs' does not contain a definition for 'Sender' and no accessible extension method 'Sender' accepting a first argument of type 'DataReceivedEventArgs' could be found (are you missing a using directive or an assembly reference?)
1>D:\Dev\my\cpp\UDP_servers\Hazel-Examples\1 - SimpleServer\Player.cs(110,41,110,47): error CS1061: 'DataReceivedEventArgs' does not contain a definition for 'Sender' and no accessible extension method 'Sender' accepting a first argument of type 'DataReceivedEventArgs' could be found (are you missing a using directive or an assembly reference?)
1>D:\Dev\my\cpp\UDP_servers\Hazel-Examples\1 - SimpleServer\Program.cs(82,160,82,164): error CS1061: 'ObjectPool<MessageReader>' does not contain a definition for 'Size' and no accessible extension method 'Size' accepting a first argument of type 'ObjectPool<MessageReader>' could be found (are you missing a using directive or an assembly reference?)
1>D:\Dev\my\cpp\UDP_servers\Hazel-Examples\1 - SimpleServer\Program.cs(83,160,83,164): error CS1061: 'ObjectPool<MessageWriter>' does not contain a definition for 'Size' and no accessible extension method 'Size' accepting a first argument of type 'ObjectPool<MessageWriter>' could be found (are you missing a using directive or an assembly reference?)
1>D:\Dev\my\cpp\UDP_servers\Hazel-Examples\1 - SimpleServer\Player.cs(14,36,14,46): warning CS0649: Field 'Player.Connection' is never assigned to, and will always have its default value null
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Cound you please describe the procedure to set it up in more detailed way if you don't mind?

I'm trying to make your Hazel-Networking example run on my Unity project and on my VPS.
I could fix the reference to Hazel in this example project, and the build has been successful.

However, it seems a little bit obscure to configure the server's IP address in my Unity project and where to put the "HazelServer.exe" file resulted from the build.

Or can this example run just on a local host?
I still don't understand what I can do completely with this Hazel-Examples repository.

I think I'll get a clear image of what the Hazel is once I see this example project working properly.

Thank you for your great work on Hazel for Unity!

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.