Thursday, June 13, 2019

Blake's Vacation Adventure (2 / 2)

Generating over a million tiles in only 20 seconds on a 2D map was pretty exciting and all, but I wanted to take it up a notch. I wanted to create a lively island with cities and roads, so I started on that.

I spent around 4 hours writing a set of algorithms that I thought would be best for calculating a road between two towns, and after I was finally done I let the game run. After about a minute I knew the algorithm was too slow to be of practical use, but I was curious to see what it'd create. After an hour I thought, well I've waited too long to stop now, so I went to bed to see in the morning what an epic road it must have generated. When I woke up I saw that it had taken 7 hours to generate this red road:



Words could not express my immense disappointment. I was about to continue, but then I realized that the loading system I was using for chunks was something I had never done before and was likely the reason my system was as fast as it was. So I decided to turn back toward 3D and see if I could apply the same sort of system to a 3D engine. And that's when I made my breakthrough.

Mixed with what I've learned since Perlinia, and the load system I had created for the 2D project, I now have a 3D Voxel engine faster than my Perlinia one. That's fast enough to let the player place/destroy blocks:



I don't think I was capable of being any more excited. I had finally made a breakthrough, a 3D voxel engine worth using! And this breakthrough came on my birthday no less... (June 10th). I then spent the next couple of days playing around with it.

First I wanted to see if I could make the transition between biomes be smooth, something I had failed on all my previous engines. And to my astonishment, I had done it!



Next, I wanted to see if I could make the biomes generate differently, even inside of the same chunk, which I also managed to do!






This was all very exciting and gives me great hope for any future 3D voxel projects I take on. I'm so happy that I spent this vacation studying, I'm home now and work resumes but you can bet you'll be hearing about this engine again in the future.

Sincerely,
Blake Gillman

No comments:

Post a Comment