How to connect photon server with Marmalade c++ Front end?

edited February 2014 in Native
hi,

I run the photon server at my machine, also did run Testclient, this part is working fine.

I downloaded Photon-Marmalade_v6-5-5_SDK.

run the helloworld_cpp project, it's working fine. but the communication is only with one client i.e. whatever this app send coming back return to it.

Now I want to do the same for two say hellpworld1_cpp & hellpworld2_cpp, where one will only send data & other will only received the same.
I have stop receiving data at hellpworld1_cpp by commenting out inside PhotonPeerEventAction function.
I know I need to do some changes at server side, can some one help me out how to do it?

once this done I can think of actual implementation of it in the game.

Comments

  • Hi Paresh.

    I don't see a need for any server-side changes, as long as you just want to send some data from one client to another one, without letting the server do anything special with that data.

    If you want to change the helloworld-demo to let one client send and the other receive, just let them both join the same room, then let one client call LitePeer::raiseEvent() without specifying any receivers (in that case, the server will route the event to all clients in that room except the sending one, which in the case of 2 clients means, to the receive-only client). Next step you comment out the calls to raiseEvent(9 in the receiving client and you are done.
    You can comment out the part in the eventAction, which handles custom custom eventcodes, if you want, but as the other client isn#t sending anyway, this is not really needed.
    However, you should not just comment out the complete eventAction, as standard LiteEvents Join and Leave are still interesting for you, as they tell you, when the other clients joins and leaves the room.

    I recommend, to have a look at the other C++ demo in the Marmalade Client SDK for an example of communication between multiple clients. The hello-world demo is really basic for an easy start with Photon. It even let the client send events to itself, so that you only need to start one client. The other demos in the client SDK however will send events to other clients in the same room, so that you will need to start two clients (not necessarily both Marmalade ones), but you can get a better understanding on how to work with Photon.
  • thanks for your reply... i will try it out & come up with new queries :D
  • thanks, it's working fine now...
  • Glad, I could help :)
  • with your help I have made a simple demo application using photon for message transfer.

    Now I want to use lite lobby application for card based game, but need to do some changes at server side. I have gone through ..\Photon v2.ExitGames-Photon-Server-SDK_v2-6-11-1647\src-server\LiteLobby application & made some changes there but I am facing trouble running it. don't know how to make changes work on server side.

    does i have to change anything in ..\Photon v2.ExitGames-Photon-Server-SDK_v2-6-11-1647\deploy\LiteLobby\LiteLobby ?

    it will be great help if you can guide me how to make changes effective.
  • - Build your changes in VS with the .sln from the server SDK
    - Go to ./src-server/LiteLobby/LiteLobby/bin
    - Copy all files from there into ./deploy/LiteLobby/bin
  • thanks...
  • Hi,

    I am having some problems to implement the marmalade client for the photon server.

    I can not find a simple example. I have downloaded the load balancing example but that is more complex. I would be interested in the hello world example.

    Can you please provide a link or the code for that example.

    Thank you
  • Please see my answer here:
    viewtopic.php?p=16738#p16738
Sign In or Register to comment.