How to connect neighboured terrain tiles?

Discussion and contribution to game graphics and user interface.
Forum rules
Posted relevant content can be used under GPL or GFDL (http://www.gnu.org/) for the project. Thanks!
User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Render polygons

Post by Trilarion » Mon Jan 21, 2013 3:10 pm

Not suitable for us, but awesome result. http://www-cs-students.stanford.edu/~am ... eneration/

Trapets
Posts: 17
Joined: Wed Oct 03, 2012 9:41 am

Re: How to connect neighboured terrain tiles?

Post by Trapets » Mon Jan 21, 2013 9:47 pm

Veneteaou wrote:I figured it out, I think.....
Good job man!

As i thinked, diagonals was the right way to go, but the catch was to halve the top and bottom triangels... nice!

Veneteaou
Posts: 280
Joined: Sat Aug 25, 2012 4:23 am

Re: How to connect neighboured terrain tiles?

Post by Veneteaou » Tue Jan 22, 2013 9:10 am

Whoa, lots of information at once. It took me a bit to comprehend your explanation of my proposal, but yes you did get it correct.

I've read that Gamedev tutorial before, as I've been hunting information on tile-mapping and continuity for a long time. Bottom line, just about every game that randomly generates tile-maps in 2D works that way. It doesn't surprise me that those games use it. The downside to that system is that even though it removes the harsh lines between tiles, it still maintains a very clear grid-type look overall. This is very obvious with Freeciv, where a poor choice of color palette (too bright and contrasting) and lazy tile work leads to what you see in those screenshots. Wesnoth on the other hand is aided by both a well-designed artistic style as well as hex tiles.

Still, the terrain continuity in both games pales in comparison to Imperialism. First off, hex, isometric, and orthogonal tile systems are very symmetrical to begin with, making it extremely difficult to break the grid up; Imperialism's staggered-row system is brilliant in this regard.

Now what is interesting about Imperialism is that, while it only has two of each terrain tile (and two base mountain tiles and extra mountain<--->hill tiles), it is A TRUCKLOAD of ocean shoreline tiles (14, each one unique). Instead of creating tiles to mesh all of the terrain types with ocean edges, they smartly created all of the shorelines in tiles of their own, which would tile right up against the standard plains grass setup. It seems to me that the shoreline works the exact same way as I described above, except that the game has the option to pull a section randomly from one of several tiles.

If you can code what we described above, I can make it look better than any of those open source games you've linked.

Trapets
Posts: 17
Joined: Wed Oct 03, 2012 9:41 am

Re: How to connect neighboured terrain tiles?

Post by Trapets » Tue Jan 22, 2013 10:04 am

Here is also very informative tutorial about tile making - link.

User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Hills, Mountains, Beaches

Post by Trilarion » Tue Jan 22, 2013 11:00 pm

I finished having the systematic look at the tile graphics of the original. I basically learned that hills and mountains didn't behave much different.

It seems like plain is the universal background and every other terrain (swamp, desert, forest, hills, mountains, ...) is on top and not filling the whole tile. In another way you can say: plain grows into these tiles. Please note that in the original never any hills or mountains were on a desert background.
Hills in the original
Hills in the original
Imperialism1_Hills.jpg (67.64 KiB) Viewed 6636 times
Second is that hills behave like cotton or grain - exactly the same way. We have however green hills for sheeps.
Beaches in the original
Beaches in the original
Imperialism1_Others.jpg (32.96 KiB) Viewed 6636 times
Third is that the beaches always grow into the water (reasonable since there is unused space).
Mountains in the original
Mountains in the original
Imperialism1_Mountains.jpg (75.48 KiB) Viewed 6636 times
And fourth is that there are two types of mountains, however with the same transitions and that there is a special transition between hills and mountains: if there is a hill on the left, the mountain get some extra mountains, if there is a hill to the right, the hill get some extra hills.

Now that we have analyzed the original, let me tomorrow check how Civ 2 or Civ 3 did it and then we can come up with our own formula for tile transitions and tile connections.

User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Re: How to connect neighboured terrain tiles?

Post by Trilarion » Tue Jan 22, 2013 11:04 pm

Veneteaou wrote:...Still, the terrain continuity in both games pales in comparison to Imperialism. First off, hex, isometric, and orthogonal tile systems are very symmetrical to begin with, making it extremely difficult to break the grid up; Imperialism's staggered-row system is brilliant in this regard. ...
If you can code what we described above, I can make it look better than any of those open source games you've linked.
Yes, I can code it as it was in the original Imperialism. :) (Was this the question?)

Btw. staggered layout is more similar to hexagonal than to orthogonal/isometric, since there you have four close and four distant neighbours, while in hexagonal and staggered layout you both have six neighbours.

Trapets
Posts: 17
Joined: Wed Oct 03, 2012 9:41 am

Re: How to connect neighboured terrain tiles?

Post by Trapets » Wed Jan 23, 2013 10:20 am

I extracted some tiles from original game, and changed them, and uploaded to game again. Result:
If needed, i can to this with hills and mountain tiles too.
Attachments
Tiles in Imp 1.
Tiles in Imp 1.
Tile_placement_in_orig_imp.png (134.74 KiB) Viewed 6633 times

User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Cool

Post by Trilarion » Wed Jan 23, 2013 11:18 am

Trapets, that's brilliant. So you can see how they do it. They use either one of the six parts from the inner tile or the outer tile depending what is next to it. It would be nice to see it with mountains and hills in Switzerland where we have horizontally: hill mountain... mountain hill.

User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Terrain in Civ3

Post by Trilarion » Wed Jan 23, 2013 1:43 pm

I checked Civilization 3 and they simply have many different images of mountains or hills or forest to create connected ranges of hills or mountains which look diverse. However they also have limitations:

- terrain underground (plain, steppe, desert) has an order and grows into the lower order, a technique mentioned already in previous posts
- hills and mountains always have green underground which looks a bit odd in desert or tundra regions
- the style of the graphics looks like coming out of a 3D rendering programm
- as far as I remember the editor automatically chooses graphics for the tiles that fit/connect to the surrounding, you cannot influence it directly
Terrain in Civilization 3
Terrain in Civilization 3
TerrainTiles-Civilization3.jpg (102.81 KiB) Viewed 6628 times

User avatar
Trilarion
Founder
Posts: 833
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Final definition

Post by Trilarion » Mon Mar 11, 2013 2:00 pm

So here I compiled an illustration how continuous tiles in staggered layout were implemented in the original Imperialism and will be implemented in our remake as long as we do not come up with something better.

The artists have basically to come up with two tiles which however are quite similar. They must share the same inner part, especially around the diagonals and the vertical center line. One tile however must not be continuous, the other must be continuous and must feature a symmetry as shown in the image.

This is nothing new - it's just the gist of all what has been discussed in this thread. I liked to make a concise illustration about it.
Continuous tiles
Continuous tiles
Staggered Layout Continuous Tiles.png (38.98 KiB) Viewed 6576 times

Post Reply