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 08:17 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
Alrighty then.

I was thinking of adding a collection to ClientState which holds Order objects. We simply add/remove them there when needed.

Order would be a common interface or base class, and there would be concrete implementations; WaypointOrder, ProductionOrder, MergeOrder, RenameOrder, etc. Or separated by a Type variable.

Showing state+orders is the trickier part. I can think of two things right now.
Parse the orders after the state, which would be similar to what the server should do. They could use a common order parser, or do it on a per case basis on the client.
Or, hold two state copies on the client, the initial and an updated one, and for each change we both update the state and issue and order. The client sends only orders down to the server, and discards it's changed state each turn in favor for the one on the intel. This feels terribly redundant, but could be easier than the first approach.

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, that's why I'm mostly against sending state to the server. But, as always, I'll go with the majority vote, if for whatever reason implementing orders turns out to be unfeasible.

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 15:42:16 EDT 2024