|
Post by Telleon on Oct 19, 2018 4:14:50 GMT
Hello I am trying to figure out how i would transform this into an option to make it multiplayer
Does anyone have any clue which way to go with this - for instance do i have to use unity networking / and is it preferred. If
Would i just somehow make the one player LOCAL and the other REMOTE (instead of NPC) and have a server or something host the game and magically have it talk between the 2?
how do i do magic? For instance when i draw a card - the other side needs to see that drawn card - so the draw a card is notified - so then client LOCAL player draws the card and tells the server to send a opponent drawn card msg to show that he drew the card or something? As you can guess i may be lost/confused
thank youTelleon
|
|
|
Post by Admin on Oct 19, 2018 13:33:57 GMT
|
|
|
Post by Telleon on Oct 20, 2018 3:10:22 GMT
Thank you! the majority i have found a client server client mainly although i have seen some client isServer scenarios - i prefer the client to server to client scenario the best
as far as addons and tutorials i have been looking around as well through your tutorial as well - thanks for bringing that 'no longer supported' or atleast an older way of doing things - of course i would prefer the newer, more future supported way- but that comes with the drawback of not currently released, lack of tutorials/documentation.
for the third part method i have found this usocketnet thing but that looks more for real time stuff ...i am looking at playfab and it appears they have something but they are also going through a rework because microsoft bought them but the code doesn't seem to be changing to much...so lots of decisions to go through... i might go with playfab as i may go with the other things it brings like leaderboards and stuff
Would i be thinking of the design like
hit multiplayer battle matchmaker begins - finds opponent net manager assigns a LOCAL and a REMOTE when LOCAL does something - send info to NETMANAGER to send to REMOTE and viceversa END GAME UPDATE STATS and such accordingly
??i am unsure how i would use the already existing code to send calls to the netmanager to tell the REMOTE for instance to show the opponent draw a card (i guess i could create a networkshowaction - where whatever the action done by the opponenet was done the viewer is shown or something like that... does that makes any sense or am i thinking all wrong there?
|
|
|
Post by Admin on Oct 23, 2018 16:40:34 GMT
I think your architecture will depend largely on the platform(s) you end up picking to handle multiplayer for you. To be upfront, I have only a little experience with multiplayer and don't consider myself an expert. However, I think the examples I set up for the multiplayer tic-tac-toe would probably help give you an intuition about what kind of setup will probably be needed. As long as both clients are configured the same way initially, and roll the same random numbers (you can seed the generator etc) then you can make both encounter the same experience without passing entire game states, you just pass enough info to indicate the specific action a player has taken.
|
|
|
Post by Telleon on Oct 23, 2018 18:56:37 GMT
Exactly what I was thinking...if I create a netsystem that registers to all actions I can take that action and send that to the server with the info of what the action did so it can send it to the other client and take that message and run that action on its end as if the NPC was doing it. Just gotta figure out how to code it to take that networking and implement As an enemy when the action is performed instead of as a LOCAL...pretty sure you coded most of it to work already or close to what needs to be done.
As for the actual network part of things I'll figure out which to go with but I'll prob go with PUN2. Just wanted some help with your actual system portion of it and it taking the stuff
Thanks again for the help and the info! Had no clue about unity going with a new networking system!
|
|
|
Post by Admin on Oct 24, 2018 13:23:31 GMT
Sounds good, I'd love to hear about your experience with it after you try it out!
|
|