Planet Simulator

Bobert13

Prince
Joined
Feb 25, 2013
Messages
346
Version 2 is here! (link at the bottom)

Change Log:
  • Fixed a graphical issue where rivers would often continue a tile or three into ocean instead of terminating at the coastline.
  • Implemented Canyons at "Rfit" zones determined by the Tectonic simulation.
  • Restructured the PlateMap Class and implemented a Plate Class which combined clean up the code quite a bit and provide additional functionality.
  • Implemented a new iterative method for determining which plates should be Continental Shelf; Plates with a large presence in the polar regions should be land much less often.
  • Resized the maps and tweaked the latitude markers to at least come close to hitting a proper ratio to represent Width vs. Height = Latitude Limits.
  • Implemented Subduction zones and a coastal land scalar to get mountains off of the coasts (and islands) and onto where our Tectonic simulation actually says they should be (i.e.: the Collision and Subduction zones).
  • Reworked the Plate Speed scalar to use a gradient (as opposed to direct mathematical calculations producing weird results when our plate speeds were not distributed normally.)
  • Replaced the "curve flattening" formula used to smooth our elevation map with a new algorithm that produces more consistent results.

Known issues:
  • The mainConstants need re-tweaked. Especially rivers and terrain types (between the changes to the smoothing algorithm and the latitude markers, something went wonky and there's waaaay too much grass, not enough deserts, and slightly more snow than I'd like to see), maybe tone down hills too...
  • Rivers are better than in v1 but still need some work.
  • Canyons need "canyon passes" in some semi-rare instances and I'd like to get them spawning on a threshold as well.
  • Start Placement? (I really want to avoid having to tinker with anything from APS.lua if at all possible, but if I keep seeing some of the placement clumping/soloing I'm seeing as frequently as I'm seeing it after tweaking other things, implementing my own regional division method may be the only solution) I'm hoping the new method for determining continental shelf mostly took care of this.
  • I'd really like to get terrain types to spawn close to our overall target percentage. It may take quite a bit of work to get that done though. For now, Ocean Currents, re-tweaking the constants, and revisiting River placement are my main goals for v3 (beta).
  • My backlog of "ToDos" (new stuff, fix old stuff, get some new configurable constants, look at moving cludging to the datamaps themselves instead of doing it after thresholds and whatnot have been created..........)]
  • My backlog of "Hey!-that-would-be-cools" (Ocean Currents, Erosion [maybe], Add a new set of Geostrophic bands to the largest map sizes, etc.)

The following images were all generated on Standard (84x52) with the last two being generated via the Pangaea option built into the script.
Spoiler :












New images will be coming soon (and possibly a v2a because I'll inevitably want to tweak the mainConstants after trying to find some good screenshots :lol:)
CFC Download Link:
Download Planet Simulator

Steam Workshop:
Planet Simulator on Steam Workshop
 
I successfully generated a few maps today (without terrain types, features, rivers, the new plot types [canyons], "Wildness", etc.). Most of everything so far has been pretty straightforward but I'm coming up to where most of the new development I intend to implement is going to be. I didn't play long enough to see if aliens, nests and miasma were being handled by the default code but resources and bonus tiles (including algae and coral; hooray) definitely are.
 
Very nice. I used few mapscripts in Civ V, so never had a chance to bump into your Planet Simulator... but screens I found on the web look great. Keep up on the good work, I'm looking forward to playing on map your script generated for BE! :)
 
I'm looking forward to this. After using PerfectWorld3 for ages (and then delving into the vanilla map scripts, because some of them are actually fairly neat), I've been using Planet Simulator for the last 2-3 weeks or so... and I'm impressed at how natural feeling and playable the maps were.

So... high hopes for this one! :)
 
