Closed benwiley4000 closed 6 years ago
I saw your video on facebook . . looking good. I'm busy with another assignment until Monday . I'll take a look after that
probably won't be done until at least then, anyway 😄
Most of the important points are now dealt with but I still don't have collision knockback following the terrain. I might re-write how collision knockback works - I think Kai's solution was amazing as a last-minute push but it's a bit difficult to work with for what I'm doing now.
Also note I updated the Text
and Rock
classes to center their vertices around the model origin (rather than pushed to one side of the x or z axis). This helps with a couple of things:
Ready for review
Feel free to merge when ready
Does it seem more painfully slow than before?
If not I might want to merge now and next work on performance improvements. I have some leads.
Did you check out the changes I made to the Rock and Text for centering the vertices?
@lucastle6969 do you want to try running this again? I haven't done much that I know of to fix runtime performance but the time it takes to generate new trees should be way way lower than before.
I'm gonna do some more optimizations later when I have time
Sorry this PR has become so huge. On the upside, I've merged in my work on water, and I also made some pretty dramatic performance improvements. There's still work that could be done but I think I've eliminated most of the CPU-side bottlenecks (besides the long tile loading times which I think can wait to be fixed with #70, although I did make tile loads faster).
@lucastle6969 could you check this out and try it on your machine? I'd like to know if it's still unplayable.
yayyyyy!!!
A bit late, but better late than never?
Closes #22. Closes #25. Closes #113.
We've now got rolling hills. The player and other objects get placed appropriately on the surface of the terrain, and the player follows the terrain as they move.
The terrain heightmap is generated via Perlin Noise, which I used a small library for.
Note that I renamed TreeC to TreeCluster and did a bit of refactoring (I made everything non-static static, since it's basically just a namespace, and moved most of the transformation logic into WorldTile, similarly to other objects). Some of this was necessary for terrain-wise placement but the rest was just to make the class easier to reason about while I was doing that.
A handful of remaining issues I want to solve before merging:
static constexpr int terrain_width
in WorldTile.hpp from 20 to something much lower like 4 (lower poly terrain).std::cout
s.