Giter Club home page Giter Club logo

steam-multiplayer-for-unity's Introduction

Steam-Multiplayer-for-Unity

This library is outdated and no longer maintained.

If you need Unity - Steam multiplayer, See Mirror

Issues
Release

This is a Steam multiplayer online solution based on Steamwork.Net for small P2P multiplayer games.

If you think this project is helpful to you, please give โญ ,

If you want to work with us to improve this project, please feel free to feedback Issue or send a Pull Request, I will invite you to join the collaborators.

How To Play The Demo

Run the main scene (Main.unity), you will see this. Make sure the Steam client is open. The Demo scene uses the test Appid 480. This is the official Test Appid for Steam, so you will see many other people's lobbys, but you can't join them.

Screenshot

Click the Create button to create a lobby where you can make simple settings Screenshot

After the creation is complete, you will join the lobby. The lobby contains a chat bar. You can click on Invite to directly invite Steam friends to join the game. Note that this button is only useful in the Standalone state. In the Unity editor state, please open the steam client. , right click friend avatar - invite to join the game, to invite.

Screenshot Screenshot

Then click Play to play the game. Screenshot

How To Use

This multiplayer game framework is very similar to UNET.

Identity

The Identity component saves the ID of the object and automatically adds it when adding other components.

Screenshot

Sync

With the Sync component you can directly synchronize the script's Public variable, but currently does not support synchronizing custom structs and classes, only basic types and Unity's Vector3 and Quaternion are supported.

Screenshot

RPC

Using the RPC component you can call the function method of the object remotely. You need to add the method to the list inside the component and then call the method ID.

Screenshot

SyncTransform

With the SyncTransform component you can [smoothly] synchronize the movement of objects, but the object rotation requires Sync.

Screenshot

NetworkManager

You need to make all the objects that will be generated into Prefab and then add them to the SpawnablePrefab array of NetworkManager, just like UNET. NetworkManager needs to have two components, NetworkControl and NetworkLobbyManager, NetworkLobbyManager is responsible for the lobby, NetworkControl is responsible for in-game logic, this object will not be deleted during the scene loading process.

Screenshot

steam-multiplayer-for-unity's People

Contributors

asixa avatar fangxm233 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.