Canon Fodder

Games => Shadow Wolf => Topic started by: Dragyn on June 23, 2014, 08:20:39 PM

Title: Networking
Post by: Dragyn on June 23, 2014, 08:20:39 PM
As of right now, I've gotten the networking code to the point where any number of clients can connect to a single host, and the host can talk back and forth with any of them...but none of the clients can talk to each other yet.

I intend for the Host to track the map variables, the platforms, enemy locations, and all that, and pass it on to the clients.  I am hoping to have the clients track the locations and actions of the characters under their control, and pass that to the other clients as well as the host. This lets clients have smooth movement, while still making sure everyone sees the same thing.

Any thoughts on the matter?
Title: Re: Networking
Post by: Felblood on June 25, 2014, 01:40:59 PM
This does open up some dangers of characters being in one place on each screen, while the server sees them being somewhere else, which can lead to those terraria-esque snapback motions, when you try to compensate or correct.
Title: Re: Networking
Post by: Dragyn on July 01, 2014, 09:00:28 PM
True.  It's also a lot trickier to get them to connect crosswise than I had expected.  My attempts thus far either result in infinite connection spam (and subsequent network bogdown), or failed connections.

Connecting to the host and just relaying information may prove the optimal route, at least for now.