The terrain system can be expanded to support variable height and cliffs, it should also support changing hight values during runtime.
[x] Support world rotation
[x] Rotate support for rotating the world in editor
[x] Create tile picker functions to convert mouse pos and world pos into tile index and vice versa (this is unneeded due to being trivial
[ ] Variable Height
[ ] rewrite terrain_map to be more efficient
[ ] replace get_adjacent_tiles with for_each_adjacent_tile to reduce allocations
[x] Store Heightmap alongside terrain data
[x] Update storage to store a height value for each tile corner
[ ] Functions for generating or loading terrain should assume height = default if absent
[ ] Fix resize_map and other terrain functions that don't touch the heightmap properly
[ ] console function to toggle highmap rendering
[x] Render terrain with heightmap
[x] #134
[ ] #133
[ ] Add sun direction and associated shading
[x] calculate shadow areas using heightmap
[x] calculate normal to the sun and add yellowing
[ ] Provide screen space to tile index functions and the reverse (we need a way to turn a mouse position into a valid tile index for targeting)
[x] Turn mouse pos into flat world position
[x] Use barycentric calculation rather than quad warping to fixup coordinates
[ ] Turn tile position into world position
- [ ] investigate using a generated mesh and ray casting to find the correct mouse target
[ ] Cliff support where the difference in height is too large
[ ] don't blend the terrain in this instance, generate a cliff to cover the gap
[ ] #136
[ ] when placing tiles only update the needed cells
[ ] Split world into chunks for rendering
[ ] only generate one mesh for the terrain and then render it with different settings for each layer? (Requires modern openGL)
- [ ] pre-generate a mesh for each layer(needs texture info in the buffer) and just modify it as the terrain is changed(this prevents a costly full regen).
[x] create solution for rendering objects obscured by terrain (we will use the depth buffer)
The terrain system can be expanded to support variable height and cliffs, it should also support changing hight values during runtime.
- [ ] investigate using a generated mesh and ray casting to find the correct mouse target- [ ] pre-generate a mesh for each layer(needs texture info in the buffer) and just modify it as the terrain is changed(this prevents a costly full regen).