diff options
Diffstat (limited to 'notes.md')
-rw-r--r-- | notes.md | 69 |
1 files changed, 69 insertions, 0 deletions
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. |