I implemented some basic rendering capabilities. I forgot to log my time (gotta remember to turn on wakatime-mode), but I spent quite a while trying to figure out why my terrain generation was completely messed up, for a while (see attachments for the fun imagery it produced!)
In the end, it turned out that my perlin noise function had a problem dealing with negative coordinates, so I added a small conditional statement to patch it up, and for sanity, I ended up changing the equillateral triangles into just grid-aligned right triangles. Also, I added red/green alternating scheme so that I could see stuff.
I haven’t yet implemented simplex noise (I’m actually finding that perlin noise is producing fairly good results, and it appears to be fairly cheap computationally anyhow), but hopefully I’ll be able to read some papers soon.
Going forward, I kind of want to change the current grid-aligned triangles into a hexagonal grid so that the results look somewhat more interesting, and I also need to edit colors. Also, since right now it’s quite slow (with no optimization, for debugging purposes), I want to look into caching loaded chunks and potentially exporting the triangles as meshes rather than manually rendering individual triangles.
After that, I hope I can start fleshing out the world a bit by adding some form of a sky, adding collision, increasing the control set, and potentially adding some creatures.
Log in to leave a comment