As mentioned, I wanted to work on the grass and terrain to be able to put all my assets into. I tried a couple of iterations, but the one above fit best. In my first attempt, I tried to define every point of the grass into the world using 6 vertex points per single image. This makes a static image that costs a lot of memory and lag when generating the world. Before, it needed 3d points, color, normal, wave multiplier, and tex coords for every single point. I put it off for a while and loaded the map chunk by chunk to make the game a little more manageable for me to work on, but the whole process was way too slow for any released game. On my last post, there was only one tutorial on how to make grass actually sway, and it wasn't even real 3d, which i had to do on my own. Next, I tried to implement dragonitespams grass tutorials, but it also was very limited in performance. Although I wasn't a fan of the way this grass looked, I finally gave The Snidrs grass tutorial a look. Things were way more complicated but way more promising. Every step had ways to reduce lag from generating the grass to actually displaying it. Now, although all the grass he made were triangles instead of squares, he showed how to make multi segment grass. I chopped off the top part and made all the other points in a line instead of curved to make a square shape. Now, although every piece of grass has 3X the amount of points, every point only takes the points color as a 3d coordinate and point position, taking up less than a fifth of the memory and loading time per point. As for the terrain, I couldn't keep things as efficient, but that's ok. As much as I wanted on the fly terrain modification of vertex coordinates, gamemaker vertex shaders dont support image textures. Although there are very smart people who figured out how to do this, it would work with my collision anyway. As for the height map itself, I tried images to displace everything, using shaders to modify the points and a surface to read the height of every pixel. Turns out reading pixels is insanely slow. Making a 2d array with functions to manipulate it and just read from that was way more efficient. Instead of generating noise on the fly, I pre downloaded 32 arrays of noise and referenced them in order to make the illusion of infinite generation, especially when slight alterations of specific positions make everything look incredibly different. I used a quadratic formula to force everything into an island shape. Next, I applied fractal noise onto the island to give it depth. Finally, a derivative multiplier was applied to roughen it all out, making a realistic enough island generation for now.











