Coder Diary #5 -- Code Merge Mission Accomplished! (Full Version)

All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series



Message


berto -> Coder Diary #5 -- Code Merge Mission Accomplished! (6/14/2013 10:23:20 PM)


Coder Diary #5 -- Code Merge Mission Accomplished!


[:D]

[image]http://pikt.org/matrix/cs/graphics/East%20Front%20-%20First%20Build.jpg[/image]

quote:

ORIGINAL: berto

When I first got access to the Campaign Series code in early March, there were two separate codebases

  • the inherited Campaign Series codebase
  • the inherited Modern Wars codebase (a fork of the Campaign Series codebase)

    Since early March, I have been working with a copy of the latter inherited Modern Wars codebase

    ...

    So now, we have a third codebase

  • my Modern Wars codebase (a fork of the inherited Modern Wars codebase)

    That's three codebases in total. It gets to be rather hard to manage, not to mention confusing.

    It is absolutely vital that I merge the codebases! And the sooner the better.

    No, just by throwing the appropriate IDE switches, we want the capability to rebuild the entire Campaign Series of games (including Modern Wars and all future titles) in an hour or two -- the time required for the Microsoft Visual Studio IDE to compile and link the half dozen or games in the current lineup (EF, WF, RS, and the future ME, VW, and others). With all new features and bug fixes etc. in perfect sync.

    ...

    By now, I am more than half way through the code merge process. I anticipate finishing up by sometime next week. Then I re-import back into the MS Visual Studio IDE, and I get to see if the whole thing blows up! [:D]

  • So a couple of days ago I had finished the code merge, and vetted the results.

    Mission accomplished!

    Then I re-imported back into the MS Visual Studio IDE. And of course the whole thing blew up! [:D]

    Hundreds and hundreds of compiler errors. Um, what's wrong here? [&:]

    ...

    Doh! But of course. Because I had introduced hundreds and hundreds of new '#if defined(MIDDLE_EAST) ... #endif' (for example) constructs to dozens of files, those files needed the addition of



    #include "../../version.h"



    lines in order to capture the defines in version.h:



    // v e r s i o n . h
    //
    // Common version specification file.

    #ifndef _VERSION_H

    #define _VERSION_H

    // begin edits
    //#define MIDDLE_EAST
    //#define VIETNAM_WAR
    //#define KOREAN_WAR
    //#define NATO_WAR
    #define EAST_FRONT
    //#define WEST_FRONT
    //#define RISING_SUN
    #define verYear "2013"
    #define verVersion "Alpha 20130614"
    // end edits

    [...]


    For without those defines, the '#if defined(MIDDLE_EAST) ... #endif' directives would never activate, meaning that code snippets and sections would be absent from the preprocessed code, implying all sorts of holes in the code (e.g., missing variable declarations).

    By means I won't describe here, I readily identified all files lacking the needed '#include "../../version.h"' directives, then edited in the missing #include line into all relevant files.

    I then retried the ME builds, and ... a few more errors and glitches, easily fixed (and not worth detailing).

    Then, another retry, and ... success!

    Then, an attempted build of VN, and ... more success!

    Great! With the merged codebase, I verified I can build the Modern Wars .exe's. What about the earlier Campaign Series .exe's?

    ...

    After another day or two of tweaking, I have achieved a successful build of East Front, as evidenced by the above screenshot. (4 out of 5 EF .exe's now build successfully, with just the game frontend still to tweak). West Front & Rising Sun build just as successfully.

    Whew! I'm glad the code merge has worked out so well. I am ever so glad to put that tedious, boring work behind me.

    I end this Coder Diary #5 with the reminder:

    quote:

    ORIGINAL: berto

    And more gain. By merging now, we have greater flexibility in our release schedules. (Hint, hint. [;)])

    ...

    Among other considerations, the ability to advance the release schedule of 1.05 is one of the biggest reasons for my undertaking the CS/MW codebase merge described in my Coder Diary #4. For that reason, future post-1.05 patches should come out faster too.

    How long do we all have to wait? It's not for me to decide. But it's assuredly a matter of months, not a year or more. That I think it's safe to say.

    [:)]

    Until the next time ...




    junk2drive -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 12:00:40 AM)

    That's a big screenshot on a single monitor.




    berto -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 12:32:24 AM)


    quote:

    ORIGINAL: junk2drive

    That's a big screenshot on a single monitor.

    It's actually the screenshot from a portion of my 3840X1080 dual-monitor display, cropped off at the right.

    Oh, and if any of you are dreaming of expanding the game window across multiple monitors -- doesn't work, I'm afraid. You can do it, but attempting to run the game across more than one monitor introduces graphics glitches, and sub-optimal mouse behaviors. So, you are effectively restricted to running the game in a single monitor -- either full-screen on that single monitor, or resized smaller as you please (and as I did in the screenshot above).




    dogovich -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 1:36:09 AM)

    Looks pretty nice.




    Crossroads -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 8:40:47 AM)

    That's a HUGE picture right there in pixel size, any chance you could crop it down in detail? I am having problems downloading it...

    EDIT: never mind, it seems my browser got stuck, it loaded immediately in a new session.




    wings7 -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 2:24:58 PM)

    Thanks berto and amen to you![&o]

    Patrick




    scottintacoma -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 7:22:08 PM)

    Berto,

    Many thanks and continued good luck.

    And to your predecessors. Thanks for keeping this going.




    berto -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/15/2013 8:53:22 PM)


    Here's something you don't see every day:

    [image]http://pikt.org/matrix/cs/graphics/RisingSunEastFrontWestFront.jpg[/image]

    [:D]

    I had a devil of a time getting the frontend .exe's to build -- East Front, West Front End & Rising Sun, also Middle East & Vietnam War. (No problems with the game engine or the editors.) I could get the Campaign Series frontend .exe's to build, but that would break the Modern Wars frontend .exe's (wouldn't compile, else wouldn't decrypt the OOB and map files properly). Then I fixed the Modern Wars .exe's, but that broke again the Campaign Series .exe's. Back and forth it went, tweak after tweak, a cut here, a paste there, until ... finally I decided that bandaids weren't enough. Major surgery was needed.

    The problem was a tangled, confusing mess of merged legacy encryption code. Ugly!

    But that screenshot above -- ain't she pretty? [8D]

    Both game patient and code doctor are recovering nicely. I can now rebuild all five .exe's for all five games from the same unified codebase in about an hour or so. A coder's dream come true!




    Zap -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (6/16/2013 10:54:22 PM)

    Exciting things indeed for JTCS




    Arkady -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (10/31/2013 4:23:40 PM)

    awesome [&o]




    junk2drive -> RE: Coder Diary #5 -- Code Merge Mission Accomplished! (11/3/2013 12:15:06 AM)

    bump 5




    Page: [1]

    Valid CSS!




    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
    1.765625