Thanks for the support you two, I really appreciate it. Just thought I'd stop in and report on how things are going. So far I'm up to about 3300 lines of code (there's ~6500 in Planet Simulator V2 for ciV) and all the old datamaps used to generate terrain, features, rivers, etc. are implemented and (hopefully) working as intended. I'm currently refining river spawning and still have a ton of work to do. I've got a starting point for Ocean Currents and have a pretty good concept of how I'm going to model them. Included in Ocean Currents is a new mapConstant dictating the spin direction of the planet (I couldn't find any information on whether we've found other solar systems in the Milky Way spinning the opposite direction or not but I figured "why not"); I also plan on reversing Geostrophic winds based on this new constant.
 
Mapscripts changed very little compared to Civ V. So if you made any from Civ V, they are very easy to import to BE. The most significant changes is just the removal of pre-determined city-sate placement, as well as Natural Wonder placements. There's also added a River generator, which auto places the canyons.

You can take a look at the map scripts and compare them to Civ V's to get an idea of the changes, Protean with Pangaea, Terran With Continents, Archipelago, etc. It shouldn't take you very long to make any adjustments.
 
Mapscripts changed very little compared to Civ V. So if you made any from Civ V, they are very easy to import to BE. The most significant changes is just the removal of pre-determined city-sate placement, as well as Natural Wonder placements. There's also added a River generator, which auto places the canyons.

You can take a look at the map scripts and compare them to Civ V's to get an idea of the changes, Protean with Pangaea, Terran With Continents, Archipelago, etc. It shouldn't take you very long to make any adjustments.

I don't think you quite understand the scope of this Map Script (which is inherited from it's predecessor, Perfect World 3). It replaces everything one of the in-game scripts does with hand written methods and datamaps designed to simplistically model actual planet and climate forming processes to create something similar, yet entirely different. The only things from the default code being used at all (currently) are Coast placement, Resource placement, and AssignStartingPlots.lua.

Furthermore, I'm not just porting the last working version of my script; which, would only require work to incorporate canyons, wildness, and possibly miasma if that's not already covered by the code that utilizes "wildness"; but actually making a new updated version. I've gotten a lot done:
  • Some methods have been simplified/optimized/cleaned up
  • I've implemented some new configurable map constants
  • I've made some changes to river generation that required a new workflow and a new method
  • Terrain Types are working as intended and producing some beautiful maps.
  • I've made a lot of progress with forests as getting rid of jungle threw a wrench in the works so to speak

I've still got a lot to do though:
  • Finish up with getting forests to spawn in concentrated formations but not exclusively to certain latitudes.
  • Follow up on a new concept I discovered while working with forests that helps ensure the actual percentage of "things" on tiles above sea level matches the target percentage.
  • Canyons
  • Wildness
  • Miasma?
  • Something Special?
  • Custom map modes (Pangea, Tiny Continents?, Terra?)?
  • Custom presets for in-game configuration (through the advanced setup menu)?
  • etc., etc.!

I'm really hopeful for having an early beta released by the weekend though, my ability to troubleshoot new issues, and my free time required to learn the new systems will be the deciding factor. I'll follow up soon with some images of a few maps as a teaser. :D
 
I've gotten forests and marshes to a place where I'm happy enough to move forward with getting a release out. I also got Pangea working more-or-less and am just starting to code for Wildness determination. Even though I've spent a few hours combing the game's code and figuring out how they handle Wildness, I still haven't quite figured out where I'm going to start. One thought that comes to mind is to reuse my plate growth algorithms to create concentrations. Alternatively, tons of spiral iterations collecting data about a plot and it's surroundings is probably what's going to match up best with the maps Planet Simulator currently produces. My miasma placement code is probably going to be heavily based on Firaxis's placement method as it seems pretty solid (I'd do the same for Wildness, but I don't have forest fractal maps lying around a la one of the default scripts. ;)

Canyons most likely won't be implemented in the initial release as I'm trying to get something out very soon. They're at the top of the list for the first update however (and they're going to have a broad sweeping affect on everything in the script that comes after landmass generation, so lots and lots of work to do). I said I'd bring screenshots last time I posted; you should find them attached to the OP.
 
