1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Parallel Maps

Discussion in 'Civ4 - Mod Components' started by LyTning94, Apr 4, 2012.

  1. topsecret

    topsecret Believer

    Joined:
    Feb 11, 2010
    Messages:
    4,274
    Gender:
    Male
    Location:
    At the Foot of the Cross
    My brain says...
    Spoiler :
    Say what?
     
  2. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    The simple explanation is that this allows you to make the game engine see only part of a map at a time. This means that you can have multiple maps in one game, by fooling the engine into thinking that there is only ever one map, while allowing the DLL to see everything at once. The Viewports function of it is specifically important to C2C because we are at the limits of the memory civ 4, a 32 bit engine, can use.

    The Core graphics engine stores ALL of the plots it sees, visible and invisible, in the memory as graphics, and stores them horribly inefficently for that matter, using at times more than 75% of the total memory used by Civ on GEMs. The Viewports make it so that the core engine sees less area to store, while the DLL, which we have optimized significantly, sees everything, thus leading to very significant (hopefully 100s of megs) savings on RAM. This is also the same concept that will allow C2C to have five maps; Earth, Moon, Mars, Solar System, and Galactic, in one game.

    I hope that makes sense.
     
  3. topsecret

    topsecret Believer

    Joined:
    Feb 11, 2010
    Messages:
    4,274
    Gender:
    Male
    Location:
    At the Foot of the Cross
    Yes. Much better. :yup:
     
  4. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    @Koshling:

    Well, I found something that I think is a bug.

    I switched to the Military advisor with the viewports on, and clicked on a place on the minimap outside of the viewport I had started on. The actual map that appeared was the whole map, not a viewport. I like the performance though, it took a little over 3 seconds to enter the Advisor screen, and that's with a very crappy computer.
     
  5. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Yes, if it appeared as the scaled representration (it just scales down ingionoring intermediate plots to produce the whole-map minimap used by the advisor essentially) on the full map it's definately a bug. Does this always happen for you? Are you just left-clicking the minimap inside the advisor when you see this? If it is consistent for you, then (since I cannot reproduce it) I may need to give you a version with some tracing so we can work to try to pin down what is happening on you system. Do you have 'chipotle' enabled? If so did you do a full map reveal before this occured or just do it from the start with most of the map unrevealed?
     
  6. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    Yes, It produces a scaled representation. It produces the whole-map on the Viewport after left-clicking on the Mil-Advisor screen. I was clicking on a plot not in the area of the initial viewport, which functioned perfectly. It is consistent for me after three tries, and I'm willing to work with you to debug this. I am not using the debug (chipotle) mode, I am simply loading the Viewports mod into BtS starting a Custom game with Huge Continents. Then I enter the WB and hit the Reveal All button, exit the WB, and then enter the Military Advisor. Then the problem occurs when I click on a plot on the Minimap.

    What is the next step for me to help debug this?

    Edit: Here are some pics. The first one is the initial viewport, which works properly. The next pic is how I'm revealing the whole map. Third pic is the Mil. Advisor screen, and after I click on a plot the fourth pic is the scaled-down map.
     
  7. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Could you post your save game and a copy of the global defines file you are using, plus describe as closely as you can wheer off the viewport you are clicking (e.g. - middle of the other continent or whatever) for starters. If I still cannot reproduce it I'll add some more debug tracing and give you a special build to tery with extra logging. Thanksk for helping out.
     
  8. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Oops - I had forgotten to push the military advisor Python changes to SVN. Try it now!
     
  9. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    OK, now it works fine on the Main Maps. but in the Military Advisor the map is still scaled down (see pic). Is that intended?
     
  10. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    As intended. The military advisor deliberately shows the entire map (and thus is necessarily scaled) for two reasons:
    1. If it only told you about part of your military how would you ever see an overall military status, and how would you go about finding military units you'd forgotten the location of?
    2. If it only showed the viewport how would you use it to click outside the viewport in order to move said viewport!?
     
  11. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    OK, makes sense.
     
  12. RenaissanceFan

    RenaissanceFan Warlord

    Joined:
    Mar 15, 2011
    Messages:
    125
    How does turn progression happen on maps 2 and 3 when you're in map 1? Does the AI work normally like there was only one map?
     
  13. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,070
    Location:
    America
    1. Turns will happen normally, when you end the turn everything will happen as normal.

    2. Yes, the AI does not see the viewports at all and works normally.
     
  14. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    The question was about maps not viewports. The answer is that Lytning is still working in that area to modify things. Currently turns take place on the current map and the other maps are 'frozen'. The way the example is set up it auto-transitions between the maps so turn's 'alternate' meaning you can think of the pair of turns as a single turn for most purposes.

    This will be changing (aty least as one mode of operation) so that turns take place in a synchronized fashion on all maps, whether the player is present on them (or actiably moving /viwing on them) or not.
     
  15. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,748
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Is there a mod that ever used this component? I mean the original idea of parallel maps, not the viewports (I know that is in C2C an RAND).
     
  16. lucidstorm

    lucidstorm Chieftain

    Joined:
    Dec 25, 2016
    Messages:
    31
    Gender:
    Male
    great to manage a base in alfa centaury while still managing the earthly empire, or escaping the earthly empire if necessary

    possibilities are infinite, great stuff
     
  17. Nyor

    Nyor Chieftain

    Joined:
    Sep 1, 2010
    Messages:
    8
    Sorry for necro'ing this thread. To start off: I really like the idea beyond the mod, it was exactly what I was looking for :] However, four questions came into my mind when I downloaded it:

    1. Was it designed to work with BTS 3.19? Or with an older version?
    2. Is it normal, that the game takes so long to check XML with those changes implemented? It could be my CPU as I saw that it was, well let's call it "very busy" after I implemented the mod
    3. What about this "source"-folder? Does have to be placed into the root folder of BTS?
    4. Which XML files are affected by the GameInfoScheme changes?

    These questions may turn out a little bit dumb thus forgive me :3 Just want to go sure. Thanks.

    Great stuff over all!
     
    Last edited: Aug 9, 2018

Share This Page