Geo Realism: Discussion on a new SDK based map generator

Really, rightfuture, that kind of talk is good for PR but it actually contains very little in terms of content (too many buzzwords).

The base Civ4 mapscripts use fractals and the others use all kinds of procedural generation with a mixture of geo-derived methods.
Crime and pollution distribution is calculated with a diffusion method similar to what you would use in physics (solving a system of partial differential equations).

AIAndy - Thank you kindly for your feedback and discussion. I always appreciate it.

I actually do think this way with no apologies.
I feel strongly about you guys with good and specific reasons, and can accurately and specifically defend most of you guys' individual exceptionality in different ways.
Sometimes I may come off a little positive and optimistic (yeah, I know), but I do feel strongly about C2C, and your work. I also feel strongly about C2C's progress and potential, and I have no illusions about it's limitations or reality. Things are what you make of them, and I'm neither blowing 'smoke' nor being careless with my praise.
Just because it's glowing or descriptive doesn't mean it's not accurate nor deserved.

When I meet new people, they can somewhat frequently think that I'm exaggerating because I make some claims that seem unlikely, but almost everyone who eventually gets to know me, Will pull me aside at some point and tell me that they were wrong about that. It is a matter of perspective what you believe ATM. I would rather you find out for yourself than take my word for it or try to change it.
I concede that I should probably tailor my conversations for a disbelieving and skeptical audience, but I've discovered that some people won't believe you anyway, and if it's accurate then people will be able to see for themselves, even if it takes a long time. I neither claim that I am right about everything I say, or that my desire to be positive and appreciate in my obviously 'PR' fashion is not a little 'enthusiastic'. Please factor-in that I fight pretty severe exhaustion from sleep apnea, and that I have had to overcome some terrible odds more times than I like to count.
I hope you all take me at the truth you can see for yourself, and give me a chance to prove that I believe it.



As far as my content I will be more specific.
As far as the links I'm not sure if you were referring to the real time infinite detail graphic rendering video, the elite procedural generation video or my statements on the ideas in general. I did mean what I said about everybody and C2C.

My purpose was to draw everyone attention to the ability to 'vary up' formulas to produce complex behavior and content.
The links I used above were there to illustrate in general, the relatively complex behavior(and content) can be simulated with simple formulas.

To simplify even further, imagine a fixed fractal formula for a tree leaf/stem being applied to a procedural generation formula (basically a random appearing -{actually non-random} seed/formula that can generate/re-generate content or patterns on the fly). It is basically a linear formula that repeatedly iterates(writes over itself) to produce a much more complex texture.

It can be used to draw a leaf, a tree, and even a forest using techniques to apply that fractal texture with slight variations. This can be done using very similiar formulas to apply to map and terrain generation, (like the mapscripts being mentioned in this thread). With slight variations fractals can create complicated.

Simple behavior AI, can likewise be generated using certain non-linear formulas which can exhibit slightly varied iterations(basically loops) that can simulate basic behaviors.
Simple variations (with non-random seed formulas like procedural generation and fractals) can tweak the formulas direction so that it settles into a slightly different behavior. ( I know you understand most of this, just illustrating for beginers)
For example, Imagine the scouting behavior where a unit cycles between 2 points.
- This is usually a linear pathing formula. Go from point A to point B. And reverse it to form a loop. The formula basically outputs x,y coordinates between the x/y map coordinate of A and B.
- A looped non-linear formula is basically a circle that iterates (or changes slightly) in a known pattern (with some potential variations). They can create constrained behavior that follows some interesting rules and appears natural and potentially intelligent. This and some very basic learning algorithms were probably the explanation for the intelligent animal behavior in the LionHead video game Black and White. It doesn't take much to create complex behavior but you have to understand it, to make it work. Imagine scouting patterns that are not always predictable, but can deviate slightly and keep the game interesting. I am always a fan of 'living world' type behavior. Sim Earth, Sim City like games that use behavior that can be approximately modeled with patterns and statistic trending.
- Like in the video on procedural generation, applying simple fractal formulas can make non-random patterns seem quite random and differentiated. Think of the difference in programs like MS Paint and Photoshop. A brush in MS Paint from a single x,y data point would probably be a dot or a point. A brush in Photoshop can be textured with complex 'fractal' patterns that easily make 'paint' an extremely large variety of textures with simple formulas that are still based on a single x,y data point. To make things appear more complex,varied, and detailed fractals can be very useful.

Used correctly, any of these formulas can produce and re-produce relatively complex data relatively little management or resources. All you have to do is look at higher resolution terrain generation software of most types to see it working faster than you suspect.

