Windows C++ Setup Tutorial?

Options
Reborn121
edited November 2014 in Native
Could anyone direct me to/create a setup tutorial for Photon Realtime? Just the basics, I can't seem to find anything on how to setup a basic project. The API Documentation only offers what a handful of commands do.

Thank you.

Comments

  • Kaiserludi
    Options
    Does this help?
    http://doc-api.exitgames.com/en/realtim ... 00005.html

    Aside from that page the demo should also be helpful.

    If you still have questions, then please tell us what exactly you are having trouble with.
  • Thank you for the reply.
    Yes, I have linked the libraries and whatnot. The problem is I'm not sure where to start, I have looked at the demo, but can't seem to figure out what it is actually doing. For example, where does it create the LitePeer? I found where is actually connects, with the connect() function, but I can't find the "Workflow" as this pages http://doc-api.exitgames.com/en/realtime/current/cpp/doc/html/a00012.html defines it.

    I also tried to use this page: http://doc.exitgames.com/en/realtime/current/getting-started/realtime-intro but it seems that the c# and c++ namespaces/class/functions are different.

    I just generally don't know where to start.
  • Kaiserludi
    Options
    Hi Reborn121.

    Well. That workflow is for using a LitePeer instance that connects to a PhotonServer, which runs it's default application Lite.
    As Lite is only supporting a single game server, it is not used on our photon Cloud, where Photon Realtime is running. There the server side Photon LoadBalancing application is running, which supports multiple servers. To connect to LoadBalancing instead of Lite one has to use a LoadBalancing::Peer instead of a LitePeer on the Client side.

    Normally one doesn't directly use a LoadBalancing::Peer, but a LoadBalancing::Client, which internally uses a Peer, but provides a higher level interface than Peer itself and already takes care of a lot of lower level stuff for you like switching servers when joining or leaving game rooms (the lobby, matchmaking functionality, etc. are located on the master server, while the actual ingame networking takes place on dedicated game server machines).

    In NetworkLogic.cpp around line 75 in the Networklogic constructor demo_loadBalancing constructs its LoadBalancing::Client instance.

    Contrary to LitePeer, LoadBalancingClient uses dedicated callbacks for pretty much everything. They are declared in LoadBalancing::Listener and implemented by the demo in NetworkLogic.cpp. The callback function names should be pretty much self-explanatory. For example connectReturn() will get called to notify the app about a successful connect, createRoomReturn() will inform you, if a call to opCreateRoom() has been successful, and so on.

    You can find the demos flow-control in NetworkLogic::run(), where it processes input, connects to Photon, creates, joins or leaves a game room and also sends ingame dummy data and calls service().
  • Thank you very much, that clears a lot of things up. I will take a look at all of that.