amterp / COMP30019-Project-1

Project 1 for 2018 Semester 2 of COMP30019
1 stars 0 forks source link

Optimize terrain generation #31

Closed amterp closed 6 years ago

amterp commented 6 years ago

Apparently the diamond-square algorithm can actually run really fast, so there's no need to write it in such a a way that detail can be increased or decreased - you'd just have it at max resolution at all times.

Change the current algorithm or rewrite it so it's fast and just does it all in one go.

amterp commented 6 years ago

I at first thought it was slow due to the crazy amount of object creation for Vector2Ints, but I've just fixed that and it didn't make it much faster. I'll proceed to rewrite it from the ground up.

amterp commented 6 years ago

Completed with #32. Generates a N=8 terrain within seconds, instead of minutes.