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 19:53 Go to previous messageGo to previous message
evild00d is currently offline evild00d

 
Crewman 2nd Class
Stars! Nova developer
Stars! Nova developer

Messages: 14
Registered: July 2009
Location: Norway
This is an important architectural decision so getting it "wrong" just means that changing it later will cause a lot of pain. I don't like pain Crying or Very Sad I just want stuff to work Smile (like it's that easy)

That said, I'm very much in favor of the proposed command/order solution, but I'm not saying that this is necessarily THE RIGHT WAY(tm).

In this particular case (client-server communication, validation, etc.) storing and passing around state and trying to validate it will likely make things difficult to maintain in the long run. The client- and server-side at some point need to know the state, but conveying a change as a command allows us to capture the player's intent.

With commands (orders if you wish), one of the benefits on the client side would be that undo/redo support would be easy to implement (just one/two stacks of commands and code to reverse commands). On the server side it would make testing, debugging and validation easier. The entire sequence of commands (or resulting events) made during a game could be stored and used as a basis for auditing, running it through external analysis tools, replays, retroactively checking for potential cheats used in a game if a cheat/hack/exploit is published some time after the game completed.

Implementing commands and some kind of "event sourcing" (http://martinfowler.com/eaaDev/EventSourcing.html if you will) is a story for another time Rolling Eyes

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