For placing miasma, i strongly suggest clumping them together in almost "mountain ranges".
I dont know if you agree with me, but i frankly think miasma looks god awful on the vanilla maps, its just a completely random distribution of circular clouds on the ground. They dont blend together well and just create a "freckled" appearance covering the entire map.

Perhaps if they were concentrated in a more natural pattern, such as around alien hives with occasional "tendrils" 1-2 hexes wide that stretch out a bit like mountains, it might look more natural and less spotty.
Hm, come to think of it, perhaps a mod scaling the miasma model up 25% might alleviate the spotty appearance even when they are adjacent.
 
Thanks going to give it a try. I like big continents but I'm tired of the terra script that shipped with the game on day 1, it's not random and configurable enough :D
 
This map is amazing compared to any of the vanilla ones, really deserves to be on steam's workshop and get some more exposure. Thank you.
 
This map is amazing compared to any of the vanilla ones, really deserves to be on steam's workshop and get some more exposure. Thank you.

I will be putting on the workshop once I get it to a place where it's ready for that. Currently the script would fall under an "alpha" status as I still have some major features to implement. The past few days I've been tinkering with the processes behind mountains (and canyons once I implement them) and while I've made progress I still haven't gotten them where I want them. I'm planning on rewriting fault line and fault type determination to A) occur after continental shelves have been determined B) take a better look at the grand scheme of things before finalizing fault types and C) finally get subduction zones to mostly move their elevation alterations inland a tile or two.
 
I just played thru a whole game with it, generated a pleasing and competitive map.. i have no idea but i'm wondering if it's possible to make options configurable the way they are on civ iv style map scripts? such as general number of continents, etc.. thanks for the good work!
 
Bobert, I finally had to join civfanatics to let you know how much I appreciate your work on this. Your update to PerfectWorld3 (v5b) really helped take care of a lot of nagging little problems. It has been my "go to" map script for Civ V for a long time now.

I recently checked in on the CivBE forums to see if you were working on something and am not disappointed. I have not actually downloaded this script yet as you state it is in "alpha" state but I will definitely download it once you get to "beta".

Again, thanks for all the effort you've put into this.
 
I'm glad to hear you've enjoyed my work Ponder.

I've been working steadily on the script since the v1 release and I've made a lot of progress. I completely restructured the PlateMap class so it's easier to utilize and follow what the hell is going on (for both me and an outside onlooker trying to figure out my spaghetti mess). Along with the restructure I've rewritten some old stuff and added some new functionality:
  • Fusing land plates to get crescents and tails, and the potential for longer "tectonic" features etc.
  • I've resized the maps to a ~1.38:1 ratio (from ~1.6:1) and tightened the top and bottom latitudes (to 65 from 70) to alleviate some of the banding issues (deserts can actually pop up very close to the equator now given the right conditions!)
  • Some new constants that help to prevent homogenized mountain/hill placement
  • And most recently a new cludge that once and for all gets mountains off of coasts and helps to concentrate them in the "collision" areas. (hooray cludging!)

I've also got one method for Canyon placement working though it needs a little love as it's currently doing unintended things. This method utilizes "rift" zones (created by the Tectonic simulation) to spawn Canyons and produces either long strings or small sparse concentrations (3 - 5 within a few tiles of eachother). I need to constrain it from placing canyons on coastlines and kill rivers that (at a minimum) have canyon on both sides of them as these scenarios create graphical issues due to Firaxis not allowing Canyons next to rivers or coasts.

I may or may not implement a second method as all three scenarios Firaxis "simulates" for their Canyon placement methods have a chance to be at least replicated with each Planet Simulator map rolled. I'm hoping to have v2 out soon™. Oddly enough, I believe my current "Alpha" version is stable though I'm not sure I can guarantee that at release for v2 as I've done so many changes and I'm pushing myself to get it out quickly. v2 will likely also be considered "Alpha" as I still won't have Ocean Currents implemented even though their effect is planned to be relatively subtle.

