Multiple Maps and Mapscripts

ls612

Deity
Moderator
Joined
Mar 10, 2008
Messages
8,276
Location
America
Continuing the Discussion from the Tag Requests thread, I brought up the issue how how to handle Multi-maps and Mapscripts, and in general generating the new maps.

This thread is to discuss a plan for how to handle this issue.
 
As I read it the documentation for the multi map mod says that you define the map script for each of the maps and that they are generated at the start.

We would need to allow the posibility of different map scripts for each map.
 
Well in one of the mods they have many maps separated by back space and you could have like Earth, Mars, Venus, Moon, etc. Upon picking your game you had to choose that.

So I am guessing if we do these we will have to have a combo for each map combo. I vote for C2C_PW2f being one of the first to be converted into a new multi-map variant choice.

EDIT: It was Future Mod that had that. Here is a picture of their "Solar System" type of map script where It has like Earth, Moon, Mars, Venus and Titan. The maps are toroidal and are rotated 90 degrees.

EDIT2: Here is a better map

Spoiler :
attachment.php

Venus City
 
Just out of curiosity, is someone currently working on the multimaps? I think if we manage to release even a basic version of this, waves of new players will come to C2C, as well as new modders to help us even more :cool: That's what I think, anyways.
 
Just out of curiosity, is someone currently working on the multimaps? I think if we manage to release even a basic version of this, waves of new players will come to C2C, as well as new modders to help us even more :cool: That's what I think, anyways.

Koshling has stated his intent to have a basic Multi-Map and Viewport system ingame before V24, so hopefully we'll have it in at the end of June.
 
That's good! Setting goals is what gets things done! Good luck Koshling!
 
As of next week I will be starting in Ernest on multi map work. I just want to make everyone aware of my plans, and what will be left that will need doing by others afterwards:

  1. I will be starting by exclusively working on Lytning's mod until the common features we need are all working there
  2. I will then port it over to the C2C DLL
This will provide the basic capabilities at an API level, exposed to Python, and understood by the game engine. After that the following will all need doing, which I don't have the appropriate skills for (at least alone):
  • Map scripts will need adjusting to cope with multi maps (someone who understands map scripts needed)
  • UI will need adding to access the multiple maps, and/or viewports. This will likely involve a fair amount of Python code and probably a new advisor-like screen to control map viewing from (need someone with decent Python experience)
  • It is likely that I'll be adding extra tags to things like terrains and features to say what map type they can be used on - therefore update of the terrain and feature XML will likely be needed (DH I assume)

It will likely be about 3 weeks before I have the DLL port done, and obviously the other stuff cannot start until then, and the capability won't surface into the game until it's all done. I can't really provide estimates of the stuff I've said I'll need others to do, or help with, but my guess is another few weeks, so earliest it can be available as an actually usable game feature is probably about 6-7 weeks time.
 
That's great news. As for help, I don't want to volunteer people but I know AIAndy is skilled enough to help with new tags, Ori knows events and Civ Fuehrer has worked with UI stuff before. You should try to contact them to try to help. As for map scripting, I am not sure who has experience with that (DH maybe?).

But with all things in C2C if you just ask people will come to help. That is one of the best things about the CFC community, there are many very talented people here and all it takes to get things made is to ask. Especially when it comes to such a huge feature like multi-maps. I am sure the entire Civ4 community could benefit from having working multi-maps, not just C2C.
 
That's great news. As for help, I don't want to volunteer people but I know AIAndy is skilled enough to help with new tags, Ori knows events and Civ Fuehrer has worked with UI stuff before. You should try to contact them to try to help. As for map scripting, I am not sure who has experience with that (DH maybe?).

But with all things in C2C if you just ask people will come to help. That is one of the best things about the CFC community, there are many very talented people here and all it takes to get things made is to ask. Especially when it comes to such a huge feature like multi-maps. I am sure the entire Civ4 community could benefit from having working multi-maps, not just C2C.

