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
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