[SDK] Sub-Map: “Zoom-In” on Tiles for Tactical Combat Map, Simcity-ish Building, RPG

chrusion said:
SDK analysis leads me to believe that deriving from the CivGlobals class is the best place to start. The objects of the derived class will each represent a Sub-Map. Only persistant changes need to be stored. All other data can be shared.

CivGlobals is a Singleton but a derived class could have a dynamic datastructure to hold multiple object instances of the class and still maintain a pseudo-Singleton appearance.
I have designed a datastructure that may be perfect for this implementation.

Can I see what you made so far?

I had the same idea which is why I started with downloading the SDK in the first place. Do you have resources about the SDK to get into more quickly?

Making sub-maps would require that recursive data structure to appear to outside classes as one map, the one which is currently selected. I can imagine two situations:
1. The submap is entered by user action, i.e. a combat map is created at the start of a combat. Then there are several sub-turns inside the map with different tiles, different units, different ai, different users (only those involved in the battle). So you would have a complete little sub-game.
Questions:
- how are the elements (xml+python) of that sub-game initialized? I think it should be able to mod submap rules independently. (subfolders ?)
- how do you perform several turns inside the submap and then return to the main game at the point where you left it? Do we control the main turn loop?

2. There are persistent submaps, i.e. city submaps or planet submaps. They would be recursively travelled each turn, as if they were areas of one big map.
- AI would need to know about submaps and how to make use of them. Also how to deal with different rules inside submaps. Modders should be able to add python code to extend AI into using a specific submap mod.

Great thing, really. I hope we see it all working. I'm far behind in my knowledge about the system, but I'll try to catch up.

Albert
 
albertd,
you got me thinking!

It may not be as difficult as I have begun to believe.

First, some hurdles:
We do not have control of the game loop.
This means we have to trick CivIV into playing the Sub-Map turns while it thinks it is playing normal turns.

Here is a plan:
Each tile gets two more dimensions: U & V
U is the Sub-Map name for its X axis.
V is the Sub-Map name for its Y axis.
Now everything is located at a coordinate (X, Y, U, V).
CivIV does not care about U or V. This is good. The game will play normally.

On the switch to the Sub-Map of (X42, Y38), all the UV coordinates in this tile begin to be read as XY coordinates, the UV map is generated on the fly with a pseudo-random algorithm, and all items not on (X42,Y38) are disabled.

The pseudo-random algorithm assures that the same terrain will be randomly generated for this tile every time it is entered. It is also a possibility to allow AI to place units, buildings, and upgrades in “Virtual” Sub-Maps generated by a well tuned pseudo-random algorithm.

Switching back to the Strategy Map would erase all non-persistent data in the UV Sub-Map and restore the XY Strategy Map. All XY items would again become active.

Time could also be given an extra dimension. Sub-Map time would swap in while in a Sub-Map.


There is still more to think about.
 
Man I am glad you are still on the case. Keep up the good work. Alot of us are very interested in what you are doing.
 
This sounds like it might actually turn into something.

While there is nothing I can really do to aid you, I can at least let you know that your efforts will be very much appreciated.
 
yea please keep on working, imagining my regiments mod in a tactical combat map would be a dream!!!!
 
I have been sending requests to Firaxis since Civ III to have them put in a purely OPTIONAL tactical combat system much like Age of Wonders has. If they wrote it into the system from the start as an optional thing, i think it would be pretty easy to implement, and with it being optional, those that do not want it simply do not have to use it.

What i would suggest then, is that everyone interested in seeing something like this happen go to the Firaxis site and send them feedback saying you want to see Tactical Combat in Civilization. Even if we have to wait for Civ V, i'd still like to see it implemented.
 
Back
Top Bottom