Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Orders
Re: Orders Fri, 08 July 2011 05:51 Go to previous messageGo to previous message
Musmuris

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

Messages: 96
Registered: June 2011
I agree if we were designing from scratch we might do it that way. But I think it's a lot work from where we are for a team with not that much time (look how long it's taken to get to this point)

Also one thing with generating orders which tries to keep state in 2 places the same usually runs into problems when something get's missed and the states get out of sync. This is absolute <explitive deleted> nightmare to debug, and I speak from bitter experience. Having a state to say "make it look like this" is then much easier to compare and see where the issues are.

So I'm saying the opposite about maintainablity Wink

That said... having an undo list is attractive. In this case every action that can change the state would do so by creating an "action" on the orders list - such that taking the original state and applying that action leaves you in the new state. Also an action has to know how to UNDO itself, by either crudely caching the entire previous state, or at least know what to change back (e.g. for a waypoint change record the previous waypoints).

This way the client state is always LATEST and can be displayed as it is now, and orders can be undone, redone and sent to the server. There's the added bonus that you can display a list of what a player has done as well this turn.




[Updated on: Fri, 08 July 2011 05:51]

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 21:44:45 EDT 2024