New terrain generator

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
Molo_Parko
Hardened
Posts: 200
Joined: Fri Jul 02, 2021 4:00 pm

Re: New terrain generator

Post by Molo_Parko »

You seems to want continents with room for many land-only cities?
I would put it differently, as "I want enough land to have nearby enemies to crush quickly." :) But when building worlds, avoiding comparisons with Earth seems unlikely. At first glance over generated maps from Fc v2.6.4 and tergen, they don't look like real worlds (to me), because they are starkly different from Earth in that they don't seem to have any large continents at all. On the other hand, your generator definitely creates worlds with notable differences from those made with the Fc built-in generator, and that alone makes tergen a very nice option.
Bhillothe
Posts: 1
Joined: Wed Feb 28, 2024 1:15 pm
Contact:

Re: New terrain generator

Post by Bhillothe »

Is your preference for landmasses in the terrain generator driven by a desire for proximity to potential adversaries, or is there another reason behind this preference?
:)
John Campbell
Posts: 13
Joined: Wed Jan 18, 2023 6:57 pm

Re: New terrain generator

Post by John Campbell »

I've been unhappy with the built-in terrain generators — Fracture seems to be the best at making actual continents, but it's bad at including islands, and it insists on putting everyone on one big continent (sometimes two) no matter how much I tell to it spread them around. tergen seems, at least in theory, to be exactly what I'm looking for in a terrain generator, so I downloaded it last night and gave it a try.

First off, there's a call to fsqrt() at line 468 that my compiler doesn't like. I had to change it to sqrtf() to get it to link.

That got it to compile, so I ran some tests to see what the output looked like. With default settings for everything but wrap (WRAPX) and topology (varied), it works fine with ISOHEX, and HEX, and square... but ISO just hangs forever. (Well, I gave it an hour, anyway, before I killed it. All the other topologies finish in under two seconds.)

Code: Select all

$ ./tergen ISO 1 1
Map named "ISO"
Map size: 64 × 128  Topology: 1 (ISO)
 33% land
 30% mountains/hills
 50% tempered
 50% water on land
Plate tectonics, trying 18 plates
Plate tectonics with 13 plates

And it just stops there, forever, or at least for more than a hour. Fiddling with other settings doesn't seem to help. This is kind of a problem, because ISO is the topology I actually use. (I don't like the hex tilesets.)
John Campbell
Posts: 13
Joined: Wed Jan 18, 2023 6:57 pm

Re: New terrain generator

Post by John Campbell »

Also, 3.2 changed how wrapping is set in the save file, so they all default to wrapping both directions, regardless of what you set it to. 3.2 wants it on a separate line instead of in the topology line, like so:

Code: Select all

[settings]
set={"name","value","gamestart"
"topology","ISO|HEX","ISO|HEX"
"xsize",180,180
"ysize",90,90
"generator","SCENARIO","RANDOM"
"wrap","WRAPX","WRAPX"
}
cazfi
Elite
Posts: 3389
Joined: Tue Jan 29, 2013 6:54 pm

Re: New terrain generator

Post by cazfi »

John Campbell wrote: Tue Aug 19, 2025 8:00 am Also, 3.2 changed how wrapping is set in the save file, so they all default to wrapping both directions, regardless of what you set it to. 3.2 wants it on a separate line instead of in the topology line, like so
Wait a sec. Is there a bug in backward compatibility (savegame format conversion) in the freeciv engine? What format version the savegame claims to be, when it's not automatically converted to the format where "wrap" is a separate setting from "topology"?
John Campbell
Posts: 13
Joined: Wed Jan 18, 2023 6:57 pm

Re: New terrain generator

Post by John Campbell »

cazfi wrote: Tue Aug 19, 2025 5:24 pm
John Campbell wrote: Tue Aug 19, 2025 8:00 am Also, 3.2 changed how wrapping is set in the save file, so they all default to wrapping both directions, regardless of what you set it to. 3.2 wants it on a separate line instead of in the topology line, like so
Wait a sec. Is there a bug in backward compatibility (savegame format conversion) in the freeciv engine? What format version the savegame claims to be, when it's not automatically converted to the format where "wrap" is a separate setting from "topology"?
No, I think it's just tergen. The save files it produces are tagged as 3.2 (game_version=3020000), but are still using the pre-3.2 format for wrap.
Post Reply