Search Unity

Is "Got in Online Mode" flag tracking per item a good way to go to prevent cheating about items?

Discussion in 'Game Design' started by No3371, Feb 19, 2017.

  1. No3371

    No3371

    Joined:
    Dec 1, 2016
    Posts:
    42
    I'm new to game design and is considering a lot of mechanics of a multiplayer (or multiplayer-based and server-based mixed) game, the topic of this post is about "Preventing ineligible items circulate in player community".

    Let's say, a game which can run in Online Mode / Offline Mode, players can only meet and interact with each other in Online Mode, and so have the chance to access others' items (e.g. examining item detail, trading, using items on others) only in online mode.

    Every item instance has a flag "Got In Online Mode", and this will be set to true only when a player get a item when connected to server and successfully uploaded the item data.

    (Behind the scenes we separately count 2 numbers for every stackable item type that player owned, which are Got In Online Mode or not. )

    When playerA try to trade with playerB, they can only transfer items that are Got In Online Mode, otherwise they can't even see it, because only validated (by server) items' data can be sent to the other client.

    Is this a usable pattern? What kind of technique can break this protection?
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Why not completely break online mode from offline mode? Worked well for games like Diablo.
     
  3. No3371

    No3371

    Joined:
    Dec 1, 2016
    Posts:
    42
    I'm planning a rouge-lite that happens in a world that consist of static sites (Cities, towns, etc.) which act as gather point, and "Wild" area which people go inside and generate their own level instance to explore or fight.

    In order to meet people, players have to visit static sites and join online (there are always at least 1 instance of each static sites running on server)... So it's not just "singleplayer" or "multiplayer".

    Though, this is just a fresh concept, I'll be glad if anyone can share thoughts about this idea! :)
     
  4. PatrickHedges

    PatrickHedges

    Joined:
    Oct 6, 2013
    Posts:
    4
    This is actually how the game I'm working on is going to be set up. Players meet in towns, then adventure out in groups into instanced zones. I really liked the way they did this in Guild Wars.

    I'm planning on using PlayFab for item management, as well as other aspects of the game. Players have to be logged in to the game to get items or trade them with other players. It also lets you view the player's game history, so you can see when and how they acquired different items.

    It sounds like something you might want to look at.
     
    No3371 and Ryiah like this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Sounds good to me. Nothing should break it as long as you only allow the server to modify the item.

    GameSparks is popular too.
     
  6. No3371

    No3371

    Joined:
    Dec 1, 2016
    Posts:
    42
    Interesting, I don't know much about back-end services, gonna take a look.

    Does that means all items data have to be generated by server? Since player can choose to stay offline, items have to be generated by client side, but will only be verified when
    1. The player is connected
    2. The item's properties are reasonable
    Will this be easily broken?
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    No. Only the online item.

    Basically anything the client has permission to create or modify will be breakable. For best results you need to generate and store the online items on the server. There might be some way to store only the flag on the server and a UUID representing the item but that might be risky.
     
    No3371 likes this.
  8. No3371

    No3371

    Joined:
    Dec 1, 2016
    Posts:
    42
    Cool, the server has to take over all item generating when the client is connected... I'll try this way.
    Thanks!
     
  9. GameSparks_Clare

    GameSparks_Clare

    Joined:
    Feb 7, 2017
    Posts:
    37
    Ryiah likes this.
  10. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Editing the object locally and setting the "gotOnline" flag to true.

    If your game can read and change the local file, any sufficiently dedicated player can also read and change the local file. The core rule is "the client is in the hands of the enemy; never, ever forget this." Anything you want to be secure, you must put on the server, but then you still have to secure the server. Putting it on the server isn't magic.

    I don't have any dog in the fight when it comes to people who offer services for this sort of thing, but I do know that instead of trying to secure your own server... it is usually much smarter (and cheaper, and faster, and better) to hire someone that secures their server for a living.
     
    No3371 and Ryiah like this.