Announcement: Big Change coming
Moderator: Committer
Announcement: Big Change coming
Starting tomorrow night, I'm going to be making some big changes to the code structure for the universe. Zach and I have been discussing changes that need to be made to accomodate our new system of executing orders client-side, and we've decided that it would be best to dispense with ClientUniverse and ServerUniverse, and put them in a common class.
This is going to concentrate all our universe code in one location, and remove the need for many #ifdefs
Because this is such a huge change, I want to make sure everybody who is working on universe dependent stuff has a chance to check their code in first, so we dont cause too many conflicts. If you've got unfinished code that depends on the universe stuff, either check it in, or let me know when you expect to have it checked in. If I dont hear any response to this thread, I'll start work tomorrow night.
This is going to concentrate all our universe code in one location, and remove the need for many #ifdefs
Because this is such a huge change, I want to make sure everybody who is working on universe dependent stuff has a chance to check their code in first, so we dont cause too many conflicts. If you've got unfinished code that depends on the universe stuff, either check it in, or let me know when you expect to have it checked in. If I dont hear any response to this thread, I'll start work tomorrow night.
Empire Team Lead
Re: Announcement: Big Change coming
Isn't that a bad Idea in respect to cheating clients? Or did I just get something wrong?jbarcz1 wrote:Starting tomorrow night, I'm going to be making some big changes to the code structure for the universe. Zach and I have been discussing changes that need to be made to accomodate our new system of executing orders client-side ...
Anyway ,the vanishment (is this a correct english term?) of FREEORION_BUILD is a very good thing. If I knew that before, I could have saved 3 hours programming the build-system
Well, the thing is, the only way a client can change the universe state on the server (where it actually matters) is by sending a valid order to the server, which is verified and executed. So the client can make whatever changes it wants to its own, local universe state, but they wont do any good if they aren't reflected in the server state (and that wont happen unless the changes they make are legal).
We're still going to be doing all the order execution and turn processing on the server. We're just executing some orders in the client as well so that the user can see what effect their orders have on the game state (so, if the user wants to move a fleet, they'd execute a fleet move order which would modify the local universe state, setting the fleet's destination).
This way the UI's job is made much easier because all they have to do is display the present state of the universe.
There's a thread lieing around called 'orders revisited' (or some such thing) where we discussed it
We're still going to be doing all the order execution and turn processing on the server. We're just executing some orders in the client as well so that the user can see what effect their orders have on the game state (so, if the user wants to move a fleet, they'd execute a fleet move order which would modify the local universe state, setting the fleet's destination).
This way the UI's job is made much easier because all they have to do is display the present state of the universe.
There's a thread lieing around called 'orders revisited' (or some such thing) where we discussed it
Empire Team Lead
Re: Announcement: Big Change coming
doh. Sorry about that. Actually, Freeorion_build will still exist in some form, but under the system we're thinking of, it should only have to be confined to a small set of core files, instead of being scattered all over like it is now. There's going to be an appinterface file that provides access to either a universe object or an empiremanager object, and this will have #ifdef's in it to pull the object from the correct app class.Yoghurt wrote: Anyway ,the vanishment (is this a correct english term?) of FREEORION_BUILD is a very good thing. If I knew that before, I could have saved 3 hours programming the build-system
JB
Empire Team Lead
Re: Announcement: Big Change coming
This new structure should not allow clients to cheat any more than the old structure would. All adjustments to the Universe are done at the server, and the server is responsible for authenticating all Orders it receives.Yoghurt wrote:Isn't that a bad Idea in respect to cheating clients? Or did I just get something wrong?jbarcz1 wrote:Starting tomorrow night, I'm going to be making some big changes to the code structure for the universe. Zach and I have been discussing changes that need to be made to accomodate our new system of executing orders client-side ...
Sorry about that. We only discussed this for the first time over the weekend, after you had already done the work. It won't go wasted, though, since there will still be some files with the #ifdefs, just not as many.Anyway ,the vanishment (is this a correct english term?) of FREEORION_BUILD is a very good thing. If I knew that before, I could have saved 3 hours programming the build-system
Re: Announcement: Big Change coming
Ah, OK! Than it's no problem.tzlaine wrote:This new structure should not allow clients to cheat any more than the old structure would. All adjustments to the Universe are done at the server, and the server is responsible for authenticating all Orders it receives.
Than the time wasn't wasted And the less #ifdef's the better!Sorry about that. We only discussed this for the first time over the weekend, after you had already done the work. It won't go wasted, though, since there will still be some files with the #ifdefs, just not as many.