PUN 2 Multiplayer Addon

Justin

Administrator
Staff member
Throughout the development of version 2 we had multiplayer in mind and even had an early prototype of UNET integration before version 2 was released. UFPS version 1 had a PUN addon and the character controller is now far enough along to be able to properly add multiplayer support.

giphy.gif

As we are developing this addon we are also creating an abstract network layer that will allow us to add new multiplayer implementations without having to depend on them within the core controller code. We are starting with PUN 2 for a few reasons:
  • UFPS 1 had a PUN addon.
  • PUN is client authoritative which makes it easier to add compared to server authoritative architecture.
  • The abstract networking layer can be used by the server authoritative implementations.
I know that a client authoritative architecture isn't right for every game type and we plan creating a Bolt implementation later. @Matt is a Mirror developer and he will also be creating a Mirror implementation after we release the PUN addon.

The following features are currently synchronized over the network:
  • Transforms (with lag compensation)
  • Animations
  • Shootable, Melee, and Throwable Item Actions
  • Moving platforms
  • States
  • Object Pooling
These six topics allow for a lot of flexibility but there is still some more that we need to implement such as spawn points, ragdolls, and cheat prevention. Those last two topics need some more research so I am hoping to be able to get them in but no guarantees yet.

Once all of the character controller features are implemented we will then be starting on the demo scene. The demo scene is still up in the air but we'd like to implement the following:
  • Lobby
  • Free roam
  • Basic deathmatch game type
  • Basic CTF game type (unsure if we want to go this route depending on the work required)
The goal of this addon is to provide a way to syncronize the character controller features and not a full multiplayer game. You will need to know PUN programming for your own game and this addon will just help you get started. We are still debating how deep to go on the game features side of things (lobby, deathmatch, CTF) since they are there just to provide an example. With that said we also know that the better the demo is the more it'll help everyone learn how to work with PUN and the controller.

We have no ETA for when this addon will be released but we are shooting for the June/July timeframe. We also haven't determined a price for this addon yet but the UFPS 1 addon was $20 so it'll likely be around that.

I'll keep this thread updated as we implement more features and have more info.
 
I vote to keep the demo as basic as possible. People like to publish Demos as there game. flooding the market places with bad "games". Adding a Battle Royal mode with Deathmatch and Capture the Flag would make the gaming market places more crowded with fake games/clones.
 
Interested in a decent overview of how to integrate other networking packages.

<censored>I would prefer a CTF demo over the other mentioned match types.</censored>
 
Last edited:
Matt here. As @Justin pointed out, I will be doing a paid Mirror integration/add-on (not sure what exactly to call it right now) that will probably be slightly more involved than Opsive's PUN add-on given the fact that I will be focusing on a server authoritative architecture.

As with any add-on that adds networking with your game, I'd like to reinforce the point that Justin made that "The goal of this addon is to provide a way to synchronize the character controller features and not [create] a full multiplayer game. You will need to know [network] programming for your own game and this addon will just help you get started".

This means that if you purchase the PUN2 addon, my Mirror add-on or the in-the-pipeline Photon Bolt add-on, you will need to know network rogramming. If you are expecting this to be a complete network game kit, these add-ons are not for you. These add-ons are for people who have a network game idea written down or planned and need the core network functionality done and willing to extend upon it.

Battle Royale is not hard to implement yourself once you have the network done. It is a variant of the Free For All game type without respawns. Implement FFA yourself and then you've got 75% of Battle Royale gameplay done. Capture The Flag requires custom implementation, because while Call of Duty had classic CTF game play, they also added variants like capture and securing flags instead of stealing the enemy's flag, etc.

Also, keep in mind that if Opsive makes BR or CTF one way, it opens the door for people going "oh you're doing it wrong you gotta do it this way", "I don't know how to customize it myself, can you do it for me", "hey Justin can you add X Y Z A B C to your BR code". This drains valuable development time and is more hassle (including having to support it) than it's worth than if the said person was to R&D their desired game mode themselves.

@playablepixel makes a great point about fake games and clones being spammed on the market place. There's simply too many of those. A kit is supposed to only show off what it can do in terms of features while providing you with the core essentials that you paid for (maybe plus a little extra) and leave everything else up to the developer, such as environment, etc. They are like your electric mixer in your kitchen.

However, if Opsive makes a big demo level showing off all the cool network features and whatnot with full multiplayer features like classes, etc your regular asset flipper will come along, not even bother changing the assets, add that to a standalone build, make some crude artwork and publish. If you aren't familiar with the term 'asset flipper', I suggest you look up SidAlpha's videos (his Dirty Devs series also fall into "required watching" category for anyone trying to make a commercial game) and also some other people (IAmPattyJack comes to mind) who moderate the steam store front and review asset flips/expose how flippy they are.

My ETA for the Mirror network add-on is likely going to be later this year and may suffer setbacks. I may also open a pre-order page later down the track. I do not know... yet.

@devomage: Please start a new thread regarding the CTF animations. Let's keep animation requests out of the multiplayer announcement thread.

Please note that I am not trying to be rude with my mentioned statements, but I simply want to put some common concerns and/or the most common requests to bed. We're gonna make your game have great network code, but you're gonna have to ice that cake yourself. We'll provide you the base cake, but you gotta add your own toppings and bake it.

Anyway, my wall of text is done. If you have any questions regarding the Mirror integration, tag me here.
 
Last edited:
Network the demo scene.

Make the match types into $5 assets. This might include abilities and/or animations. Win/win.
 
