I, Hari Seldon, present … psychohistory! Paint on this map: (doesn’t seem to work on mobile)
The goal of this experiment is to make a particle system that shows the trade routes between regions. worker.ts has two systems:
- the Map generation, based on what you paint
- a simulation layer, which draws on a separate overlay
TODO
-
[X]
each path should have its own start/end time -
[X]
generate new path when previous one ends -
[X]
calculate path instead of straight line -
[X]
darken or desaturate the biome colors so that it’s easier to see the particles -
[X]
fix: particles should use current movement cost, not original movement cost -
[X]
draw particles with additive blending -
[X]
draw particle weight taking into account resolution -
[X]
have particles pick sides, so that you end up with one lane of traffic in each direction- I think this means I need to draw them edge to edge instead of region to region
-
[X]
have particles adjust immediately when the map changes, instead of after 10 seconds or so → maybe split paths up into small segments -
[X]
move the simulation code into a separate file -
[X]
stop simulating when the page isn’t visible? -
[ ]
use pathfinding rules from the town building project — it should follow rivers and coastlines more -
[X]
mark shallow vs deep ocean, maybe in a teal color, and make it traversable -
[ ]
river crossing should always be allowed if river isn’t drawn (lg_min_flow)
These may in in a future project:
-
[ ]
add roads, maybe based on which paths are used most often-
[ ]
when painting water, roads should be destroyed immediately? - problem is that in the current ui, you’ll never be able to see these, unless I draw the roads very wide
-
-
[ ]
add cultural centers -
[ ]
color particles based on culture number (maybe 3 to 6?) -
[ ]
draw influence map boundaries as cultures expand and shrink