View Full Version : MiniMaps


chrusion
May 20, 2006, 02:24 PM
:mischief:
Hello all,
Thank you 12m for setting me up to join all of you!

I am a C++ programmer with experience in diff tools, complex data structures, and pseudo-random algorithms.

I must confess that Civ IV shares my favorite game shelf.
Currently on the shelf are:
Civ IV, Galactic Civ II, Space Rangers 2, Pirates!, and X3:The Reunion
I am a die hard fan of Fallout and have been playing a multitude of diverse computer games since the amazing Super Pong Pro Am Ten! (1976).

Let me know if you need help somewhere.

:scan: Sub-Map :scan:

So, my first sub project idea is to enable Sub-Map for each Civ IV tile. This functionality would allow mods to include tactical levels of detail from combat to sim cityish building management to RPG sub-quests to ... :crazyeye:

I have only had a little time till now to survey the SDK to find the places to start. I would appreciate any pointers anyone can give me.

My first rule is that I use as much current functionality as possible to implement this.

The Sub-Map is able to use a derived hierarchy of the classes that govern the current map and AI.

The mini map for each tile is small with as little persistent data as possible.

To see a Sub-Map the player "zooms in" to the tile. The Sub-Map is generated with tile details on the fly at this time in a manner similar to the way the world map is generated. Coordinate cacheing is implemented for persistent data. Wandering persistent data will be pseudo-randomly distributed based on last time seen by the player and current "job" of the object.

To get this running with baseline civ objects is the first major milestone.

:D

Thanks for your help.
Again, let me know where you need help.
Chrusion

The Great Apple
May 20, 2006, 05:15 PM
Sounds interesting. It would have to be generic enough to be able to be used in many mods, so I would suggest making a post in the C&C forum to see what people want.

How would this feature be turned on or off by the modmaker? Would you create a python trigger to enable a minimap, or maybe something else?

I would suggest trying to code as much as you can of it in python so that it can be easily tweaked to meet an indivudal mod's needs, or at least have loads of configurable options available for modmakers.

As for hints on whereabouts in the SDK you want to look, I'm not sure I can help. As far as I am aware nobody has managed to get the graphics to display in any different way to normal graphics, and as alot of the graphics engine is hidden, I would expect it to be rather tricky. This may cause you problems in the actual visual part of the mini-map.

I also suggest you think up a different name! When I saw this I thought you meant the mini-map of the world in the bottom right hand corner - this is what is normally called a mini-map.

Impaler[WrG]
May 20, 2006, 06:05 PM
I would sugjest "sub-plot map/grid/battleboard"

Your plan for generating at-zoom-in sounds very nice, I would recomend using the plots x, y cordinates along with a seed saved in the game file. These will be consistent and can be mashed together in some mannor to get a seed for generationg the mini maps base terrain by calling the Map Generator with arguments that varry based on the plots terrain. Then use it a second time to apply features like forests and improvments onto the mini map. Everything should be consistent untill the player alters the tile.

As for what the nature of the mini-map I assume your going with gridlayout, I would recomed a default 8x8 to create a chessboard so your armies can fight it out Chess style! Ofcorse you could have a value in the Global Defines.xml to incresse or decreese the grid size.

chrusion
May 20, 2006, 07:35 PM
']I would sugjest "sub-plot map/grid/battleboard"

I agree, this sounds good. I think I will call it a Sub-Map.

']I would recomend using the plots x, y cordinates along with a seed saved in the game file.

Yes, exactly, I would write baseline code that inturprets the tile values and places the appropriate objects, units, etc.

']Ofcorse you could have a value in the Global Defines.xml to incresse or decreese the grid size.

I think the grid size should be in game start options.
Which leads to:

How would this feature be turned on or off by the modmaker?


I would put a simple boolean out in XML, with Python configurability down to sub-grid special object/functionality locations. The mod will have the ability to turn on a game start options panel to choose the size of the sub-grid and other related player options.

Slightly a side issue: I think that giving the player access to complex options is a good design decision if these options are obscured in layers of a few top level preconfigurations. The preconfigs have to be good and the gameplay must not depend on knowledge of how to tweak obscure options.

I will start a public thread to get opinion.

12monkeys
May 21, 2006, 04:17 AM
Welcome in the team, Chrusion!

You may also introduce yourself in here (http://forums.civfanatics.com/showthread.php?t=167612). This allows everybody to check what your skills are your current work/status.

Your sub-plot maps really sounds interresting, but I think that it will heavily impact the SDK and the Python API in total. You should take care not to mess up the existing SDK and API functionality.

However, good luck with your concept and if you have questions don't hesitate to ask.

12m

chrusion
May 21, 2006, 01:39 PM
I want to be careful.
My first goal is to make it an option that can be turned on and off by modder and / or player.
I will inherit class derivatives for functionality.

Gerikes
May 21, 2006, 02:52 PM
I was pondering this during a compile and wondering what the chances are of using the save game to save the state, and just load up a new instance of a save for each time you delve into a city/battle/zoomed in whatever? You could probably use some sort of stack data structure to keep track of what save spot you're in / are loading to. Also, some system will be needed that can relay from one game to the next the state of the previous game (so a zoomed-in combat system can return results to the zoomed-out mode).

It sounds like an intersting project, I really hope it can be done without too much trouble. Otherwise, I'd consider making it a kind of side-project. For example, a person can download the normal Civ4CCP, or an entirely different package, the Civ4CCP-Minimap, which contains everything the Civ4CCP has as well as the Minimap feature.

If other such larger projects become available (Pseudo-realtime :mischief: ) then perhaps those can be their own branches as well. Of course, you'd need to make sure that the person in charge of those branches update their branch along with the main code, because unless it proves to be super-stable, it might not ever get merged back into the trunk.

chrusion
May 22, 2006, 11:27 AM
I was pondering this during a compile and wondering what the chances are of using the save game to save the state, and just load up a new instance of a save for each time you delve into a city/battle/zoomed in whatever? You could probably use some sort of stack data structure to keep track of what save spot you're in / are loading to. Also, some system will be needed that can relay from one game to the next the state of the previous game (so a zoomed-in combat system can return results to the zoomed-out mode).

I like your idea!

I think this may be the baseline that I will start the mod on.

Very good insight. I will look at inheriting from the save game classes.

I don't think I will have to branch. I do not want to do that.
I want to make sure that what changes I make are invisible to the plain Civ game in which this mod is unused (either by modder choice or by player choice).

chrusion
May 22, 2006, 06:26 PM
I have added two public threads.
Actually, Underworld was added before I started posting here.
(in sig)