P.S.: Don't be deterred by my musings on project state "Alpha, Beta, etc..." I need as many informed testers as I can get at this point (preferably the kind capable of posting a log should they run into instability or pics should they find some map configuration they're less than satisfied with and can't be ironed out with the current main constants).
 

Attachments

  • MountainPool.jpg
    MountainPool.jpg
    31.1 KB · Views: 3,562
:(

Sometimes they can be really cool!

Well, the cludge I'm using comes in the form of a user-configurable scalar. Additionally, I do plan to tweak it a bit so that it affects island tiles the most which would allow me to tone it back a hair for continental coastlines. The goal isn't to outright get rid of mountains and hills on coasts, but to reduce them dramatically as the way things work in the deviation map (function GenerateDiffMap()) currently makes coastal tiles almost a sure bet to at least have a hill. This is partly due to how I'm generating continent elevation numbers without utilizing any sort of fractals.

I also thought about adding a random roll for applying the cludge scalar but I'm not sure if that's necessary yet. Another option would be to randomly disclude a small handful of plate IDs from the cludge which may produce a more clustered result compared to a random roll. I agree with you that sometimes a coastal mountain or two do add flavor to an area. However, they're currently favored entirely too much in the script and the mountain ranges and hill distribution I've been seeing in the script since implementing the scalar are well worth the development effort I've been putting in to the script lately. There's also a second benefit in the fact that I'll be able to remove some other code that cludges away mountains, after they've been placed, since the new scalar should handle them now and that will result in the script hitting the target threshold for mountains more consistently.
 
I released version 2 last night. The CFC link is updated and I've also placed it on the Steam Workshop. So far I've yet to run into any stability issues and I'm not aware of any bugs with the current released version. Rivers adjacent to canyon tiles or rivers that dead end in the middle of a land mass (probably grouped but possibly alone) are on my radar as potential bugs so if you spot these and can get me a log (or just the randomSeed printed near the top of the log) I'd appreciate it.

Additionally, is anybody out there capable of setting up a multiplayer game by themselves and playing ten to twenty turns? I'd really like to know if the sync issues were actually fixed by Havok Script utilizing a strict implementation of extended-precision floating point numbers. Maybe even reveal the map via FireTuner and play another couple of turns if it makes it to turn twenty without any hiccups. :goodjob:
 
As much as i want to love this mapscript for CivBE and Civ5 (come on, a combination of Tectonics and perfectworld3, whats not to love?!), i just..... Don't feel immersed with the maps it generates, they dont feel believable to me. Not to the same extent that Tectonics on its own, or Perfectworld3 on its own did (still my undisputed favorite).

I dont know why, dont know what it is. Its like in PW3, sometimes (very often) you get a mapgen that simply "clicks". The algorithm simply activates something in your brain when you see the terrain. Even after merely seeing your own starting area, you already "know" its gonna be a great Beautiful map, even though you've only seen a percent of it.
CTRL+Z and exploring the map, 9 times out of 10 your first hunch was right. A lucky algorithm that creates a result that somehow just per automation is believable by your brain's subconcious.

This mapscript never manages to capture that for me. It may be more realistic in the simulation underneith with more actual mechanisms of geology being simulated, but the end result looks not much different from the usual flat terrain and random single tile Mountains spotted around without much evidence of any Tectonics underneith. And the general lack of vegetation doesnt convey humidity in the map very well, it is difficult to see humid vs arid zones (besides simply plonking desert or grasslands).

In PW3 again there is some magic algorithmic pixie dust at work where you subconciously "see" that the snowy area between two mountain Ridges represent highlands, and the deserts on the other side represent lowlands. Even though the two are identical in terms of Graphics.

I dont mean to offend all your work in Civ5 and CivBE, we desperately need more mapscript makers such as yourself, absolutely! Even a single person as yourself makes a huge difference to how the game is experienced, since so few good mapscrips exist.
I just somehow wanted to convey my personal feeling on the Planet Simulator scrips, by how the immersion feels rather than technical fluff about an extra +0.02 hillspercentfactor and such.
The numbers only mean something in combination to form the end result.
 
Top Bottom