Multiplayer Item Duplication Bugs

    Joined
    Jul 26, 2013
    Messages
    2
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    The Problem



    Due to the tendancy for servers running the current version of Starmade to have unexpected lag spikes, client to host transmissions may result in catastrophic issues with the current inventory and money systems.



    Because there is no (to the best of my knowledge) inventory debug built into the MP files for starmade, lag from neumerous sources can be used to duplicate or delete (by quickly placing and destroying blocks), make multiple or impossible purchases from shops, (server data reads your attempt to purchase items multiple times instantaneously as valid, completly ignoring the coding stating that shops only sell "X" amount of items), and subsequently selling items repetedly (The same thing as previous, but in reverse).

    How do we fix this?

    Item duplication by spamming might be solved by creating a limiting factor on servers as to the amount of blocks placable within a set unit of time. Similar to the Minecraft version of "Anticheat" or "NoCheat+", it would simply delete all attempts for a player to place more than "x" blocks in "y" time.

    While a perfectly valid solution, this addition may cause the problem of "Ghosting" blocks or inventorys, wherein the client incorrectly reads the amount of items in a players inventory, or reads blocks existing where none are read in the host. At the moment, with no form of effective managment of such errors, ethese incompatabilitys could have unpredictable effects ranging from crashes, loss of server support to client (essentially a server error, which kicks a erraneous player for having invalid transmission data), loss of worlds, more duplication or deletion bugs, or nothing at all.

    How do we fix the shops?

    In all actuality the solution is very simple, just modify the shop data so that it is impossible to make more than one request for items if the CLIENT reads the shop as not having any in stock, likewise, modify the client to "Delete" said items that were sold, making it impossible to sell them again. (currently the items remain in the client inventory until the server reads the deal as being made, oftentimes allowing players to sell the items two or three times before the server "Purchases" them.



    I am always happy to learn more about up and coming gaming code and reccommendations, please feel free to post CONSTRUCTIVE feedback and information to fill my neumerous gaps in knowledge about this wonderfull game.

    -Archytypus
     
    Joined
    Jun 28, 2013
    Messages
    105
    Reaction score
    0
    A list of processes that the server must accomplish. Such as: Client, within one Server tick, pulls out the item from the inventory, puts it back in, and pulls it out. It will make a list of two client pulls, the first will go and check everything before moving on, then everything gets set for the first client pull. Everything has been set okay, and then the process will then remove the item from the inventory. The process will s tart again, CHECKING if the item is in the inventory, but doesn\'t see the item. Thus, the item will not be pulled a second time.
     
    Joined
    Jul 26, 2013
    Messages
    2
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Thank you CrusaderDeleters

    While this is the basic concept that I intended to convey, you phrased it in a much simpler way.

    -Archytypus