Announcement

Collapse
No announcement yet.

#ifdef ACTIVISION_ORIGINAL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #ifdef ACTIVISION_ORIGINAL

    Hi,

    Well, shall we continue using this directive, or not?

    Pros:
    • you may see locations of changes (Alternatives: TortoiseMerge, WinMerge, etc.)
    • you may compile a binary based on apolytons code
    • it's the way we do it now


    Cons:
    • fast growing sources due to duplicate code (original/changes)
    • you will not see changes of people not following this convention
    • this will lead to a binary based on slightly modified code
    • code may get harder to understand
    • changes may get harder to add
    • there's no similar change tracking for .ldl/.txt files
    • nested changes like system programming guarded by acitivision ifdefs might introduce bugs/strange behaviour due to complexity
    • changes can be localized by programs in Pros
    • a version control system aka VCS (like subversion, even more powerful than CVS) does the same, too, and much more


    Any comment, additions to pros/cons list or opinions are welcome.
    Happy Voting!
    10
    Yes!
    40.00%
    4
    No!
    30.00%
    3
    Let's start a discussion about that, first!
    30.00%
    3

  • #2
    So far, while there are not THAT many canges to the code, I trust it's good. The main reasons are that it's easy to see where something was changed, and what was the original Activision way of doing it.

    In perspective, when there's a positive lot of changed code, I think that simply commenting additions would be good, removing the original code. It's not exactly likely we'll need to compile anything with ACTIVISION_ORIGINAL on anyway, as we have just that in the shape of original ctp2.exe from our game disks.
    Solver, WePlayCiv Co-Administrator
    Contact: solver-at-weplayciv-dot-com
    I can kill you whenever I please... but not today. - The Cigarette Smoking Man

    Comment


    • #3
      I'm against using it longer, because the code is more difficult to understand the more changes in the code are included. And also I like a clean, small as possible source.

      But there should be system, that tracks the changes and one can see step by step, what was changed. If we found a solution for that, it's a no brainer for me.

      Until that, I use Filesync and WinDiff and a copy of the original code to see the differences between orinial and current source. So I can proof if Idid not have something wrong, with the "ACTIVISION_ORIGINAL" flag.
      Ludwig

      Comment


      • #4
        Yes, but so far we have no CMS or VMS, and we won't have it soon at least here integrated on Apolyton, and using additional programs such as WinMerge takes additional time and resources. Our code isn't yet at the stage when there's a ton of #ifdefs - though, again, I will advocate a removal of those at some later point.

        For instance, when we make the first 'public release' of CtP2:AE, it might be a good time to consider abolishing the ACTIVISION_ORIGINAL notation.
        Solver, WePlayCiv Co-Administrator
        Contact: solver-at-weplayciv-dot-com
        I can kill you whenever I please... but not today. - The Cigarette Smoking Man

        Comment


        • #5
          Originally posted by Solver
          For instance, when we make the first 'public release' of CtP2:AE, it might be a good time to consider abolishing the ACTIVISION_ORIGINAL notation.
          Are we not close to the goal of re-implementing all of the fixes in the 1.11 patch (the original goal of CTP2:AE v1.2 IIRC)?
          ·Circuit·Boi·wannabe·
          "Evil reptilian kitten-eater from another planet."
          Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

          Comment


          • #6
            well there are many bugs left on that list, most of them relates to multiplayer though.

            Comment


            • #7


              do not play MP, completely forgot!
              ·Circuit·Boi·wannabe·
              "Evil reptilian kitten-eater from another planet."
              Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

              Comment


              • #8
                MP isn't that critical at this point since the servers are down......
                "

                Comment


                • #9
                  Servers are down, but there has been success in replacement methods of playing MP. Servers will also not be brought back up.

                  And yes, we're not close to re-implementing 1.1. All 1.1 SLIC and bugs are already fixed, I trust, but almost nothing relating to MP. And it's MP really where there's a ton of bugs - original MP code is barely functional at all, and that's what we are looking at now...
                  Solver, WePlayCiv Co-Administrator
                  Contact: solver-at-weplayciv-dot-com
                  I can kill you whenever I please... but not today. - The Cigarette Smoking Man

                  Comment


                  • #10
                    We could set up a new server without too much trouble if we want to.
                    The anet library has gone open source (I think its LGPL).
                    There is a server program for download and plenty of information on the original authors homepage to make it happen.

                    heres a link:

                    Comment


                    • #11
                      Originally posted by kaan
                      We could set up a new server without too much trouble if we want to.
                      The anet library has gone open source (I think its LGPL).
                      There is a server program for download and plenty of information on the original authors homepage to make it happen.

                      heres a link:
                      http://www.kegel.com/anet/
                      nice
                      "

                      Comment


                      • #12
                        Come to think of it, I dont think it would be to hard to make an automatic ladder system with anet and a bit of technical skill.

                        look in the API documentation for score reporting, it looks very promising.

                        Comment


                        • #13
                          I'm still hoping we'll move to a CVS server (or similar) sometime soon, and then it would be a good idea to remove the ACTIVISION_ORIGINALed code, but in the mean time I think it's best left in. It's certainly not a good long term solution, though.

                          Comment


                          • #14
                            If/when we do get some automated version control server ...

                            I would suggest storing the original Activision code as a baseline, and stripping all the ACTIVISION_ORIGINAL preprocessor directives before checking in the new code.

                            If not ...

                            We basically have to do the same. The current construct is starting to outlive its usefulness. It was intended to be able to find (and go to - another pro, you can search for it in the editor) changed pieces of code quickly. But this becomes less valid with each added change.

                            Comment


                            • #15
                              Well, due to the results it seems we will keep this directive some time, until either CTP2:AE is finally released and/or some vcs has been setup for the main codeline.

                              This week i will start importing the mainstream into a local subversion repository, to get up 2 date with the sources. Unfortunately, i do not have all revisions of all changed files, because until now many links to patches have been removed, so there will be quite some ALL zips be used instead of a linear import of all changes to all files into the repository.

                              If nobody hasn't done until then, i will post the next ALL.zip to the Altered source files thread.

                              Afterwards i will start fixing cases of includes and merging some changes of the linux codeline into the main codeline, as long as they don't prevent the code from compiling and keep working under windows.
                              After that milestone the goal is to achieve a sync between the main code line, the linux port and perhaps Johannes Sixt's patch and remerge proceedings to the Altered source files thread and the linux port.

                              Btw: I can provide a dump of the subversion repository just in case we get that vcs later for the main codeline.

                              Comment

                              Working...
                              X