(as you said AIANDY some of those links were intended as advertising and somewhat suspect in their benefit. Most people do not spend money to advertise vaporware, though they will talk it up with their purposes in mind. All in all they can be potentially useful. I think their underlying concepts were sound or I would not have shared them. And I also think the discussion was worthy of helping this thread and more.)

I hope I have made myself more clear. Please excuse my tendency to invariably and inconsistently deal my words and thoughts. Severe exhaustion will do that to anyone, I just have to fight it more than most.
My point here is that I am pretty sure that what I'm saying has more value than you may consider.
I do have a tendency to over simplify or make things more complex then they have to be. Mostly because I'm distracted.
So please consider my statements and arguments because I believe strongly that they could help C2C. Please ask me to clarify if you think I'm approaching this too simply. I may only know so much, but I am usually a lot more knowledgeable that people think.
We all benefit from feedback.
 
As far as my content I will be more specific.
As far as the links I'm not sure if you were referring to the real time infinite detail graphic rendering video, the elite procedural generation video or my statements on the ideas in general. I did mean what I said about everybody and C2C.
I made separate comments about both videos.

My purpose was to draw everyone attention to the ability to 'vary up' formulas to produce complex behavior and content.
The links I used above were there to illustrate in general, the relatively complex behavior(and content) can be simulated with simple formulas.
And that is deeply ingrained in the C2C code already.

To simplify even further, imagine a fixed fractal formula for a tree leaf/stem being applied to a procedural generation formula (basically a random appearing -{actually non-random} seed/formula that can generate/re-generate content or patterns on the fly). It is basically a linear formula that repeatedly iterates(writes over itself) to produce a much more complex texture.

It can be used to draw a leaf, a tree, and even a forest using techniques to apply that fractal texture with slight variations. This can be done using very similiar formulas to apply to map and terrain generation, (like the mapscripts being mentioned in this thread). With slight variations fractals can create complicated.
Which is why it is the method the basic Civ mapscripts use.
On the graphics level we can't use it because the Civ engine does not allow us to (besides that Civ needs a lot of different graphic types that cannot easily be derived form one another).

Simple behavior AI, can likewise be generated using certain non-linear formulas which can exhibit slightly varied iterations(basically loops) that can simulate basic behaviors.
Simple variations (with non-random seed formulas like procedural generation and fractals) can tweak the formulas direction so that it settles into a slightly different behavior. ( I know you understand most of this, just illustrating for beginers)
For example, Imagine the scouting behavior where a unit cycles between 2 points.
- This is usually a linear pathing formula. Go from point A to point B. And reverse it to form a loop. The formula basically outputs x,y coordinates between the x/y map coordinate of A and B.
- A looped non-linear formula is basically a circle that iterates (or changes slightly) in a known pattern (with some potential variations). They can create constrained behavior that follows some interesting rules and appears natural and potentially intelligent. This and some very basic learning algorithms were probably the explanation for the intelligent animal behavior in the LionHead video game Black and White. It doesn't take much to create complex behavior but you have to understand it, to make it work. Imagine scouting patterns that are not always predictable, but can deviate slightly and keep the game interesting. I am always a fan of 'living world' type behavior. Sim Earth, Sim City like games that use behavior that can be approximately modeled with patterns and statistic trending.
What do you think the Civ AI does?
Search for optimum value strategies with some random and flavor based variations (which in an environment with leader and environment based start differences results in usually different behavior). In such a complex environment as C2C is you don't really want to stray too far from the presumed optimum as you tend to not be even close to the real optimum.

- Like in the video on procedural generation, applying simple fractal formulas can make non-random patterns seem quite random and differentiated. Think of the difference in programs like MS Paint and Photoshop. A brush in MS Paint from a single x,y data point would probably be a dot or a point. A brush in Photoshop can be textured with complex 'fractal' patterns that easily make 'paint' an extremely large variety of textures with simple formulas that are still based on a single x,y data point. To make things appear more complex,varied, and detailed fractals can be very useful.

Used correctly, any of these formulas can produce and re-produce relatively complex data relatively little management or resources. All you have to do is look at higher resolution terrain generation software of most types to see it working faster than you suspect.
Please don't make assumptions about what I suspect or not suspect.

(as you said AIANDY some of those links were intended as advertising and somewhat suspect in their benefit. Most people do not spend money to advertise vaporware, though they will talk it up with their purposes in mind. All in all they can be potentially useful. I think their underlying concepts were sound or I would not have shared them. And I also think the discussion was worthy of helping this thread and more.)
The ones I looked at were empty of real information (for non beginners) or sold things far higher than their real value without mentioning disadvantages.

