Underwater Cities Development

primem0ver

Emperor
Joined
Jun 16, 2006
Messages
1,158
Location
Peoria, AZ
This thread is to discuss the implementation of Underwater Cities.

I will describe the general idea behind the Underwater cities. Keep in mind that I did not write this part of the mod. It was done before I joined their team. It was written by a user named Major who no longer plays Civ IV. He quit playing (and modding) just as he finished writing the code around September 2006. That was when I took over as the SDK programmer for the Genetic Era Mod. As a side note, I don't think Major was really a huge fan of CTP. I think he did it for the challenge more than anything. He did an excellent job incorporating undersea cities into Civ IV (Warlords).


In "GenEM" (Stands for Genetic Era Mod. How's that ls612?), underwater cities and tunnels worked in tandem. When underwater cities were first added Major programmed it so that:

  1. Underwater cities could be built anywhere in the water except along coast lines**.
  2. One had to use the tunnels to get units into a city.*
  3. Units in tunnels could not be attacked by ships or aircraft.
  4. The only way to destroy units in a tunnel was to use the tunnel or to pillage the tunnel where the units were located.
  5. The SDK was modified so that ALL ocean tiles (without ice) displayed the work icons since Underwater cities meant that they could be worked.
  6. I am not sure if hover vehicles could destroy them since hover vehicles could technically speaking have used the tunnels or just "hovered" to the location.
    We would have to make sure that this didn't happen.
  7. We added improvements to take advantage of kelp, fish, frozen methane, and coral reef bonuses around underwater cities. (These were all bonuses in GenEM)

* I can't remember this with certainty. It may be that ships could bring friendly passengers to the city. I don't honestly remember trying this.

** Major later limited the location where underwater cities could be built. I am not sure when the first criteria was added. It may have been part of the original implementation.

1. An underwater city could only be built within 5 spaces of your cultural borders.
2. An underwater city had to be built in a place where frozen methane was in the workable area.

I later removed the 1st criteria although I am uncertain whether I officially released that change in a patch.

I believe all of these features are feasible within BtS. My only concern with underwater cities in BtS is the graphics both with the water and with the L system. I do not know how to convert the L System stuff.

I am concerned with getting the "underwater" look. If I understand Dancing Hoskuld's comment about hrochland's graphics correctly, we can deepen the ocean. Can anyone confirm this?
 
Sorry... out of time ATM. Will post again when the initial description is updated. Hopefully by tomorrow.
 
I updated the first post so we are "open for business" so to speak.
 
That all sounds really spot on. Though I'd prefer it not to have a methane prereq.

I don't know much about the graphics as they are established but I do have some understanding of 3d graphics in general and I can't see why it couldn't be done to sink the ocean base much lower.

All in all, this would be really wicked to see come about and I can see it leading into colonizing watery planets on multi-maps too.
 
...We added improvements to take advantage of kelp, fish, frozen methane, and coral reef bonuses around underwater cities. (These were all bonuses in GenEM)

We already have these and more sea resources. Although at the moment they all look to be on the surface rather than under the water.

I believe all of these features are feasible within BtS. My only concern with underwater cities in BtS is the graphics both with the water and with the L system. I do not know how to convert the L System stuff.

I am concerned with getting the "underwater" look. If I understand Dancing Hoskuld's comment about hrochland's graphics correctly, we can deepen the ocean. Can anyone confirm this?

SO knows most about the L System stuff. My comment was based on the way SaibotLieh's whale is animated to be completely below water some of the time. It is a great bit of animation.
 
Thunderbrd said:
That all sounds really spot on. Though I'd prefer it not to have a methane prereq.

We can make it an option at the beginning. OR we can create a select few situations in which a city can be built. See below. Personally, I like the requirement because it makes sense. I will say though that our maps had a LOT more methane than yours do. And it is true that methane is quite plentiful on the ocean floor, though it usually occurs in large regions rather than individual small plots.

The methane requirement doesn't have to be the only option. I think that placement of underwater cities should be limited by having the player meet one of the two requirements listed below.

In order to establish a sea colony, the player must either:

1. Place the undersea city someplace where Methane is within the workable area. OR
2. Have access to either methane or natural gas AND the colony must be connected to an existing sea tunnel (under the assumption that pipes supply the methane). OR
3. Have access to a technology that allows some other futuristic power and heat source in order to build anywhere.
 
Dancing Hoskuld said:
We already have these and more sea resources. Although at the moment they all look to be on the surface rather than under the water.

I am not completely sure because I have only worked with graphics a little bit, but I believe this can be corrected by lowering the position of the main object in the graphic's space so that it is drawn at a negative offset. I think I have done something like this before. The problem with doing this with a whole city is that it will be much taller than both bonuses and improvements. See my next post for details.
 
Here is what underwater cities look like in Warlords. Notice how there is very little water surface detail to make it obvious that the object is above water... even if it is obvious when compared to the heights of things on land and objects next too it.

attachment.php


This is different in BtS. Now the surface of the water will crash against the side, making it obvious. We can make the outer shell a bit smaller, maybe change its shape to be less of a ball and more of a dome. (Or simply lower the graphic so that it sinks below the ground more).

Sorry... the other attached pictures are for the discussion on graded invisibility and vision improvements.
 

Attachments

  • sonarbuoy.png
    sonarbuoy.png
    214.1 KB · Views: 451
  • Undersea City.png
    Undersea City.png
    272.5 KB · Views: 3,428
  • vision range.jpg
    vision range.jpg
    99.8 KB · Views: 511
Right, but if we can deepen the ocean base a bit and lower the city graphic so it sits almost entirely under the upper surface layer, it should work quite nicely and look like one of the coolest graphic developments ever done in civIV modding.
 
Right, but if we can deepen the ocean base a bit and lower the city graphic so it sits almost entirely under the upper surface layer, it should work quite nicely and look like one of the coolest graphic developments ever done in civIV modding.

You don't need to "deepen the base". The default is to draw them on the surface as that is the "drawing base line" not the depth of the plot.
 
Right, but you said there were two layers to the ocean. I figure the bottom layer is quite opaque and if its not deep enough on the Y axis, you could submerge the city graphics to the point that it disappears under the base graphic level of the tile. I figure the base layer is probably pretty close to the surface layer since there was no expectation of having to show much real depth.
 
Right, but you said there were two layers to the ocean. I figure the bottom layer is quite opaque and if its not deep enough on the Y axis, you could submerge the city graphics to the point that it disappears under the base graphic level of the tile. I figure the base layer is probably pretty close to the surface layer since there was no expectation of having to show much real depth.

have you actually watched the humpback animation?:p
 
Probably not on the highest graphic settings... it suddenly seems to grow to 1000% size when it attacks. But from that and subs I still don't think it goes deep enough to truly encompass a city graphic very well. But I could certainly be wrong. It'd be wicked cool to see that city graphic fully submerged underwater.
 
If you guys want to play with the graphics let me know and I will post them. BTW... I don't have a lot of time during the week to work but I can work on weekends.
 
Maybe a stupid idea...
Why not merged this with multmap to have an "underwater map"? That can resolve some problem with tunnel, attack and all. This map ould show black impassable case where coast and land are, and some special terrain where oceans are, with maybe some special underwater feature/ressource
 
Maybe a stupid idea...
Why not merged this with multmap to have an "underwater map"? That can resolve some problem with tunnel, attack and all. This map ould show black impassable case where coast and land are, and some special terrain where oceans are, with maybe some special underwater feature/ressource

Yeah this has been discussed before where there would be 2 maps; 1 normal surface map and then one underwater/underground map. This would allow for both underwater and underground cities to occur.

Underwater you could place sea mounts, trenchs, vents, cold seeps, etc. And then have the cities as normal (with a bubble). Likewise other tile improvements could be made for underwater along with underwater tunnels. Submarines would float in the air like aircraft would and we could have even vehicles that drive around on the sea floor.

For underground you could only move to spots that have tunnels made or that had natural caverns. We could have underwater lakes and rives as well. Hidden deposits of minerals and even lava chambers under volcanoes. Possibly even mushrooms. Might even be fun to find a Cave Bear or Cave Lion in the cavern terrain.

To enter the underground you would either need to dig (unlocked by a technology) or find caves on the surface to enter from. One could even strategically burrow under another empire and surface in their territory. I could also imagine specialized "digger" vehicles that could pass through underground tiles without the need of tunnels.

Or even survive nuclear attacks by making your cities underground. Your surface empire is all radioactive while your underground empire is safe underground.
 
Maybe a stupid idea...
Why not merged this with multmap to have an "underwater map"? That can resolve some problem with tunnel, attack and all. This map ould show black impassable case where coast and land are, and some special terrain where oceans are, with maybe some special underwater feature/ressource

I would not like this idea. I think that Multi-Maps should be differentiated by a degree of physical system (earth from moon, moon from mars, solar system from galaxy, etc), and an Underwater map just doesn't have that. Especially if Primem0ver can get the graphics for the underwater cities working for BtS, that would be a far preferable solution IMO.
 
While I think the idea of hidden minerals and caves is a fun idea, I tend to agree with ls612 on this one. I don't like the idea of having to flip maps just to cross a bay, going from one continent to another. And with cities... how would you get back on the coast? You would have to show all beach tiles that the underwater cities link too. I would think that would make the underwater map problematic again.
 
Bad idea it will be to complicated. In Call To Power was underwater cities and they work well in the same map so wa can also do that in that way.
 
Back
Top Bottom