This pack contains well-known noise algorithms such as:
I've adapted the best options I could find to GML to create one pack that contains anything on the subject. I've tested each one of them throughout to optimize on gml side without affecting the output.
They are easy to use:
// Perlin Noise scr_pn_init(); scr_pn_set_seed(some_integer); // optional scr_pn_noise(min, max, octaves, persistence, scale, x, [y, z]); // Simplex Noise scr_sn_init(); scr_sn_set_seed(some_integer); // optional scr_sn_noise(min, max, octaves, persistence, scale, x, [y, z]); // Improved Noise (seedless) scr_in_init(); scr_in_noise(min, max, octaves, persistence, scale, x, [y, z]); // Value Noise scr_vn_init(); scr_vn_set_seed(some_integer); // optional scr_vn_noise(min, max, octaves, persistence, scale, x, [y, z]);
If you don't use y or/and z arguments, script will call the lower dimension version so that it doesn't lose any performance doing unnecessary calculations.
Sample objects should give you an idea about the argument values to be used.
Note that Simplex Noise outshines others on higher dimensions.
Check the code for further credits. Reuse permitted under MIT License.
I'm aware of that there is another simplex noise extension on the GMS marketplace. This one is a bit faster than that due to my gml tweaks. Feel free to benchmark them both and decide yourself.
Benchmark is done using csanyk's asset. ( https://marketplace.yoyogames.com/assets/449/simple-performance-test )
Note: Calculating noise on the CPU is a slow process. CPU calculations are not meant to be used for image processing.
TL;DR: This is the only asset you need if you need to calculate noise on your project. Contains 4 important algorithms. Works on all platforms.
The project is on Github where you can use to ask questions, report bugs or contribute any other way.