Icon

NoisePack - CPU v1.2.0

Cem Baspinar

You must be logged in to obtain assets

Description

This pack contains well-known noise algorithms such as:

  • Perlin Noise 1D, 2D, 3D
  • Simplex Noise 2D, 3D, 4D
  • Improved Noise 3D
  • [NEW] Value Noise 1D, 2D, 3D

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.

OPEN SOURCE

The project is on Github where you can use to ask questions, report bugs or contribute any other way.

https://github.com/aft/Noise

More info

End User Licence Agreement (EULA).

Age Rating: 4+

Version

Version 1.2.0. Published August 16, 2017

  • Added value noise 1d, 2d, 3d. Still needs some optimizations but works fine.
Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait