Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Orders
Re: Orders Thu, 07 July 2011 06:31 Go to previous messageGo to previous message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
The problem with that approach is that the client shouldn't modify it's state at all; it should just tell the server to modify it instead, otherwise it would force a lot of checking server-side for valid values since those changes are not under the server's control.

For the split/merge it would need to check not only the amount of ships and cargo, but also the cargo composition, else the client could magically change colonists into ironium. It would have to check each ship and it's components lest they changed, their individual damage amounts, etc, and see if it all matched the previous fleet values.
The other option of the server just cherry picking which variables to update fails for cases like split/merge where almost all of the values need to be updated.

For the production queues something similar happens, it would have to check each production item's data individually. Consider this; a client which has an item at 50% production edits his orders so that it's at 70%. The server has to check each item to see if the progress has changed, and only allow for decreases in progress, in case someone for example, removed that 50% item by mistake and then added it again, reseting it to 0%; it's a valid order that the server has to accept, so it would need to check all items for special cases like that where some changes are allowed and others not.

It just feels easier to send to the server "merge fleet Y & Z" or "add item to X stars queue", where the checks would be far less. Merging/Splitting would need only to check for same owners and same position (not even nessesary for split) since the server is sure the fleet data has not been tampered with. Production queues would only need to check for component/design availability and star capability. Waypoint modifications would only need to check owners, and if deleting, that the waypoint exists already. (Since editing is simply a remove-add combo).



Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Waypoint System
Next Topic: More Testing
Goto Forum:
  


Current Time: Sat May 11 09:26:15 EDT 2024