After spending a few days learning to create shaders, I decided to create a pseudo-random noise shader. This was quite basic and easy to create. I then decided to create a similar generation process to my latest, just using a shader.
With Game Makers new buffer_get_shader function, us developers can quickly and easily apply shaders to surfaces, then turn the surfaces into buffers. As noise generation appears to be a lot faster via shaders than it is using pure GML, I’ve decived to generate most of the worlds features using shaders alone. This also completely de-clutters the GML scripts / code snippets side of things, making the project look and feel a lot cleaner to develop.
As I’m new to shaders, there’s still loads for me to learn. I’m going to explore vector maths. I know the basics, but I’m sure I’d be able to write more efficient shaders after learning more complex vector maths.
For any of you who are interested in viewing the latest 2D terrain generation shader demo, the link is here: https://www.dropbox.com/s/ft9ncgn0rhzqfgf/terrain_shader-Default-1.0.0.1.zip?dl=0
Generating the whole thing using shaders alone, gives me 256256256*256 blocks to play with. This is because each pixel of a surface can hold 256 different values for red, green, blue and alpha. Figuring out what I’m going to use them all for is going to be difficult. I may just start with 255 base rock layers, 255 base ores, 255 different vegetation types (including wood).










0 comments