I hope I have made myself more clear. Please excuse my tendency to invariably and inconsistently deal my words and thoughts. Severe exhaustion will do that to anyone, I just have to fight it more than most.
My point here is that I am pretty sure that what I'm saying has more value than you may consider.
You have not convinced me of that yet as I think you still underestimate what we do in code (otherwise why would you write text about simple uses of fractals and link simple videos about procedural generation but ignore the cases that are already in Civ/C2C).

A lot can be done with procedural generation but sometimes that just means moving effort from art into coding that makes art (which can be quite satisfying though).
Don't get me wrong. I love procedural generation but you need to know when to use it and when not or you end up with a hammer and nail syndrome.

A small example of what can be done in 64k with procedural generation when it is directed at making a video (and not at generating varied content):
http://www.pouet.net/prod.php?which=59107
 
Just thought I would update everyone on the progress and also share an important proposal for changing oceanic tile layout

What is complete...
  • The algorithm for determining the climate of a plot (There are a few more climates that need to be added but that will not be possible until testing is under way).
  • Most algorithms for determining climate properties of a plot.
  • Biomes XML (including color codes)
  • Vegetation XML (except color codes used on map)

What is incomplete:
  • I need to add final rough touches and make some adjustments to the weather simulation algorithm
  • Python code to add map views to UI (I could use some help with this... even some pointers regarding simple widget creation and placement would help.)
  • SDK code to create map views upon request (I think I've figured this part out)
  • XML Schemas need to be updated to latest specification.
  • XML class loading insertions into XML loading routine (SDK).
  • Code to save new plot data to save game.
  • Link engine into map generation.
  • Testing! Testing! Testing! (and adjustments to physical constants to increase accuracy).
  • Ocean biome algorithm (see below)

What needs to change:
Currently oceans are divided into three climate zones: polar, normal, and tropical. I think this is good. However, I would like to change the way these zones are placed. Currently, latitude is the basis for their location on the map but this is only part of the equation in real life. Ocean biomes are based on the movement of ocean waters in gyres (global systems of ocean circulation). This will not restrict polar and tropical oceans to a specific latitude. On west coasts (with normal planetary rotation) the polar climates will creep far to the south. On east coasts (and at the ends of swift moving tropical currents) tropical biomes will creep to the north. (See the picture below for details).

In addition, the depth of the water is a significant factor when the depth is below around 400 meters. I anticipate 6 ocean climates; two for each general temperature zone: a "oceanic" climate and a "reef" climate (shallow water). For now, this shallow environment will be limited to "coastal" waters. However, when the geology engine is added, the actual depth of the ocean will be the main factor.

Image of global ocean gyres that determine oceanic climate:
currents-746x374.jpg
 
Sweet, PrimOver I am so glad you are here and part of the team.

Did you get a chance to see this?
Ultima Ratio Regum (not mine)
http://www.ultimaratioregum.co.uk/game/info/
https://www.facebook.com/UltimaRatioRegumRoguelike
It is a serious terrain generator game with climate, biomes, etc and is a full historical simulation and game like C2C based on Civ, Sim City, Ultima(no fantasy), and roguelike games(no fantasy).
Basically it is very similar to what you are planning on doing in C2C. I recommend checking it out.
The first thing I thought of when I stumbled on it last month was you and the GeoRealism Generator. Might be nice to engage the guy in conversation, he said he was impressed with C2C and would be glad to talk about it. Hoping you guys can talk and share ideas. He also reminds me of you a bit.
Would be nice if he would be willing to explore ideas together with you and C2C.
At the very least it might help you with the GeoRealism generator and further ideas for C2C. I actually played it for 5 minutes and it's very interesting. Nothing I have seen has been this complex so far (other than C2C of course).
What do you think?
 
Interesting. Not fond of the non-GUI (text base graphics) though I do admit they require a lot of talent to create those kinds of scenes. I don't see anything on map generation on the sight other than the fact that he uses biomes.

The map seems a bit off in terms of biome placement but it is more accurate than Civ IV. Mountain placement seems fairly realistic but oddly, rivers disappear into small lakes too often rather than going to the ocean.

I may contact him if I can find an email.
 
I'm glad to see such amazing progress taking place here prime! Really looking forward to further development.

We were having a discussion in a new thread on multi-map project. I think we may need your help there. And some of the guys taking a look at what limitations we need to overcome there may be able to help you in turn with some of your needs for assistance. I'm thinking y'all might be able to make some trades in effort so both projects can start coming together (which would be appropriate too...)

Take a look at this conversation here for more details.
 
@Primem0ver:

Great work so far! It is also timed well, as we go into freeze soon and release V28 on the 28th of the month (coincidence? probably.). I look forward to seeing this in C2C.

Also, I can't remember if you saw this or not, but I added two new mapsizes to C2C at the end of November (both larger than Gigantic). I'm not certain if this impacts GeoRealism at all but I thought you should probably know that.
 
Great work so far! It is also timed well, as we go into freeze soon and release V28 on the 28th of the month (coincidence? probably.). I look forward to seeing this in C2C.

This is supposed to be the 26th everyone, according to DH, i want it to coincide with Australians Holiday.
 
Really? I think it would be nice to have the 28th version come out on the 28th of the month. :p

ahaha i never even thought of that, good idea, sorry DH, but this makes more sense!!;)
 
