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 09:32 Go to previous messageGo to previous message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
Currently the whole UI is driven from the client side state and changing that would be a PITA. Having 2 states is an option, and then we'd have to modify the code everywhere to add orders.

Of course there may be orders that change previous orders, e.g. you re-split a merged fleet, or you delete all a fleets way points and re-add a load more. And then do the same again. No problems really of course as you can just grow the list of orders indefinately as each one must make sense if you play them back in the same order.

Another option would be produce orders from the old and new states. I.e. the client would just udpate a new state and then on submit it would work out the orders needed to transform one to the other. However in this case the server would need to verify it all anyway so the client may as well send all it's state over and have the server work out the orders.


In fact that's a better way to think of what I'm suggesting. The Server doesn't just take the state the client sends as the The Truth. It looks at the OLD state it sent and the ORDERS state it gets back and essentially generates what orders were made, checks they are valid, and applies them to the OLD state to produce a NEW state for the next turn. (It probably never actually produces a List<Order> as it were, but that's logically what it's doing). Does that now make more sense of what I was suggesting?

Aeglos wrote on Thu, 07 July 2011 08:17


The key thing that i'm holding on to is the principle that we shouldn't trust anything that comes form the client; we should expect it to lie, cheat and malverse it's state and orders every time


Absolutely agree - we have to assume the client is going to cheat as someone will, which is why I think of the server working out the orders on the fly and checking them,

Aeglos


But, as always, I'll go with the majority vote, if for whatever reason implementing orders turns out to be unfeasible.



Likewise I'm happy to be persuaded either way, or go along with any decision made. There is some level of pragmatism in what I'm suggesting given where we are in the code base. If we were going from scratch then it may be a different discussion Smile




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 16:55:43 EDT 2024