purpose of backgroundGames queue in xamarin cloud sample


Could someone tell me the purpose of the backgroundGames (Queue) in Demo.cs? Really I didn't understand.



  • The idea is that you can simulate more than one client in the process/app, so there is some activity in the game, even if you only run one client. Those are the backgroundGames.

    It's not relevant in terms of showing how to work with Photon.
  • One more thing about the demo project. An originatingPlayer is used to update the status of the player which sent the EvPosition or EvColor events. Is this necessary to update the specific originator player in local gamelogic? Because in the MainActivity all the users are already being drawn with their updated position values.

    lock (mainActivity.demo.LocalGameLogic.LocalRoom.Players) { foreach (ParticlePlayer p in mainActivity.demo.LocalGameLogic.LocalRoom.Players.Values) {

  • I think this is just showing how you would get the sender of events in general. If you need those, depends on your code. The demo maybe doesn't make use of it but it's sure good to know how to read the sender.

    Best about the sender/origin: It's set implicitly and in a lean way.
  • Thanks for answers Tobias. Sorry but I am new to multiplayer development.