[Freeciv-Dev] Client/server
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I would like to get a few things straightened out...
I think we all agree that we need a better defined interface between the
server and the client with more general packets, yes?
To do this we need to decide what should be in the server and what
should be in the client... And we have to do it in a general way that
won't change when a feature is added...
Now, let's try the divide and conquer strategy...
I think the first line would be drawn between the governments and the
world where the world is the objects manipulated, the pieces and the
board, and the government is the manipulating entity...
I think there is no question that the world would go in the server...
What would happen here are things such as recalculating gold,
production, hp and so on...
I guess modifying a fogged map could fit in here...
It *is* a very fundamental part of the game...
Now, about the government...
In the beginning there was only the human player...
Then he created an ai to be his equal... (well, he tried :)
Now he longs for servants to give him aid in his quest for greatness...
What is a servant?
Every order that is not a direct modification of the world is a servant
order... Everything that requires further intelligence...
For instance a goto-order or a auto-settler-order...
Or an order to manage a city according to a city-plan...
I was imagining these servants in the client...
The nation in one end of a line and the government in the other...
This would keep the server simple, it would only export an interface for
direct modifications of the world, and distribute the work... And the
servants should have no way to cheat since they're a part of the
government... I really liked the idea of a clean server...
Well, now I'm thinking it's not worth the trouble...
Imagining the leader in one end of the line and the government in the
other (actually in the nation) isn't so hard after all... :)
Things like goto and auto-settle is in the server now and the servants
work-load should be quite possible to justify...
This would leave the client to be a pure ui and nothing else...
An ai client could be constructed but it wouldn't have a lot in common
with the ui client...
I really wanted a very clear line between the world and the government
but I guess it can be done in the server with some work...
So, what I'd like to do now is to implement a general 'servant-com'
packet and have all new features be handled using this and the
servants...
Maybe some of You think, 'Yes, of course'
Well, if so, I would have appreciated it if You
had told me so a few months ago... :p
Can we make it clear now that we want no intelligence in the user client?
A clear line to follow, that is what I want...
/Daniel
--
Now take a deep breath, smile and don't take life so seriously... :)
- [Freeciv-Dev] Client/server,
Daniel Sjolie <=
|
|