playMaker

Author Topic: beginer photon question... [SOLVED]  (Read 2675 times)

bizilux

  • Full Member
  • ***
  • Posts: 171
beginer photon question... [SOLVED]
« on: October 26, 2013, 07:10:31 PM »
hey all

so i've been playing around with photon and playmaker a bit and i downloaded that DemoWorker tutorial and read quite a bit of documentation...

then ofcourse i wanted to sync cube instead of player... so i made button that rotates cube when its clicked... works fine ofcourse in singleplayer, but the cube wont rotate for other player...

on that cube i have the same FSM as it is on player prefab... i copy pasted it onto cube...

what am i doing wrong? there must be some really basic thing that im doing wrong right?...
« Last Edit: October 28, 2013, 08:49:48 AM by bizilux »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: beginer photon question...
« Reply #1 on: October 27, 2013, 03:32:16 AM »
Hi,

 ok few things:

-- do you understand the concept of PhotonView and do you have this component on your cube to begin with?

-- do you see the cube on both instances?

-- what is your technic to synchronize the cube across the network? in short what is your photonView target? and if it is a fsm, do you properly read and write on a "networked synced" variable to maintain the rotation information?

Bye,

 Jean

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: beginer photon question...
« Reply #2 on: October 27, 2013, 04:09:06 PM »
i have photonview on object, (check attachment)

i just dont know if its configured properly?  i dont even know if i get the concept of it... i mean i know that  each object that is part of multiplayer needs to have photonview script on it... but i dont know if you need to configure it some more...

yes i see the cube on all instances, but the cube doesnt rotate on the second one... meaning something isnt configured properly...

that last question... i dont really get it, im just such beginner in photon :S

basically what i did was, i took ur demo of demoworker, i think it was you who wrote it...
and then placed cube in scene, and copied FSM from player prefab onto cube... that was it, and actually i would be surprised if it was working... i just need to somehow get better with photon, but i dont want to write  any code :/  i want to use playmaker, but for that i need some kind of tutorial and as far as i know there aint none... so yeh not that ideal situation... but ye life is far from ideal hehe :)


some video tutorial or something would do wonders here for me, and probably for others too... i guess i'll just have to start with regular photon tutorial videos first, and then kind of connect it with playmaker when i will grasp the fundamentals of photon better

how would you suggest someone to learn photon with unity? without actually coding the stuff but rather doing it with playmaker...
i know start at cube and so on, i did lol and it aint working... i need to start at even simpler things i guess... and to be honest docs on hutonggames arent really that helpful, its just so complicated for beginner like me :S
« Last Edit: October 27, 2013, 04:21:34 PM by bizilux »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: beginer photon question...
« Reply #3 on: October 28, 2013, 01:45:06 AM »
Hi,

 You need to read Photon documentation, over and over again, there's no real escape here... :) Then You need to spend time on the demo and understand each state and each action, why it's here and what it does, if you have questions aloong the way on this, don't hesitate to post here and pm me if I missed it.

 PhotonView is the component that glue your gameobject to the network, it has an "observe" property, which should be either your transform for an automatic synchronization of the transform over the network OR a PlayMaker FSM where you have some variables set to "network sync", which you then read or write depending on if you are the owner of this photonView or not.

 That's the basic, study the demo character controller, and understand how it is controlled, that's the most important thing to get right now.

Unfortunatly, there isn't any video or screencast on this yet.


bye,

 Jean

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: beginer photon question...
« Reply #4 on: October 28, 2013, 08:49:27 AM »
fuck yea! i opened this tutorial http://doc.exitgames.com/photon-cloud/Marco_Polo_Tutorial/#_Toc317517583
of that marco polo game... and then opened list of events and list of actions on playmaker... and just kind of went along that marco polo tutorial... and even though tutorial is in code, you can easily find appropriate actions and events in playmaker and just do it in playmaker instead of in code...

so yeh cube is synchronized :)
man it feels good... even though its just a cube, it feels so good... i mean daaaamn its multiplayer... that sounded like science fiction just couple of days ago :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: beginer photon question... [SOLVED]
« Reply #5 on: October 28, 2013, 08:52:00 AM »
Very good!

 keep at it, this is the only way to learn!

I was very careful to follow as strictly as possible Photon naming and vocabulary, so I am glad it was useful, indeed reading the tutorials is critical, even if in pur code, cause as you found out, you can always find the appropriate playmaker action, and if not, ask on the forum on that particular case and progress step by step.

 Bye,

 Jean