AIAndy redid the C2C mapscripts when the new terrain was added IIRC, so he would know how those work. I am really looking forward to this, and think this will be a great project for the summer, finally getting the multi-maps and Galactic Era working! Good luck Koshling on this!:goodjob:
 
I'm absolutely fascinated to see how this will work out in practice and how it codes in the dll. I'm not familiar with mapscripting at all myself but yeah, I was going to mention AIAndy was the one with the skills there that have been applied here previously. He did a great job with the scripting updates for the new terrain features and such.
 
@Koshling: I was just wondering if you are planning to do Viewports now along with the Multi-Maps, or if that is going to be another project. I am very much looking forward to either or both of these features, and thank you once again for all of your work on C2C. :goodjob:
 
@Koshling: I was just wondering if you are planning to do Viewports now along with the Multi-Maps, or if that is going to be another project. I am very much looking forward to either or both of these features, and thank you once again for all of your work on C2C. :goodjob:

As it happens, the division of labour Lytning and I agreed (at least for now), is that he is continuing to work on baseline multimap functionality, and I am working on viewport functionality. All work is happening on the parallel map mod, and will be ported to C2C when it is at least basically functional at some level (it will probably lack any UI, but the necessary Python APIs will be exposed for UI to be added, which is not really either my or Lytning's area of expertese, so that will likely fall to AIAndy and others after the port).

Current status is:
  • Baseline multimaps work graphically, but not yet in terms of turn mechanics (see below)
  • Viewports are functional at a very basic level, but I'm still working through glitches and gotchas

The key thing that needs doing before it's 'usefully functional', at least for C2C purposes, is the turn synchronization model across maps needs to be implemented (that is to say that a turn end, ends the turn on all maps, AIs process their stuff on all maps each turn, players with units that need orders on multiple maps get auto-map-switched to cycle through the ones they need to attend to, and so on).

Lytning is also rews, such as civ-wide limits on things like unit types applying globally rather than in each map individually [technically this involves making the map id essentially a third coordinate in the coordinate system, rather than a second dimension to entity ids].

Minimaps are proving a bit of a bugbear for the viewport system (the minimap size must match the map size, but what I hadn't realised is that orking some stuff that's already done a bit, now that we've had time to think it through a bit more. This rework should smooth the path to multiplayer support and other issuethe map in the military advisor screen IS a minimap, generated by the game engine (not the DLL or the Python), which causes problems because Python sees the entire map, but the game engine sees viewports). Tentatively this seems resolvable due to the single-threaded non-reentrant nature of the game (while an advisor screen is up the game engine doesn't try to deal with the regular map, so it's looking like I can context switch the map under its feet while it's in Python-land and fool it into doing the right thing)
 
As it happens, the division of labour Lytning and I agreed (at least for now), is that he is continuing to work on baseline multimap functionality, and I am working on viewport functionality. All work is happening on the parallel map mod, and will be ported to C2C when it is at least basically functional at some level (it will probably lack any UI, but the necessary Python APIs will be exposed for UI to be added, which is not really either my or Lytning's area of expertese, so that will likely fall to AIAndy and others after the port).

Current status is:
  • Baseline multimaps work graphically, but not yet in terms of turn mechanics (see below)
  • Viewports are functional at a very basic level, but I'm still working through glitches and gotchas

The key thing that needs doing before it's 'usefully functional', at least for C2C purposes, is the turn synchronization model across maps needs to be implemented (that is to say that a turn end, ends the turn on all maps, AIs process their stuff on all maps each turn, players with units that need orders on multiple maps get auto-map-switched to cycle through the ones they need to attend to, and so on).

Lytning is also rews, such as civ-wide limits on things like unit types applying globally rather than in each map individually [technically this involves making the map id essentially a third coordinate in the coordinate system, rather than a second dimension to entity ids].

Minimaps are proving a bit of a bugbear for the viewport system (the minimap size must match the map size, but what I hadn't realised is that orking some stuff that's already done a bit, now that we've had time to think it through a bit more. This rework should smooth the path to multiplayer support and other issuethe map in the military advisor screen IS a minimap, generated by the game engine (not the DLL or the Python), which causes problems because Python sees the entire map, but the game engine sees viewports). Tentatively this seems resolvable due to the single-threaded non-reentrant nature of the game (while an advisor screen is up the game engine doesn't try to deal with the regular map, so it's looking like I can context switch the map under its feet while it's in Python-land and fool it into doing the right thing)

So, if I'm understanding all of this technical stuff correctly, the status of this whole project is;

  1. The basic Multi-Map function is working properly in terms of the core Game Engine graphical stuff.
  2. The main issue on the Multi-Maps front is how the turns are ended.
  3. AIAndy and/or DH will need to make a new GUI for the Multi-Map functionality before this can work properly.
  4. We will not be able to manually change between the maps during our turns. (I hope I'm wrong on this one.)
  5. The Viewports are running into snags with the mini-maps because for some odd reason the core game engine sees the military advisor as a minimap.
  6. You intend to get around this annoying 'feature' by tricking the game engine into thinking that the military advisor is not open when it is.

This seems like a whole lot of progress, I'm excited. Do you have any ETA on when we can see the C2C-port of this whole thing? I think that that is when SO wants to start the freeze once we have multi-map implementation.
 
So, if I'm understanding all of this technical stuff correctly, the status of this whole project is;

  1. We will not be able to manually change between the maps during our turns. (I hope I'm wrong on this one.)
You're over-reading between the lines - absence of evidence is not evidence of absence. I'm just saying that the game will need to auto switch you before it automatically goes into the 'press enter to end turn' state, if you still have unmoved units that need orders on other maps. This is just a usability thing. I also expect:
  1. You can force end turn by explicitly pressing the end-turn button, which will just end the turn without moving any units you haven't bothered to give orders to (as it does now), whatever map they are on
  2. You can switch between maps at will (subject to us having a UI for that of course!)
Similarly for viewports within a map.
This seems like a whole lot of progress, I'm excited. Do you have any ETA on when we can see the C2C-port of this whole thing? I think that that is when SO wants to start the freeze once we have multi-map implementation.
Well, independently of Lytning's progress on the turn model stuff, the viewport part (which leverages the working multimap garphical switching code) will be portable over once I get enough of it working. Next week hopefully would be a good goal. This will include a port of the baseline multimap code (viewports use aspects of it fairly intimately), but will not be enough for multimaps themselves to be enabled until Lytning finishes (and I then port) the turn model stuff. It WILL be enough for viewports to operate however, at least at a demo-only sort of level since we won't have decent UI for viewport creation, selection, etc. at that point.
 
@Koshling

Last week you sent the core team a progress report on your multi-maps. Which was mostly bad news. Do you have a more positive outlook on it now, or are you worried it might not work out in the end? Do you have plan B if things don't work out the way you want it?

I'm more positive now, though there are still quite few issues to work through.
 
What pitfalls are there with the Multi-Maps and such, besides the aforementioned issues with turn ending and the Military advisor being poorly set up?

A great deal would need to change. The military advisor would also need multiple semi- mini maps just for starters.
 
A great deal would need to change. The military advisor would also need multiple semi- mini maps just for starters.

It's not possible ( I'm fairly certain of this now) for the minimap embedded in python pages (which is what the map in the military advisor is) to display more than the currently selected map. Obviously we can list only units on that map, or (probably better) list those plus the number you have in total of each type in brackets or something. Also we can add controls to select the map the advisor screen is viewing. What we cannot do is have it display multiple minima's for different underlying maps at once.

By biggest outstanding concern is just performance (time to switch maps). Viewports should mitigate this, since your only actually switching viewports, which can be kept down to a reasonable size, independent of map size, but the switch time will likely still be enough that well very ,uch want to minimize the amount of map switching you need to do each turn.
 
Back
Top Bottom