started working on temperature range corrections
This commit is contained in:
@@ -8,14 +8,19 @@ Using the heightmap generator from here: https://github.com/TangentFoxy/heightma
|
|||||||
- [ ] Remove heightmap library
|
- [ ] Remove heightmap library
|
||||||
- [ ] Update ReadMe
|
- [ ] Update ReadMe
|
||||||
- [ ] ReadMe should also point out where the simplex implementation comes from
|
- [ ] ReadMe should also point out where the simplex implementation comes from
|
||||||
- [ ] Update the `simplex` library to the latest version with FBM
|
- [x] Update the `simplex` library to the latest version with FBM
|
||||||
- [ ] Round the new map generator to a planet shape
|
- [x] Round the new map generator to a planet shape
|
||||||
- [ ] Move `tile_size` out of the map generator (this is a render feature, not a map feature)
|
- [ ] Move `tile_size` out of the map generator (this is a render feature, not a map feature)
|
||||||
- [ ] Turn the new map gen into a wrapper kind of like my heightmap wrapper? (This is sorta already done in a sloppy way.)
|
- [x] Turn the new map gen into a wrapper kind of like my heightmap wrapper? (This is sorta already done in a sloppy way.)
|
||||||
- [ ] Rebuild the multi-noise map system.
|
- [ ] Rebuild the multi-noise map system.
|
||||||
- [ ] Renormalize to Earth extremes. :D (This will probably give bad initial results and need extensive changes.)
|
- [ ] Renormalize to Earth extremes. :D (This will probably give bad initial results and need extensive changes.)
|
||||||
- [ ] Use a spreadsheet to map -0.9 to 0.9 to find a mapping function to modify initial values to realistic height ranges!
|
- [x] Use a spreadsheet to map -0.9 to 0.9 to find a mapping function to modify initial values to realistic height ranges!
|
||||||
- [ ] Rename `humidity` to `rainfall`.
|
(This was done with -1 to 1)
|
||||||
|
- [x] Rename `humidity` to `rainfall`.
|
||||||
- [ ] make documentation of how this is all working so I can remember when I forget to work on it for a while
|
- [ ] make documentation of how this is all working so I can remember when I forget to work on it for a while
|
||||||
|
|
||||||
|
### Long-Term
|
||||||
|
- [ ] Do all terrain generation within a radius check so unnecessary work isn't done and discarded.
|
||||||
|
- [ ] Terrain generation steps should happen within a single loop wherever possible?
|
||||||
|
|
||||||
(Tasks/Issues are stored in the ReadMe instead of using a webUI issue tracker due to how using such a tracker negatively influences portability of the project.)
|
(Tasks/Issues are stored in the ReadMe instead of using a webUI issue tracker due to how using such a tracker negatively influences portability of the project.)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ dry forest and woodland savanna,
|
|||||||
tropical rainforest (evergreen?),
|
tropical rainforest (evergreen?),
|
||||||
alpine tundra,
|
alpine tundra,
|
||||||
montane forests and grasslands,
|
montane forests and grasslands,
|
||||||
|
- what variables control whether it develops a forest or grassland?
|
||||||
|
|
||||||
alts:
|
alts:
|
||||||
deciduous forest (not evergreen - can be cold or dry to cause leaves to fall; trees, shrubs, perennials),
|
deciduous forest (not evergreen - can be cold or dry to cause leaves to fall; trees, shrubs, perennials),
|
||||||
@@ -36,7 +37,9 @@ high plateaus (flat raised plains),
|
|||||||
savanna seems to just mean grassland with some shrubs and trees? (dry)
|
savanna seems to just mean grassland with some shrubs and trees? (dry)
|
||||||
steppe is grasslands with NO trees (dry, often cold)
|
steppe is grasslands with NO trees (dry, often cold)
|
||||||
meadow is wet grasslands
|
meadow is wet grasslands
|
||||||
hypoxic / anoxic waters FROM dead zones (nutrient concentration -> bloom, low water movement, high temperature; deepest waters?), gyre centers (ocean currents)
|
hypoxic / anoxic waters FORM dead zones (nutrient concentration -> bloom, low water movement, high temperature; deepest waters?), gyre centers (ocean currents)
|
||||||
|
- use of absolute deepest water as a shortcut should be fine,
|
||||||
|
- use of highest temperature in water would also be a decent shortcut
|
||||||
|
|
||||||
("continentalness" may be useful)
|
("continentalness" may be useful)
|
||||||
|
|
||||||
@@ -44,3 +47,16 @@ tropical just means low latitude - these are small
|
|||||||
montane just means mountain
|
montane just means mountain
|
||||||
|
|
||||||
(one mm of rainfall == 1 L/m^3)
|
(one mm of rainfall == 1 L/m^3)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
coastal forest? (tropical moist broadleaf)
|
||||||
|
montanes are often forested?
|
||||||
|
what's the difference between a swamp and marsh? and bog?
|
||||||
|
I should sprinkle volcanoes in (but that would work better with some kind of fault sim)
|
||||||
|
- these form jungle/forest easier? more nutrients in soil
|
||||||
|
what's a moorland?
|
||||||
|
jungle vs rainforest?
|
||||||
|
|
||||||
|
rifts and rivers?
|
||||||
|
temperature should decrease by 0.0065 per meter (but this only holds above water?)
|
||||||
|
|||||||
+2
-4
@@ -8,6 +8,7 @@ local map
|
|||||||
|
|
||||||
love.load = function()
|
love.load = function()
|
||||||
map = map_generator.generate()
|
map = map_generator.generate()
|
||||||
|
print("Temperature Range", map.temperature.min, map.temperature.max)
|
||||||
|
|
||||||
-- if true then return end
|
-- if true then return end
|
||||||
|
|
||||||
@@ -67,20 +68,17 @@ love.draw = function()
|
|||||||
love.graphics.translate(window_width / 2 - (map.size * map.tile_size) / 2 - camera.x, window_height / 2 - (map.size * map.tile_size) / 2 - camera.y)
|
love.graphics.translate(window_width / 2 - (map.size * map.tile_size) / 2 - camera.x, window_height / 2 - (map.size * map.tile_size) / 2 - camera.y)
|
||||||
|
|
||||||
for x = 1, map.size do
|
for x = 1, map.size do
|
||||||
if map.biome[x] then
|
|
||||||
for y = 1, map.size do
|
for y = 1, map.size do
|
||||||
-- print(x, y) -- TEMP why am I getting an out of bounds?
|
|
||||||
-- local value = map.biome[x][y]
|
-- local value = map.biome[x][y]
|
||||||
local value = map.temperature[x][y]
|
local value = map.temperature[x][y]
|
||||||
if value then
|
if value then
|
||||||
-- love.graphics.setColor(value)
|
-- love.graphics.setColor(value)
|
||||||
love.graphics.setColor(value, 0, 0, 1)
|
love.graphics.setColor( (value + 89.2) / (89.2 + 56.7) , 0, 0, 1)
|
||||||
love.graphics.rectangle("fill", x * map.tile_size, y * map.tile_size, map.tile_size, map.tile_size)
|
love.graphics.rectangle("fill", x * map.tile_size, y * map.tile_size, map.tile_size, map.tile_size)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
love.keypressed = function(key)
|
love.keypressed = function(key)
|
||||||
if key == "escape" then
|
if key == "escape" then
|
||||||
|
|||||||
+6
-1
@@ -126,7 +126,7 @@ local generate = function()
|
|||||||
octaves = 7, lacunarity = 2, gain = 0.5,
|
octaves = 7, lacunarity = 2, gain = 0.5,
|
||||||
}
|
}
|
||||||
map.temperature = simplex_map.generate{ -- in celsius
|
map.temperature = simplex_map.generate{ -- in celsius
|
||||||
size = map.size, scale = 0.005, min = 0, max = 1, -- min = -89.2, max = 56.7,
|
size = map.size, scale = 0.005, min = -89.2, max = 56.7,
|
||||||
octaves = 1, lacunarity = 2, gain = 0.5,
|
octaves = 1, lacunarity = 2, gain = 0.5,
|
||||||
}
|
}
|
||||||
map.rainfall = simplex_map.generate{ -- in millimeters of rainfall
|
map.rainfall = simplex_map.generate{ -- in millimeters of rainfall
|
||||||
@@ -173,6 +173,11 @@ local generate = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
-- clear non-planet zones
|
||||||
|
map.altitude[x][y] = nil
|
||||||
|
map.temperature[x][y] = nil
|
||||||
|
map.rainfall[x][y] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user