GithubHelp home page GithubHelp logo

dio85 / unity-tcp-udp-client-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akyrosxd/unity-tcp-udp-client-server

0.0 0.0 0.0 24.88 MB

C# 99.52% HLSL 0.13% ShaderLab 0.04% Makefile 0.01% C 0.30%

unity-tcp-udp-client-server's Introduction

A simple multiplayer game using TCP and UDP.

Compiling the client

  • You have to enable unsafe code in your unity project by going to File > Build Settings > Player > Other settings > Allow 'unsafe' code

  • For the movement of the players to work properly, go to File > Build Settings > Time then change Fixed Timestep and Maximum Particle Timestep to 0.033333

  • After that, you should be able to build the project without any errors

Compiling the server

  • You will have to build and lunch the server inside a linux machine. If you do not have a linux machine, you can use a virtual machine or download and install a linux machine - from the Microsoft Store. Ubuntu is recommended but you can use a different distro if you want

  • After you are done setting up your linux machine, create a directory and copy the server files in that directory

  • Open your terminal to the directory you created or use cd <your_directory>

  • To compile the server, you will need to have make installed. You can check if you have it installed by typing make and you should not get any error. Else you have to type sudo apt install make (for debian-based distros) or "install package" command for your distro

  • After you made sure that make is installed, type the following command: make clean && make (note: you do not have to use make clean if you compile it for the first time)

  • After you are done compiling it, you can run it by typing in your terminal ./server and pressing enter

Final Result

This video shows the client and server in action

Known issues

  • The Y coordinate of the players can get desynchronized some times
  • The scrollbar of the chat does not function properly

unity-tcp-udp-client-server's People

Contributors

akyrosxd avatar

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.