@Primem0ver:

Great work so far! It is also timed well, as we go into freeze soon and release V28 on the 28th of the month (coincidence? probably.). I look forward to seeing this in C2C.

Thanks, I appreciated it but I am afraid it wont make that cut unless someone helps. First, the map views need to be programmed before I can start testing. Then, testing may take some time because I very seriously doubt that the simulator will get it right the first time through. Many of the physical "constants" used by the simulator are educated guesses that probably require a lot of tweaking before it works right. This testing is the reason we need the views in place since I will need to use them on a real world map to make sure the simulator is simulating climate correctly (if the climate map we get is similar to the real one... we know we have got it right). We may get lucky and get it after a few tries but I am not going to hold my breath.

Either way though, I will need to convert it to C2C since the testing will take a lot less time in vanilla.
 
Thanks, I appreciated it but I am afraid it wont make that cut unless someone helps. First, the map views need to be programmed before I can start testing. Then, testing may take some time because I very seriously doubt that the simulator will get it right the first time through. Many of the physical "constants" used by the simulator are educated guesses that probably require a lot of tweaking before it works right. This testing is the reason we need the views in place since I will need to use them on a real world map to make sure the simulator is simulating climate correctly (if the climate map we get is similar to the real one... we know we have got it right). We may get lucky and get it after a few tries but I am not going to hold my breath.

Either way though, I will need to convert it to C2C since the testing will take a lot less time in vanilla.

I wasn't saying that to say that it would be in by V28. I do expect that the testing can be mostly be completed by the end of the freeze, meaning that it could come in early V29 development.
 
Thanks, I appreciated it but I am afraid it wont make that cut unless someone helps. First, the map views need to be programmed before I can start testing. Then, testing may take some time because I very seriously doubt that the simulator will get it right the first time through. Many of the physical "constants" used by the simulator are educated guesses that probably require a lot of tweaking before it works right. This testing is the reason we need the views in place since I will need to use them on a real world map to make sure the simulator is simulating climate correctly (if the climate map we get is similar to the real one... we know we have got it right). We may get lucky and get it after a few tries but I am not going to hold my breath.

Either way though, I will need to convert it to C2C since the testing will take a lot less time in vanilla.

I think he is mainly talking about UI displays for the additional info that he added to plots (meaning after map generation)?? "per other modders"

If that's the case it isn't fundamental to the use of the simulator to generate the map, since no mechanism use the addition properties anyway, so I don't really see that it precludes its use without that ability as an interim release. "per others modders"
 
