playMaker

Author Topic: Photon Integration Beta [NEW beta3]  (Read 72476 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Photon Integration Beta [NEW beta2]
« Reply #60 on: November 07, 2012, 09:27:42 AM »
Hows this coming along Jean?

Im about ready to start implementing multiplayer on my new game, and instead of using my old Photon Demo files, Id love to set this up in PlayMaker instead, cos this time Im gonna need functionality that I dont currently have in the Exit Games files.

Im gonna need:

1. Different spawn position for each players.
2. Restrict the Room to MAX 4 players, (any above will create new room, also with max 4 players).
3. Remove (or not implement chat).
4. Give each player a different Player character model.
5. Have interaction between players work EXACTLY like interaction with a NPC, using multiple choice for conversations.
6. And er... killing each other after the period of cooperation is over..

 :)

Mark



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #61 on: November 07, 2012, 12:00:51 PM »
Hi,

 Thanks for popping here :) I am already aware of your requirements actually :) Tobias from Photon contacted me so that I can take over your case, as you wrote on their forum, so allow me to reply tomorrow, I'll need to test and validate few things before giving you a good reply.

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Photon Integration Beta [NEW beta2]
« Reply #62 on: November 07, 2012, 04:46:22 PM »
Wow, what service!!!

 :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #63 on: November 08, 2012, 06:24:41 AM »
Hi,

Ok:

As far as the next release ( likely official release ) of Photon Bridge to PlayMaker, I am not sure when it will be out, since I am not in control of this unfortunately. As I said, it's all ready to be shipped really. Currently the beta version you have is suitable and features everything, the next release is really about editor wizard enhancements and an easier initial setup of Photon and PlayMaker.

Now, to answer your points:

1: Different spawn position is something outside Photon scope of features, it's up to you to decide where to spawn a GameObject really. There are numerous ways to go about this and it really depends on what you have in mind. Can you clarify and give maybe give a use case? Then I'll be in a better position to propose something useful.

2: Regards limited the number of players in a room, this is accessible in the "create room" action actually:
https://hutonggames.fogbugz.com/default.asp?W903

You don't have to express yourself in terms of "rooms" in your games' interface or descriptions. "Rooms" is a technical terms, and you can use this room feature the way you want, it can become a chess party, where only two people can be playing, it can be a chat board, or a paint ball party with several players, your game can host numerous parties, and users can join the one they want.  It is really about separating your players the way you need, if two players have to communicate somehow, then they should be in the same room, that's the basic meaning.

3: Removing chat, is simply a matter of deleting the related Fsms. Photon do not implement a chat by default, it's been built for the demo and many other chat variants are possible, tho all relying on the critical action "BroadCast Fsm Event":
https://hutonggames.fogbugz.com/default.asp?W920

4: Same thing here, it's up to you how the character is shown on screen. Nothing hardcoded by Photon here. Typically, you will need a prefab for each different character, and all will pretty much need to implement the same principles that applies to the character demo, that is synchronising variables related to position, rotation, animation and possibly other features specifics to your game.

5: This is also something that you have create your self based on the building blocks available with Photon.

6: Killing a character is actually simply achieved by destroying the instantiate player. For this you will need to destroy the owner, all other network instances will follow naturally. But you need to really come up with a plan as to what happens when a character dies: does he leave the room, or is he still there, only not visible/active and some features can make it come back again. In this case, you will likely want a layer of abstraction between the presence of a user in a room and it's actual player, so that when dying the user do not leave the room.

Basically, it's all there for you to create the game and features you want, so maybe you should start independent threads on each of these features, and we'll try to get some more clues as to what should be done to achieve them. Here Playmaker and Photon do not have all these functionality built in, it's really important to understand that Photon and PlayMaker, just like Unity are providing building blocks for you to create your game features. All of what you describe is totally feasible, but very specific to your game, and it can't really be abstracted to something generic enough to become part of Photon, PlayMaker or Unity really. That's where your work starts and where the real deal comes in: to come up with features and a game that is unique.

Bye,

 Jean
« Last Edit: November 08, 2012, 01:31:56 PM by jeanfabre »

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Photon Integration Beta [NEW beta2]
« Reply #64 on: November 08, 2012, 08:13:21 AM »
Thanks Jean for the fantastic overview,

As you suggest, when I get home I'll start on this. First I'll just get Photon working using PlayMaker and then take each issue to a new thread, as I tackle it.

1. Is probably the most important, and will probably solve 4, 5 and maybe 6 in some way too.
2. Is done, as you said.
3. Is done.
4, 5, (See 1)
6. Im not sure of the functionality here yet. Maybe they Re-Spawn at their start point, all achievements reverted to 0. Or stay dead (For a shorter, more artsy game-play) with maybe "ghost mode", being able to view the resulting players finish what you started, and witness the Winners glory?

Off the top of my head I will be looking for ways to "count in" the players as they log in, and assign them Player ID´s. 1, 2, 3 and 4.

From then on I should be able to assign different properties to them dependant on the ID the character holds, from character prefabs to dialogue scripts, to found items.

