Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Coder Diary #5 -- Code Merge Mission Accomplished!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Coder Diary #5 -- Code Merge Mission Accomplished! Page: [1]
Login
Message << Older Topic   Newer Topic >>
Coder Diary #5 -- Code Merge Mission Accomplished! - 6/14/2013 10:23:20 PM   
berto


Posts: 20708
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

Coder Diary #5 -- Code Merge Mission Accomplished!






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!

  • 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!

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

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com
    Post #: 1
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 12:00:40 AM   
    junk2drive


    Posts: 12907
    Joined: 6/27/2002
    From: Arizona West Coast
    Status: offline
    That's a big screenshot on a single monitor.

    (in reply to berto)
    Post #: 2
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 12:32:24 AM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

    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).

    < Message edited by berto -- 6/15/2013 1:46:41 AM >


    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to junk2drive)
    Post #: 3
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 1:36:09 AM   
    dogovich

     

    Posts: 11
    Joined: 10/27/2005
    Status: offline
    Looks pretty nice.

    (in reply to berto)
    Post #: 4
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 8:40:47 AM   
    Crossroads


    Posts: 17372
    Joined: 7/5/2009
    Status: offline
    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.

    < Message edited by Crossroads -- 6/15/2013 8:41:33 AM >


    _____________________________


    (in reply to dogovich)
    Post #: 5
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 2:24:58 PM   
    wings7


    Posts: 4591
    Joined: 8/11/2003
    From: Phoenix, Arizona
    Status: offline
    Thanks berto and amen to you!

    Patrick

    (in reply to Crossroads)
    Post #: 6
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 7:22:08 PM   
    scottintacoma

     

    Posts: 192
    Joined: 1/25/2008
    Status: offline
    Berto,

    Many thanks and continued good luck.

    And to your predecessors. Thanks for keeping this going.

    (in reply to wings7)
    Post #: 7
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/15/2013 8:53:22 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

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





    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?

    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!

    < Message edited by berto -- 6/15/2013 9:20:25 PM >


    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to berto)
    Post #: 8
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 6/16/2013 10:54:22 PM   
    Zap


    Posts: 3639
    Joined: 12/6/2004
    From: LAS VEGAS TAKE A CHANCE
    Status: offline
    Exciting things indeed for JTCS

    _____________________________


    (in reply to berto)
    Post #: 9
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 10/31/2013 4:23:40 PM   
    Arkady


    Posts: 1262
    Joined: 5/31/2002
    From: 27th Penal Battalion
    Status: offline
    awesome

    _____________________________


    (in reply to Zap)
    Post #: 10
    RE: Coder Diary #5 -- Code Merge Mission Accomplished! - 11/3/2013 12:15:06 AM   
    junk2drive


    Posts: 12907
    Joined: 6/27/2002
    From: Arizona West Coast
    Status: offline
    bump 5

    (in reply to Arkady)
    Post #: 11
    Page:   [1]
    All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Coder Diary #5 -- Code Merge Mission Accomplished! Page: [1]
    Jump to:





    New Messages No New Messages
    Hot Topic w/ New Messages Hot Topic w/o New Messages
    Locked w/ New Messages Locked w/o New Messages
     Post New Thread
     Reply to Message
     Post New Poll
     Submit Vote
     Delete My Own Post
     Delete My Own Thread
     Rate Posts


    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

    1.266