@Koshling:
I like what I'm seeing so far on the workings of the new Viewport system. I have a few questions about it though. The first one is, what is the net RAM gain from this. I would assume it is quite substantial, but I'd like to know for sure.
Unknown at this point, as it's not something I've even considered measuring (will need a mature game, which I cannot load since all the work is currently in the parallel maps mod which has no body of saves to use). However, I would expect significant (100s MBytes) savings for games with maps that are significantly larger than the viewport size you choose (which I'll probably default to around 75 X 75 or so)
Also, you said that you have been working on the Viewports side of things, and LyTning has been working on the actual Multi-Maps. How will the mechanics of the Multiple Maps in C2C work. Specifically, how will
- Movement of units between different maps (not viewports)
- Transmission of yields/commerces and trade
- AI understanding of working with multiple maps
work in practice, assuming those have been hashed out between you and Lytning? I like to understand how things work on a technical level, even if not all of it makes sense to me.
The groundwork will provide APIs to allow units to be moved between maps. It's up to the mod that uses it to decide how to employ that. One example might be a 'wormhole terminus' building you can build in a city maybe. Since the APIs will all be exposed to Python it would then be possible to add a unit action ('go through wormhole' or whatever) to move it to another map.
The model for commerce/yield is likely to have two options, which comes down to how turn ends are handled on different maps:
1) Turn ends are synchronized (i.e. - all maps have time running at the same rate, so on each turn every map processes any necessary movement etc.). In this case (which I think is what we'll want for C2C) then player-level stuff is pooled across maps. Just think of the map id as being a third spatial plot coordinate (so instead of a unit or city being at (x,y) it's at (x,y,M) wheer M is a map id). As now, where something is doesn't impact whether its net commerce output flows to the player or not, and so that won't change. As for resource availability, that depends how we want to define trade route connectivity between maps, which hasn' been decided (or even thought about really)
2) Maps have independent turn sequences, so 10 turns (say) could go by on one map, while a single one ellapses on another. This is a much more problematic model for player-level pooled things (like total gold etc.). Because of that it's possible that there will only be limitted support for this model. Lytning needs something like this for his 'tactical maps' which basically provide localized battle-level simulations or tactical encounters. Most likely time will be totally frozen at the global level while actions occur on this map (however many turn they take there), so during play on that map you'll have no income at all (and probably no ability to spend gold for consistency).
The AI will understand the maps essentially as independent entities (much like widely separated continents). Until we decide how the multiple maps are to be used (including the mechanics of moving between them and so on) there's not much more it can do. When we do decide on those mechanics then AI work will certainloy be required to drive its decision making in terms of those mechanics