Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

What does CCU mean?

Discussion in 'Multiplayer' started by yoonitee, Jan 17, 2014.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    I was looking at the Photon Networking and it says its free for 20 CCU.

    So if I have a game which has a maximum of 8 players but there are 3 games (rooms) playing in the world at one time so 24 players altogether does this count as 3CCU, 8 CCU or 24 CCU?

    Because I can't have my game say to people "the world has exceded it's CCU play later."

    20 CCU seems like nothing at all. It would be better to pay $5 a month for my own virtual server do you agree?
     
    Last edited: Jan 17, 2014
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    CCU is concurrent users worldwide for that game id/account. It's actually more than you think because people drop in and out of games on a constant basis. If you're on a shoestring budget, use TNet instead. Otherwise stay with Photon with 20 CCU during dev and scale up as needed.
     
    jeffersonrcgouveia likes this.
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    I don't think 20 is enough.
    Because most users will be in the same country and mostly play at the same time. Usually about 6pm when they finished work.
    So if I'm selling enough games to make a profit there would surely be at least about 10 rooms open at this time for up to an hour. Even though the rest of the time such as at 4am there will be virtually no rooms open.
    I'm making a racing game where users would probably stay in the room for the completion of the race, several minutes at least.
    I will look at TNet.

    Also, all I need is a matchmaking service which I don't see why there would have to be a limit of CCUs.
     
    ali_hasnain likes this.
  4. dhruvc

    dhruvc

    Joined:
    Apr 19, 2013
    Posts:
    51
    UsmanERA likes this.
  5. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    That looks interesting!

    I would like to know how to estimate the number of messages for example if I just used this for matchmaking. Do you have any stats?
     
  6. dhruvc

    dhruvc

    Joined:
    Apr 19, 2013
    Posts:
    51
    We don't have any statistics on this as it differs for every game and scenario. Matchmaking case is easy - the client will

    send a request joinRoomWithProperties
    receive a response
    if (success) -> join that room else (create a new room)
    receive a response

    Thats 4 messages if there was an existing room with the properties you wanted. Else 6 messages if you end up creating a new room.

    From there on for game play - you'll need to subscribe to the room and every message sent and response/notification received from the server are counted.

    I'm curious why you'd only use it for matchmaking?
     
  7. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    dhruvc -

    I haven't looked at how the other providers do their implementation but it seems to me there should maybe be a better authentication scheme setup that maybe leverages some kind of signing... looking at your demo scenes it looks like the connections require both the API and Secret Key meaning that your secret key has to be exposed within your distributed application.
     
  8. dhruvc

    dhruvc

    Joined:
    Apr 19, 2013
    Posts:
    51
    The secret is in fact used to sign when sending messages to the cloud server (like a password). It is not sent on the wire - so anyone snooping on your game's traffic will not be able to use your application's credentials and connect with appwarp cloud :)
    Other cloud providers simply rely on a unique app id (with no signing key) like Photon to segregate traffic. In some cases (REST based cloud services) I've even seen the secret key being sent across on the wire.
    For apps that require even more control over authorization of clients - we recommend using AppWarpS2 which is our on-premise game server. It allows developers to customize how the server side authentication is done thereby giving full control over admission.
     
  9. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Yeah I figured it was. :) I was just wondering if you provided an option to not store the secret key in the application since it can be decompiled and discovered. Amazon's web service authentication works in a similar manner but the SDK doesn't compute the signatures automatically for you in every case.

    You may want to think about a system that allows authentication to be performed and then hashed separately with the secret key to create an authorization token to be used for requests. That token would have an expiration and have to be regenerated once that expiration hits. This would prevent people from scraping and reusing those auth tokens.

    When working with Amazon S3 from a class library I created for Silverlight a few years ago, I separated out the hash from the canonical signature generation and gave users access to the unsigned string. I provided separate code to do the actual hashing and encouraged users of the library to sign the requests via a separate authenticated web service call so as not to expose their secret key within the application.

    This becomes a little more difficult with real-time communication in which a lot of requests have to fly back and forth which is why I suggested an authorization token with an expiration. Certainly not knocking your service, it looks pretty cool and secured better than most I've seen. :) Just throwing out some ideas for you.
     
  10. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    For indies, it's only $9 / month for 100 CCU. That should be fine for 10 rooms and I don't think it's too expensive if you actually sell your game. It includes hosting and all the features we built so far.
    Tip: Alternatively you could buy the PUN+ package and get a free CCU upgrade - even if you don't need the Android / iOS exporting with Unity Free.


    How do you sync the in-game data?
    Definitely have a look at solutions without a dedicated server. You will notice that each has additional issues with the network connections because you can't connect to all mobile devices at will. If the host drops out of a game, the other players will also lose their game.