Announcement

Collapse
No announcement yet.

Compiling the SDK

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by kato-uke
    136 KB sounds almost exactly like the default debug info VC/VC+ adds if you don't turn that off. on binaries at least, no idea about libraries.
    Interesting. I'll check the VC++ "/help" output to see if there is a switch other than just not specifying the debug one I know about.

    On a second item, the choppiness of the movies, especially the intro movie:

    I have discovered that it is choppy (or not) depending on the resolution I use. On my desktop system I normally play at 1600x1200 (19in monitor), but on my 1280x800 laptop the movies are not choppy at all.

    SO, I reduced the desktop game graphics to 1280x800, and lo and behold, no choppiness.

    I guess the 128K video memory in my Radeon X300 isn't quite enough for non-choppy movies at 1600x1200 resolution.

    At least I have an explanation, and it isn't the rebuilt SDK I'm now using. That's the good news.

    smacfan

    Comment


    • #17
      A couple of things:

      1. The "/EHsc" switch on the "Other Options" screen, under "Build Options" for the "Final Release" target, can be replaced in CodeBlocks with the "Enable C++ Exception Handling [/GX]" switch on the "Compiler options" tab instead. "/GX" (according to the VC++ help output) is equivalent to "/EHsc". Checked by rebuilding and comparing the size of the outputs, got the same 3756KB size with "/GX" as with "/EHsc".

      2. In the project file, the optimization for the "Final Release" target is "Maximize Speed [/O2]". By chosing "Minimize space [/O1]" instead, the DLL became only 3132KB instead of the 3620KB of the 1.61 patch or the 3756KB of the SDK build with "Maximize speed [/O2]".

      I don't intend to run the "Minimize space" version, since like everyone else I would far rather "Maximize speed"! However, it's an interesting difference nonetheless.

      Now to actually start looking at some code!

      smacfan

      [edit] -- Checked the compiler switches in the VC++ help output, and there do not seem to be switches to turn off any "default" debugging info that might be generated in an SDK build. There are some switches I won't claim to understand, but I guess the bottom line is that the SDK build seems to work OK, even if it isn't *exactly* what they released.

      Comment


      • #18
        I wish they had spent some more time documenting this thing. Every time I look for something its like trying to stab someone through curtain.

        Edit:
        Its probably worth saying what I'm trying to do and what I'm looking for.

        I want to create a framework to allow interrested parties to write AIs and have them all in the same game. My first point of order is to figure out how the game stores its CvPlayer objects and to then define an interface for client AIs that does not allow them to "cheat."

        At this point, I'm looking for where that player information is stored. I know in objects of type CvPlayer, but not where they are kept.

        Comment


        • #19
          Originally posted by nik9000
          I want to create a framework to allow interrested parties to write AIs and have them all in the same game. My first point of order is to figure out how the game stores its CvPlayer objects and to then define an interface for client AIs that does not allow them to "cheat."

          At this point, I'm looking for where that player information is stored. I know in objects of type CvPlayer, but not where they are kept.
          I am working on something similar, although I am not going to worry about preventing the AI from cheating. I have a feeling it would add a lot of overhead, and if an AI is using compiled code they can bypass your interface and cheat anyway.

          If I remember correctly, the CvPlayer objects are actually CvPlayerAI objects. CvPlayerAI is a subclass of CvPlayer. There is a static array of these objects in CvPlayerAI.h and also a GET_PLAYER macro which will return the object given an id.

          It appears that the enum PlayerTypes is used for the player id. This is kind of confusing because based on the name you would think the enum would be used for something else.

          Daniel

          Comment


          • #20
            Originally posted by Locutus
            Nope, 2005 doesn't compile. There's some problem with something in the Boost Python code IIRC (which is outside the SDK). This may well be fixed in the XP (no promises though), but for this SDK it's too late.
            Actually, it will compile with MSVC 2005 after a small change. Frankly, I am somewhat surprised that it does not issue a compiler error in its present form. In CyInfoInterface2.cpp, line 304 is really suspect. I would suggest changing
            Code:
            .def_readwrite("getUniqueRange", &CvBonusClassInfo::getUniqueRange)
            to either
            Code:
            .def("getUniqueRange", &CvBonusClassInfo::getUniqueRange, "int ()")
            for read-only access through a Getter, or
            Code:
            .def_readwrite("iUniqueRange", &CvBonusClassInfo::m_iUniqueRange)
            for direct read-write access to a member variable. In the latter case, you also have to make CvBonusClassInfo::m_iUniqueRange public.

            You would have to ask Firaxis which version is intended.

            Comment


            • #21
              I couldn't build the SDK after following the instructions in the first post. I got a "fatal error C1083 - windows.h not found" when I tried to build the project.

              To fix this I needed to add "C:\Microsoft Visual Studio 8\Microsoft Platform SDK\Include" path to the Project >> build-options >> Final >> Directory list.

              Just thought everyone should know, in case they are having the same problem.
              Don't rule me out when I'm losing. Save your celebration until after I'm gone.

              Comment


              • #22
                When I follow the link to get the toolkit, I'm told that "The Visual C++ Toolkit 2003 has been replaced by Visual C++ 2005 Express Edition."

                Given that posts below mention that this cannot compile, am I out of luck? Or can I search for a 2003 version elsewhere? Or am I wrong and the 2005 version is perfectly acceptable?

                Comment


                • #23
                  Originally posted by Ari
                  When I follow the link to get the toolkit, I'm told that "The Visual C++ Toolkit 2003 has been replaced by Visual C++ 2005 Express Edition."

                  Given that posts below mention that this cannot compile, am I out of luck? Or can I search for a 2003 version elsewhere? Or am I wrong and the 2005 version is perfectly acceptable?
                  Oh my. You are quite correct, M$ seems to have removed that DL since I got it on April 13th.

                  I can upload it if someone can host it, it is about 32MB (32,177KB) though, so it needs to be a big HD and fast net connection.

                  Don't know the legality of hosting it either, IANAL.

                  smacfan

                  Comment


                  • #24
                    I went to the archived page on archive.org, and got a valid link to *a* download. I won't know until I actually install it if it's 2003 or simply the newest version pointed to from the same link (which will be later today, since I'm on a 56k, and have to get out anyway)




                    edit: confirmed that this is indeed the 2003 version.
                    Last edited by Ari; April 22, 2006, 18:24.

                    Comment


                    • #25
                      Originally posted by Ari
                      I went to the archived page on archive.org, and got a valid link to *a* download. I won't know until I actually install it if it's 2003 or simply the newest version pointed to from the same link (which will be later today, since I'm on a 56k, and have to get out anyway)



                      edit: confirmed that this is indeed the 2003 version.
                      Glad you got it, I just checked your web.archive.org link and it's gone from there as well.

                      Do you think M$ is trying to send a message? Will they come after us next?

                      smacfan

                      Comment


                      • #26
                        Geez, so it is. I wonder if my downloading it prompted them to realize they still had it on their server. I'd be more than happy to upload it someplace if anyone wants.

                        Comment


                        • #27
                          Has anybody confirmed Fromafar's solution works for compiling in VC 2005 ?

                          Especially now M$ has removed the 2003 toolkit, it would be interesting to know if VC2005 can compile.
                          no sig

                          Comment


                          • #28
                            VC2005 working.
                            I just built the dll with Fromafar's solution (choice #1).

                            Comment


                            • #29
                              Hold on. Yes, It compiled. But I'm getting CTD. Anoyone else have success?

                              Comment


                              • #30
                                FYI, I compiled the new CyInfoInterface2.cpp with VC 2003 and that works fine. So the change appears to be OK, just not with VC 2005.

                                Comment

                                Working...
                                X