Does this seem like the right approach?

Mark


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #65 on: November 09, 2012, 01:49:21 AM »
Hi,

 yep, tho you will have get all this information about ID's and roles before you actually instanciate the player really, but that's really trivial. You could have a more complex character set up that when instanciated is not yet assigned an actual visual appearence, and it's only in a second pass that you assign a role and a visual appearance, which would as well be a good set up to have "viewers" dead or alive, participating to the game or not.

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Photon Integration Beta [NEW beta2]
« Reply #66 on: November 09, 2012, 02:52:52 AM »
I'm afraid I was too tired after work to get going on this, but thanks for the confirmation that I'm on the right track... you said...
but that's really trivial.

Ha ha to YOU maybe!  ;D
A hint as to how would be great!

But I get the point... The division of roles needs to be done before we instanciate the player prefab.
I was thinking I might move this to later anyway, I need to get the connections as they happen, give them a role, and THEN I thought I would run a cut-scene (one per player... they all have different stories and different goals in the game.) Then at the end of the cut-scene, spawn them into the game at the last position of the animated version of their character.

To be continued...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #67 on: November 09, 2012, 04:38:36 AM »
Hi,

 ok :) for counting players you instanciate:

1: either you rely on the built in stat provided by Photon:
https://hutonggames.fogbugz.com/default.asp?W908

2: you want something slightly more reliable:
   -- have an arrayMaker list or hashtable
   -- everytime a player is instanciated, it calls in event to a fsm that increment the arrayList or Hashtable

 so for example, on your character prefab, you have a fsm dedicated to that, that when starting or when it knows its role, will simply add itself to that arrayList or hashtable( like "farmer": GameObject)

If this is still problematic for you, let me know, I can work out a small working sample.

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Photon Integration Beta [NEW beta2]
« Reply #68 on: November 09, 2012, 05:38:37 AM »
Im afraid you are right that I would need an example, but I hate to ask, I feel I have really overstepped the mark when it comes to the amount of help you have given me...
 :)

Hi,
2: you want something slightly more reliable:
   -- have an arrayMaker list or hashtable
   -- everytime a player is instanciated, it calls in event to a fsm that increment the arrayList or Hashtable

I dont know what an arrayMaker or hashtable is, are they Play Maker actions? I understand arrays theoretically, but not sure what you mean here.. sorry.

Quote
so for example, on your character prefab, you have a fsm dedicated to that, that when starting or when it knows its role, will simply add itself to that arrayList or hashtable( like "farmer": GameObject)

OK, this need a little clarification, I would have had 4 separate character prefabs and tried instantiating the one needed for the role they have been assigned, model, location etc... and within this prefab would be the separate functionality for the different characters.. you seem to be saying (but I may be misunderstanding you) that I only have one character prefab, but it handles all characters and all functionality? This seems a little difficult to manage, I would have thought that if the prefabs are kept totally separate, then as long as you get them into the game correctly, you then know that all other functionality would be correct. (The Farmer dialogue would not accidentally pop up in the Doctor dialogue?

Quote
If this is still problematic for you, let me know, I can work out a small working sample.

Anything you feel you have time for would be great!

I'm so thankful for your help Jean.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #69 on: November 09, 2012, 05:53:35 AM »
Hi,

 Don't worry, I am here to help :)

 Allow me few days, and get back to me mid next week if you don't hear from me ok?

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Photon Integration Beta [NEW beta2]
« Reply #70 on: November 20, 2012, 05:21:52 AM »
Hi
I read that now a player in Photon can change is currently region to have better ping and less latency.
Some games have that option already, like UberStrike.
Will gonna exista any acrion to control this feature? Like give ability to player choise is location?
Bye

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Integration Beta [NEW beta2]
« Reply #71 on: November 20, 2012, 07:50:50 AM »
Hi,

 Yes, this is something that we will be able to expose I think, I haven't checked this out yet, but should be very straight forward.

 Also, a new PUN update will likely be distributed within the next few days, I will then properly cover the latest additions, and make it complies.

bye,

 Jean

charmandermon

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Photon Integration Beta [NEW beta2]
« Reply #72 on: November 20, 2012, 11:09:47 AM »
Yes it should be easy as soon as unity approves the new update in the asset store.  I think photon submitted the new sdk.

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Photon Integration Beta [NEW beta2]
« Reply #73 on: November 20, 2012, 06:23:50 PM »
Thank you guys!
Bye

devotid

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Photon Integration Beta [NEW beta2]
« Reply #74 on: December 17, 2012, 01:35:41 PM »
I have been testing this with a unity car plugin and it works but the draw calls are 6x as high as a normal scene.  I'm only "synching" the position and rotation of "not mine" players.

My game is about 1200-1500 draw calls without the photon multiplayer on a highly detailed track......but when i instantiate the same "prefab car" into the Photon based scene i have 6x as many draw calls almost 6500!!!!

Any Suggestions.......?

If i could just get the same amount of draw calls that are in a regular scene it would be great.....am i missing something?

Thanks
Kevin