diff options
author | sanine <sanine.not@pm.me> | 2022-05-24 19:08:22 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-05-24 19:08:22 -0500 |
commit | 79e97c771f09bcca414d7eb3e68376357518a3ae (patch) | |
tree | bc11c04cee3bc461cf6a7dccc7cf6c085d62ff6c | |
parent | 4d1f202e07b7a0f98e2d3dff62630a528f53a4f8 (diff) |
add notes.md
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | notes.md | 69 |
2 files changed, 70 insertions, 1 deletions
@@ -7,7 +7,7 @@ an interactive map-creation tool running ------- -bluerose is a standalone webapp written in vanilla js; as such, you should be able to just open `index.html` in a web browser and use it. +bluerose is written in vanilla js and doesn't require any building. Simply spin up a web server (I recommend python3's `http.server`) and load `index.html`! To run the tests: diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..5284adb --- /dev/null +++ b/notes.md @@ -0,0 +1,69 @@ +> I have a programmer's superstitions about always using powers of 2, which are more +> pleasing to the spirit of the machine. +-mewo2, whose sentiment I share + + +grid generation +--------------- + +The basic sequence is: + + - pick N random points + - relax them a lil + - generate their voronoi diagram + +Picking N random points it quite straightforward. For relaxation, I indent to just step +over MxM points, get the closest of the set of N, and compute the averages to get the +centroids. This, again, should be quite simple. Voronoi generation is then just a +matter of using rhill's library. + + +terrain generation +------------------ + +mewo2 does this automatically; I'd like to do it interactively. Their primitives list +is helpful to me though! I'd like to have "brushes" for these things, so that you can +pick a radius and strength and then just go to town adding features. + + - constant slope: not entirely sure how this would work (pick a point and make things + slope from there to the center?) + - cones: pretty solid imo + - round blobs: also pretty solid + - relax: lerp with the average of neighboring points, with the lerp strength relative + to brush strength and radius. + - round: same as relax, but lerp with a point's own square root. + +Normalization seems probably superfluous -- we'd like to be able to have really tall +mountains and stuff, and it could also make some of the other operations a bit weird +(like having stuff that was previously land disappear under water while building a +mountain). + +One thing to keep in mind is the effect of map scaling on brush radius size. I think I'd +like to have the visual radius stay the same size, and shrink the internal radius to +match it. + +Rivers and erosion are interesting -- I may want to have an "erosion" and "rain" brush +to generate these features. + + +rendering +--------- + +tba, not sure what I want to do here + + +additional features +------------------- + +I want to take the same approach as OpenStreetMap and have all other features (and +possibly even some, like rivers) be *nodes*, that exist independently of the terrain +grid. These can be zero-, one-, or two-dimensional. Each node should exist on a *layer*, +so that different layers can be viewed at any given time. Additionaly, nodes may be +assigned a relevance level, which corresponds to the scale required to view them. The +highest-level nodes are only visible when broadly zoomed out, and reflect things like +major cities, nations, and large-scale geographic features. The lowest-level nodes +would represent things like individual buildings and only be visible when highly zoomed in. + +Node should be able to indicate things like climate regions or land use patterns as well, +and those kinds of nodes should be on their own layers, so that the user can view or +ignore relevant data at any time. |