What is incomplete:
  • Python code to add map views to UI (I could use some help with this... even some pointers regarding simple widget creation and placement would help.)
  • SDK code to create map views upon request (I think I've figured this part out)

What is it that you want to see here? Would a non interactive (scroll and hover over only) pop-up screen that shows each overlay do? Or do you need a fully game integrated system? Not that I am capable of doing either at the moment. :( Edit would a text version of the overlays be enough? Something like a trace print that comes out with some of the map scripts identifying the terrain in each plot as a character?

I think he is mainly talking about UI displays for the additional info that he added to plots (meaning after map generation)?? "per other modders"

If that's the case it isn't fundamental to the use of the simulator to generate the map, since no mechanism use the addition properties anyway, so I don't really see that it precludes its use without that ability as an interim release. "per others modders"

Some of the information being generated would be very useful in enhancing game play.
 
I think he is mainly talking about UI displays for the additional info that he added to plots (meaning after map generation)?? "per other modders"

If that's the case it isn't fundamental to the use of the simulator to generate the map, since no mechanism use the addition properties anyway, so I don't really see that it precludes its use without that ability as an interim release. "per others modders"

To be very specific, I should explain the way these additional properties will be represented.

There is a new base class in the SDK called "CvGeoStats." This class has all new plot properties that will be persistent throughout the game. These properties will need to be accessible for a number of reasons in addition to the new "views" I hope to add. These stats are assigned to a new variable of type GeoStats* (a pointer to the actual class instance) that has been added to a plot. These are in a sense "plots" unto themselves except that they are moveable. In other words, the set of stats can be reassigned to any plot in the game. This will allow the stats to move with the plate system in the plate tectonic simulation (though technically, the simulation will actually be moving instances of the CvGeoStatsPregame class below).

There is also a new "CvGeoStatsPregame" class which is derived from CvGeoStats. This will add extra statistics that are only needed for the engine itself before the game starts.

When a map is created, all GeoStats objects are actually GeoStatsPregame objects to start with. When the GeoRealism engine is finished the simulation used to create the map, all persistent stats are copied to a new GeoStats instance and linked to the final plot in the equivalent position on the map. EDIT: The larger "GeoStatsPregame" objects are then freed (destroyed) so that less memory is used.

What is it that you want to see here? Would a non interactive (scroll and hover over only) pop-up screen that shows each overlay do? Or do you need a fully game integrated system? Not that I am capable of doing either at the moment. :( Edit would a text version of the overlays be enough? Something like a trace print that comes out with some of the map scripts identifying the terrain in each plot as a character?

Ideally I would like an additional layer of buttons on the mini-map that are reachable by "shift-clicking" the globe layer (rather than simply clicking). However I am not sure that is possible. Otherwise we could add an additional button that replaces the globe layer when clicked and puts the original buttons back when clicking again. If that isn't possible, then I suppose a generic button somewhere will have to do.

However, wherever the buttons are located, they should work like the globe layer buttons do. In other words, they should pop up a list when pushed that allows you to view all viewable items together or individually. For example, I should be able to view ALL biomes at once or a single biome type.
 
Would it be possible to manipulate parsePlotHelp so that you have hotkeys (like holding down shift perhaps?) that bring up the geolayer info instead of the usual plot info when you're hovering over a plot? Would that be sufficient or is it important to make sure that players can get strong visual cues regarding the map details on a big picture level?
 
Would it be possible to manipulate parsePlotHelp so that you have hotkeys (like holding down shift perhaps?) that bring up the geolayer info instead of the usual plot info when you're hovering over a plot? Would that be sufficient or is it important to make sure that players can get strong visual cues regarding the map details on a big picture level?

Well it certainly was possible for the property system, so I think it would certainly be possible for this. Whether or not it can be controlled by shift alt or control is another matter altogether, but from what I remember it should be possible.
 
My point is that I can actually set that up if its a sufficient enough solution for what he's needing. So I guess I'm not asking if its possible but rather if such a setup would be a valid solution for his needs.
 
Would it be possible to manipulate parsePlotHelp so that you have hotkeys (like holding down shift perhaps?) that bring up the geolayer info instead of the usual plot info when you're hovering over a plot? Would that be sufficient or is it important to make sure that players can get strong visual cues regarding the map details on a big picture level?

It isn't really necessary for other players to see for play value. It is just a nice feature that brings some educational value to the game. It is however necessary for me to see since I would like to see at a glance how well the simulator works instead of looking at plot popups all over the place. I could create an external program to do it if necessary but that would be an unnecessary pain if we can get the views to work in BtS/C2C.
 
Ok. Then perhaps a button isn't what we need so much as a set of hotkeys to change the plot graphics to a different setting. If most players don't need to be more concerned with it than what a hoverover could express, then a combination of hotkeys to switch the map view would work. Later on that could be adapted to a button but I THINK AIAndy is the only one I've known to work out how to add a button to the UI in that manner.

In the meantime, players could still access the different mapview and be told how to do so via a quick bottom line in the hoverover plot help popup.

I'm not sure, however, how to get a hotkey combination to trigger at any time. I've only worked on them in relation to help popup views. I suppose if I tied it into the plot help hover, as in: "Hold down this particular combination of keys and move the mouse pointer to a new plot to activate the next map view".

You know... there are existing buttons there too for map view changes. Perhaps the code that reacts to each button press could be isolated and an additional option in the cycle could be tied in.

I believe the trick to this is a matter of changing the reference skin on the terrains themselves so that it switches from the usual skin of the terrain to the colors the representing the geo-definition on that plot (assuming I'm understanding everything you're saying here...) That would take some identifying of where the game asks for the terrain's graphic skin and adjusting the return to redirect to the plot data and the geo-definitions instead if the gamestate has changed to showing the geo data thanks to the use of that button.

I'm pretty sure a button already exists that could have another 'phase' added to it harmlessly.
 
Back
Top Bottom