playMaker

Author Topic: Problems with photon  (Read 8512 times)

MrChaos

  • Playmaker Newbie
  • *
  • Posts: 4
Problems with photon
« on: June 19, 2013, 10:08:48 AM »
Hi

I'm working on a MMO game with my girlfriend, and I really want to use playMaker for most of the functions in the game, but i'm already in trouble, I have been following these tutorials on the photon server / Client : https://hutonggames.fogbugz.com/default.asp?W860 & https://hutonggames.fogbugz.com/default.asp?W864

Everything is green, but when I hit play, it won't connect to my photon cloud server and it won't spawn my player prefab.
I know I'm missing something here, but I can't see what it is.

I would greatly appreciate some help to get me started :)

Cheers
Michael
Denmark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with photon
« Reply #1 on: June 19, 2013, 01:36:57 PM »
Hi,

 ok, first thing. MMO is ( I think ) not really recommanded with Photon Cloud and Photon Unity Networking since it's a "room" based abstraction of multi user. So you will find that over time, switching to a custom based photon networking solution will likely be the way to go if your MMO really gets into high CCU since the whole streaming and multi user networking technic is completly different than a room based system. You should get in touch with Photon support to clarify all this.

 Now, with your actual issue at hand, what does it says in the Unity console? the error that Photon or the bridge with fire is important for me to point you in the right direction.

bye,

 JEan

MrChaos

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Problems with photon
« Reply #2 on: June 22, 2013, 03:26:07 AM »
Hi Jean

This is the console I get with one of the tutorials :
set isMessageQueueRunning to True
UnityEngine.Debug:Log(Object)
HutongGames.PlayMaker.Actions.PhotonNetworkSetIsMessageQueueRunning:OnEnter() (at Assets/Photon Unity Networking/PlayMaker/Actions/PhotonNetworkSetIsMessageQueueRunning.cs:22)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:Start()
PlayMakerFSM:Start()

The MMO we are building is a chat MMO where you have an avatar and is walking around on an Island and are able to chat with other people, and alot more functions.
But if photon cloud server system isn't the best for this, what would you recomment that I use as server / client ?

Michael

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with photon
« Reply #3 on: June 24, 2013, 04:01:54 AM »
Hi,

 You should contact Photon to know what suits your needs best, their Photon Server solution accepts MMO for sure, but it's a lot more work to implement indeed...

As for the console, Is this the only thing outputed?Anyway for that message in particular, I guess you could be overlooking the message queueing feature:

 Read this, it explains what you need to do with message queueing, if not properly set up, you will have problem. I think this is your actual issue.

https://hutonggames.fogbugz.com/default.asp?W864
https://hutonggames.fogbugz.com/default.asp?W860


If that still doesn't make sense or not working, let me know.

bye,

 Jean

MrChaos

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Problems with photon
« Reply #4 on: June 26, 2013, 06:03:19 AM »
Hi Jean

Those links you post in your last post, are those I have been following and that is those I have problems with :)

Yes what I pasted in above, is the only message I get in the console :)

The reason we wanted to use the photon cloud server solution is that, we dont want the server running on a computer in our home, I have been looking into the photon server that you run your self, but our internet connection and the price of running your own server from home is to great, so that is not an option :)

Cheers
Michael

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with photon
« Reply #5 on: June 26, 2013, 06:31:42 AM »
Hi,

 So yes, you must properly turn on and off message queuing else it will simply fail. Have you succeeded? or do you not see how to implement it in your own logic?

bye,

 Jean

MrChaos

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Problems with photon
« Reply #6 on: June 27, 2013, 04:47:09 AM »
Hi haven't succeded with the small tutorials that I have been following, but I have almost succeded with my own server client setup.

Now I can :
Start a server
Connect with clients to the server
Stop server

But I can't figure our how to do it so that I don't control all the clients at the same time.
When I move one client around, all the clients move :)

So, so far so good :)

Cheers
Michael

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with photon
« Reply #7 on: June 27, 2013, 07:11:30 AM »
Hi,
 
 Very good.

 the typical reason why you control them all ( IF indeed you instantiate each player really on each of the running instances, and not all from the same running instance) is that you don't turn off the control behavior on the player you shoud not control.

so, in the player fsm, you need to check if the photonView is "mine" or not, and if it is not, you MUST disable user input management, AND find other way to let the network control it, either via a photonNetworkView that snyh the gameObject transform or by feeding fsm variables over the network and writing to it is it is "mine" and reading them and forcing the player values if it is not "mine"

check the player prefab on the playmaker photon demo, it shows how to do the "is mine?" dance :)

bye,

 Jean