3
\$\begingroup\$

I have been programming in Unity for a while, and ever since I started I could not wrap my head around the Unity Networking system. I understand on a whole how it works, I even made a small project using it, but it has always seemed to me like I did not have much control over the system (e.g. managing the streams of data, the lack of documentation about more advanced topics). Therefore, I would like to try to implement a peer-to-peer game without Unity Multiplayer. My current project has a lot to do with movement ( take for example a fighting game, a brawler), where there is real-action constantly being streamed. It is important that when something gets hit, killed, crashed into, the players get the update immediately. I know a few basic thing about socket programming and I am ready to learn even more. I imagine the system being based on byte arrays messages, that trigger specific actions on each player. For Remote Procedural Calls (RPCs), this looks like a good solution, but what about streaming the constant position of a player? How can I stream it fast and easy without overloading the network channel?

I would like to hear different approaches to this problem.

\$\endgroup\$
  • 1
    \$\begingroup\$ I see this question has a vote to close it as "how to get started" - it might help if you edit it to include an overview your research thus far and what specific help you need in selecting / adapting the techniques you've selected. Transmitting positions is pretty foundational, so you can easily find materials about it dating back more than a decade. A 101 intro to "different approaches" in this field may a bit broad for a Q&A answer, but if you show us where you're at, users here can help you over the next step. \$\endgroup\$ – DMGregory Nov 2 '17 at 23:04
  • \$\begingroup\$ Yeah this is one of those things that is hard to find resources on, but it's not something Stack Overflow can help much with. It's definitely worth looking at the Command Pattern, Dead Reckoning, Bucket Sync and any basic networking courses you can find online. All of these need to be handled. Networking is a very complex topic in games. I would honestly recommend using Photon if you're tired of Unity. Doing your own networking is like implementing a game engine. You're going down a rabbit hole my friend. Be prepared. \$\endgroup\$ – gjh33 Mar 20 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.