Authoritative Server with Forge Alloy, UCC and UIS

Zaddo

Member
I didn't want to use Photon networking. So I purchased the PUN Multiplayer pack to use as a template to integrate UCC with Forge Alloy networking. Forge Alloy is, free, open source, can be independent of Unity, allow Authoritative servers.

After 6 weeks working nights and weekends, I finally have something that works. You may see some of the characters disappear. This is because I have built an occlusion culling system into the networking to optimise traffic. This is set to a small distance for testing.

 

Zaddo

Member
@GearedGeek. Sorry, no I am not releasing anything publicly. I couldn't even if I want to because this is just a heavily modified version of Justin's PUN multiplayer.
 
Last edited:

Zaddo

Member
This was just a remapping exercise. That is, I remapped all the PUN RPC calls to the Forge ALloy Messages. They all route through the server, which validates the message, then redistributes them to all other players that are within the occlusion culling zone. The server can run headless, or within a players game. If this is a player hosted game, the messages are routed to the host players environment as well.

The server also maintains the status of players so that when two players or NPC's re-enter the occlusion zone, it sends a snap update to match Animation and positions.

I still have a number of things to finish off. Such as, making inventory control Server Authoritive. The Networking runs on a separate thread, but message processing runs on the main thread, so I want to create another thread for handling the message validation and re-distribution.
 
Last edited:

Eyeshock

Member
Nicely done, sir. I'm in a similar boat as I'm looking down the barrel of a similar approach to a Mirror Integration. It's nice to see you can do an analogous conversion of the PUN pack.

However, I'm trying to conceptualize something of a more interpretive hybrid rather than a straight conversion of the RPC calls. That may be my inexperience with networking talking though.

Again: Well done.
 

Kiu

New member
Very nice. I'd be very interested in your code as well. I have already purchased the PUN plugin which is fine for initial development (I'm just a couple of days into a new project) but definitely not fit for a release. Maybe you can work something out with Justin as he has already stated theat he doesn't want to get into Server Authorative Networking in the near future. In the best case both of you get some money.
 

Zaddo

Member
It has been a while since I posted my initial test. I have had some issues compiling to IL2CPP and my unity project got corrupted requiring a rebuild. Together with a lot of code refactoring, all this cost me several weeks. But now I am getting back on track and making some good progress.

Here is a quick video with an overview on the spawning, pooling and netcode. I have utilised threading for the server and netcode, so that the main thread is just for game play processing.

 
Last edited:
Top