Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Orders
Re: Orders Wed, 20 July 2011 17:34 Go to previous messageGo to previous message
Musmuris

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

Messages: 96
Registered: June 2011
Just had a thought on this idea which makes me happier with it... and makes it easier to make it an incremental change.

The Orders would presumably have base class to derive from, then you'd have (e.g.) WaypointOrder, or maybe more specific like WaypointAddOrder etc. inherit from that.

The orders base class could then have an ApplyToClientState method - passing in an existing state and the order modifying it for display.

This means that we can go through the user actions making orders and moving any client state changes into the specific order Apply method.

Orders can be then saved to disc, and on re-start if it's the same turn then the old state loaded and the orders re-played in memory to bring it up to date. This also adds an inherent undo mechanism.

Don't know why I didn't all see this before like I think you were trying to tell me.


Orders on the server are done in a certain order aren't they? So this may not work in the same way server side - but the client side changes can be made, and "submit" then can still save the new state to the orders file as it is now alongside the new style orders - and then we can start on the server side changes!

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:24:05 EDT 2024