Racing game

Options
KakCAT
edited December 2012 in Photon Server
Hi!

I have a little question about Photon Cloud... I think I know the answer (which is no) but I haven't digged deep into the documentation to check if it's possible or not.

I want to do a simple online racing game:

All the users "pool" into a room and start a game at fixed intervals (in example, a game is started every 2 minutes).

The race starts. Every second, every user sends a message to the server telling how much space they have moved.

The server takes all the results, sort them, and sends back a message to every user telling him in which position he is. (there's no need for me (as a player) to know everybody's position, just mine ).

Keep going i.e. for 90 seconds. Then race ends, a list of records is sent from server to clients.



Can Photon Cloud be used this way, or I just should have to hire a dedicated server?

Thanks a lot!
KakCAT

Comments

  • Tobias
    Options
    Sorry about the late reaction. I hoped my server colleagues would pick this up earlier.

    What you describe is possible if you modify the plan a bit. Because:
    Aside from being a fully managed service (obvious), the Photon Cloud also has a fixed feature set and can not run your custom game logic (an interesting feature but not easy to get right).

    I think you should be able to re-arrange things a bit. If everyone just sends his progress, every client could also compute the positions. So the server is no longer required to do something special. It just passes events from client to client, which is what it does best :)

    About your matchmaking:
    We usually think that players want to play asap. Our preferred way to make matches is: Try to join a random room and create one yourself if that fails. A player waits for another in a created room until someone joins.
    http://doc.exitgames.com/photon-cloud/M ... references

    Players who just want to chat a while can join a special chat room. As this is a regular room, you can also come up with special events to challenge others and then make players leave for their challenge room (by room name).
  • demo and currently have it working fine on a cloud server but its using the lobby system and I want it that the room is perm on so anyone running the game will just join and be in the same room without someone having to setup the room (for an MMO).
  • Hi Tobias,

    thanks for your answer. Unfortunately I'd prefer that the server would process all the data, as all clients (it's a mobile game) would receive lots and lots of packets when they don't need it. If I'd restrict the rooms to a certain amount of users it'd be feasible but I'd prefer having all users in one room. (and an assumible amount like 1000 CU would mean 1000 packets for every user every second... I don't think a mobile could handle that)

    I already thought that it was not possible because of the custom game logic (I just wanted to confirm it)
    Tobias wrote:
    Sorry about the late reaction. I hoped my server colleagues would pick this up earlier.

    What you describe is possible if you modify the plan a bit. Because:
    Aside from being a fully managed service (obvious), the Photon Cloud also has a fixed feature set and can not run your custom game logic (an interesting feature but not easy to get right).

    I think you should be able to re-arrange things a bit. If everyone just sends his progress, every client could also compute the positions. So the server is no longer required to do something special. It just passes events from client to client, which is what it does best :)

    About your matchmaking:
    We usually think that players want to play asap. Our preferred way to make matches is: Try to join a random room and create one yourself if that fails. A player waits for another in a created room until someone joins.
    http://doc.exitgames.com/photon-cloud/M ... references

    Players who just want to chat a while can join a special chat room. As this is a regular room, you can also come up with special events to challenge others and then make players leave for their challenge room (by room name).
  • Tobias
    Options
    If you have 1000 clients in one room and everyone sends something, then it's likely to fail, true. In worst case, even in chat, 1000 users can send a message at about the same time, so it's not guaranteed to work (bandwidth wise for mobiles), even with just chat.

    Whenever 2 players race each other, they should leave the chat and get into a new room. This prevents flooding of events in the chat room.
    Alternatively you could send position updates to specific other players. This way, each player only gets one other player's position updates.

    Hope this helps,
    Let us know how you go on :)