Announcement: Big Change coming

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
jbarcz1
Creative Contributor
Posts: 226
Joined: Thu Jun 26, 2003 4:33 pm
Location: Baltimore, MD

Announcement: Big Change coming

#1 Post by jbarcz1 »

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.
Empire Team Lead

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

Re: Announcement: Big Change coming

#2 Post by Yoghurt »

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 ...
Isn't that a bad Idea in respect to cheating clients? Or did I just get something wrong?

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 :(

jbarcz1
Creative Contributor
Posts: 226
Joined: Thu Jun 26, 2003 4:33 pm
Location: Baltimore, MD

#3 Post by jbarcz1 »

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
Empire Team Lead

jbarcz1
Creative Contributor
Posts: 226
Joined: Thu Jun 26, 2003 4:33 pm
Location: Baltimore, MD

Re: Announcement: Big Change coming

#4 Post by jbarcz1 »

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 :(
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.

JB
Empire Team Lead

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Announcement: Big Change coming

#5 Post by tzlaine »

Yoghurt wrote:
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 ...
Isn't that a bad Idea in respect to cheating clients? Or did I just get something wrong?
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.
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 :(
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.

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

Re: Announcement: Big Change coming

#6 Post by Yoghurt »

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.
Ah, OK! Than it's no problem.
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.
Than the time wasn't wasted ;) And the less #ifdef's the better!

tsev
Space Kraken
Posts: 167
Joined: Thu Jun 26, 2003 2:17 pm
Location: Pittsburgh, PA

#7 Post by tsev »

This change sounds like a great idea. I've been wondering myself how user changes would be reflected client-side.

<ot>
BTW, I'll still be gone for a couple more weeks...but I'm still lurking here
</ot>
FreeOrion Programmer

jbarcz1
Creative Contributor
Posts: 226
Joined: Thu Jun 26, 2003 4:33 pm
Location: Baltimore, MD

#8 Post by jbarcz1 »

I have begun work. This will be a pretty sweeping change, but when its done we will have far fewer #ifdefs than before, and IMO the universe code structure will make much more sense
Empire Team Lead

Moriarty
Dyson Forest
Posts: 205
Joined: Thu Aug 14, 2003 4:50 pm
Location: United Kingdom of Great Britain and Northern Ireland

#9 Post by Moriarty »

Yoghurt wrote:
Anyway ,the vanishment (is this a correct english term?) of FREEORION_BUILD

Vanishment isn't the correct english term. Could have used 'Disappearance' instead.

i.e.:

"Anyway ,the dissapearence of FREEORION_BUILD..."

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#10 Post by Tyreth »

Vanishment seems fine to me. Certainly not the most common use, but still correct I would say.

Post Reply