Unreal Engine SDK Demo - LoadBalancing-cpp
Options
Hi! I've downloaded the demo for Unreal Engine SDK and I don't understand what exactly the LoadBalancing-cpp is? I guess it acts like the server it's that right? I saw the demos and all servers were created using C# but Unreal Engine it's using C++. Can you describe me how the PhotonParticleDemo works because, to be honest I am a bit lost. Thank you!
0
Comments
-
Hi @Insane.
LoadBalancing-cpp is part of the C++ Client library.
The C++ Client library currently consists of 4 parts:
Common-cpp - data types and utilities
Photon-cpp - Photons core networking API
LoadBalancing-cpp - a high level API on top of Photon, which adds room-logic, properties, multi-server handling and a lot more
Chat-cpp - a high level Chat API on top of Photon
The former two are closed source, while the latter two are open source.
The game app code would normally interact with the LoadBalancing API
PhotonParticleDemo uses LoadBalancing-cpp and connects to whatever Photon server address one specifies in the connect() call. If not address of a custom Photon Server is specified, then it defaults to the Photon Cloud. In that case you need to specify a valid app ID from https://www.photonengine.com/en-US/Dashboard/Realtime.
After a successful connect the demo then tries to join a room and creates a new one if it can't find one. Inside the room it is then sending position updates to other clients that have joined the same room.0 -
What if I want to use the PhotonDemoParticle with a self-hosted server instead of the photon cloud? I saw that when you start PhotonControl it's an option after you right click on the icon with LoadBalancing(My Cloud) ->Start as application. What happens if a start the LoadBalancing(My Cloud). It's deploying a server on my local machine on which I can connect from PhotonDemoParticle or whatever client? It's that true?
Thank you very much for your time0 -
Hi @Insane,
yes that's true. You can start the LB example server locally and provide the address of your local server to the PhotonParticleDemo. That should do the trick.0 -
Hi @Insane.
Yes, start the server as app or install and then run it as a service (the latter will autostart after a computer restart). Now a Photon server instance is running on your local machine to which any Photon client can connect.
In PhotonDemoParticle look for the connect call and supply it's IP as address and set the server type to master server. The demo should now successfully connect to your local server.
If you want to reach the server from other devices, make sure to setup your firewall accordingly and to set the game server ip config in Photon Control to public (afterwards restart the service/app).0