Make the match types into $5 assets. This might include abilities and/or animations. Win/win.
$5 is not enough for game types and included abilities/animations. Also, you run the risk of getting slapped as a developer that "piecemealing" add-ons if you go down that path. Personally, if I was going to make an add-on that provides a complete team death match game mode, I'd probably charge $15 - $30 for the time spent developing it with flexiblity in mind.
 
Last edited:
@Justin When I used the original TPC in early 2017, you had stubs throughout it to designate where networking code would need to go. I ended up building in PUN1 support for my game based on those stubs and it worked out great. I'm now using UCC (Third Person Controller, integrated it back into my project back around February 2019) and I was about to do the same in this version (but for PUN2) and I don't see those similar entries so I don't have a great launch point.

For this addon, will we be easily able to use it if we've modified some existing UCC TPC code, or are we going to need to update to the latest release to use it?
 
Also what you've listed above likely covers the majority of my use cases. Would you be able to offer a beta version of that code for us to check out and test?
 
For this addon, will we be easily able to use it if we've modified some existing UCC TPC code, or are we going to need to update to the latest release to use it?

Depends how much customisation you have done with the code. If you've modified code then you might have unexpected behaviour (another reason why I recommend trying to subclass things and use overrides).

It will most likely require a specific version of UCC or higher so that the network layer and the framework are synchronised. You probably won't be able to run the network add on a virgin 2.0.x version of UCC when it was designed for 2.1.6 for example.
 
Thanks for all of the feedback! I am leaning now more towards not including any game-specific demo scene. The advantage of this is that it'll also allow us to release this addon sooner.

For this addon, will we be easily able to use it if we've modified some existing UCC TPC code, or are we going to need to update to the latest release to use it?
The multiplayer addon will require version 2.1.5 or later of the character controller.

Would you be able to offer a beta version of that code for us to check out and test?
I don't have any specifics on if we will be doing a beta test yet or not. I will be working with Matt to test it ahead of time since he has resources to perform a good set of tests with it. Depending on how that goes will indicate if we need to do a broader set of beta tests or not. I am hesitant towards beta tests because it means extra work from the support side of things especially when the documentation may not be complete.
 
Thanks for all of the feedback! I am leaning now more towards not including any game-specific demo scene. The advantage of this is that it'll also allow us to release this addon sooner.


The multiplayer addon will require version 2.1.5 or later of the character controller.


I don't have any specifics on if we will be doing a beta test yet or not. I will be working with Matt to test it ahead of time since he has resources to perform a good set of tests with it. Depending on how that goes will indicate if we need to do a broader set of beta tests or not. I am hesitant towards beta tests because it means extra work from the support side of things especially when the documentation may not be complete.

How would you feel about a no-strings attached paid access to the beta where we're not allowed to ask any support questions (even if it was just a copy of the code to read)? I'm mostly interested in seeing where you stubbed in the multiplayer functionality so I could quickly build it into my code like I did with TPC back in 2017 (you had a lot of #If UNITY_MULTIPLAYER or something similar and it was a perfect guide for just putting in PUN).

I just need some guidance on where to be handling the syncing for the stuff you listed in the OP. Upgrading TPC in my project is going to be rough so I'm likely going to need to go this route regardless and I'd appreciate any insight into how you built in the PUN stuff before I just go and take a wild stab at it on my own.

Thanks!
 
When we released the Agility Pack we released it on the Opsive Store first to ensure there weren't any major issues. We'll probably do something similar with this addon.

We are getting close to that stage but not quite there yet :) I know that there are still certain issues and the API is still a work in progress.
 
In order to use the PUN addon you'll first need to create a character like normal through the Character Manager. From there you can go to the PUN Multiplayer menu option and create your PUN character. This will replace and add any necessary scripts in order to have your character work with PUN.

1328
 
Looking great there Justin. Might have to take some design cues from your menu when I do the Mirror Integration. ;)
 
@Matt
Thanks for being an addon Mirror, because Photon does not meet many styles of games, such as Survivals (which is my case). It is very difficult to create a dedicated server with constructs, status, inventories being saved on the server for Photon, not counting the limit of CCU numbers.
I sure will buy your Mirror feature, since i have some games with Mirror.
Mirror is scalable and flexible, which Photon is not.
@Matt , as soon as you have more news about your asset, let us know.
 
The PUN 2 addon has been going well and we should be able to release this month. Our tentative schedule is to finish the demo scene and documentation next week, and then hopefully release on the Opsive Store the week of the 17th. It'll be on the Opsive Store for a somewhat extended period of time while I work on recording new videos and fix any bugs that were brought up from Opsive Store customers.

In the meantime here's a gif that shows the interact ability working over the network:

giphy.gif
 
Awesome! Can't wait until I try.
Here is one request. It looks like you have two clients up for multiplayer testing.
I believe it requires rebuilding the client for any changes, right?
Building a client takes a really long time and I'm wondering if you can support split screen for the easier multiplayer testing.

Thanks.
 
Awesome! Can't wait until I try.
Here is one request. It looks like you have two clients up for multiplayer testing.
I believe it requires rebuilding the client for any changes, right?
Building a client takes a really long time and I'm wondering if you can support split screen for the easier multiplayer testing.

Thanks.
That's correct. Split screen should actually already work for third person assuming you have the buttons mapped for multiple controllers. First person requires more work because the materials need to be swapped out for each camera.. it's on my list to add support for.
 
Here is one request. It looks like you have two clients up for multiplayer testing.
I believe it requires rebuilding the client for any changes, right?
Building a client takes a really long time and I'm wondering if you can support split screen for the easier multiplayer testing.

Thanks.
May also be a wise idea to make a smaller network project that has nothing but the basics so you can nail down multiplayer functionality and then port it back into your main project.
 
Top