Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Orders
Orders Wed, 06 July 2011 23:03 Go 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 great Id refactoring is practically done, and the Intel file is well underway to being properly structured.

So, let's talk Orders now; Let's clear some ideas for it's future restructuring, if any.

Right now, the Orders file is nothing more than an updated State; it sends the state read from the intel plus any changes the client made. I was under the impresion that the idea was to change this to send some kind of order commands that the server would process, instead of merging each client's state to it's master copies and then process fleets, stars, etc.

Right now the server keeps a record of each client's valid state for the start of each turn. Due to this, It's easier for the server to check for errors and cheats than before, but it's not flawless. Checking fleet positions for example; it can be done but it would be awkward to loop all fleets and compare their coords for each player when reading their turns. We would need to do this for stars also, and for almost all of their fields, else a client can silently modify some data from objects and it would be merged into the server's master copies.

Ideally the client would send only commands like "add waypoint to fleet #xx", "remove item from star #xx's queue" or "activate mass driver on star #xx". There should be a dinstinct and finite number of commands a client can send... in fact, the amount of commands for Stars seems to be very small. I can think of this command "types":

  • Add/remove waypoint
  • Merge/split manually
  • Modify cargo manually
  • Add/remove item from production queue
  • Mark/Unmark a star for leftover resources only
  • Activate Mass Driver (could be waypointed since starbases are fleets)
  • Change research target
  • Change research budget
  • Add/edit/remove a design (edit could be a remove-add combo).
  • Add/edit/remove a battleplan
  • Change a relation


And that seems to be it... I can't think of anything else. So the list is pretty small to be passing the whole state down to the server.

This could easily be achieved with a bunch of concrete order implementations that inherit a base Order class.

Thoughts?



[Updated on: Wed, 06 July 2011 23:17]

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: Sun Apr 28 01:05:09 EDT 2024