Macaw - Perlin Noise in GameMaker
A downloadable tool
If you've spent a long enough time in game dev, you've probably been interested in generating Perlin noise at least a few times. It's useful for quite a number of things:
- Anything to do with procedural generation
- Terrain generation
- Texture generation
- Actual clouds
- Probably a ton of things I haven't thought of yet
Here's a nice little system I wrote for doing exactly that!
- Generate noise
- Control the number of octaves used in generation (more iterations means the noise is smoother)
- Control the amplitude of the noise (eg if you're generating a sprite you probably want the noise to have a range between 0 and 255)
- Works in either native GML or via a DLL
- Helper function to convert the raw noise data to a sprite (see screenshots)
- Helper function to convert the raw noise data to a vertex buffer (this is probably not very useful to you)
The project comes in both native GML (cross-platform) and DLL (Windows-only) forms. The native GML implementation performs reasonably well. Here are some numbers:
- 64x64: 40 ms
- 256x256: 700 ms
- 2048x2048: 48,500 ms ("reasonably" is relative)
Obviously, the YYC improves things rather dramatically.
And the DLL version, which lives in the nether realm of blazing fast C++, blows GML out of the water.
For small noise-related tasks the native GML version is perfectly fine, although if you're doing anything exotic you probably want to use the DLL.
If you want to use the DLL on something that isn't Windows, let me know and I'll see if I can work something out. I might demand money.
is available here.
As usual, the asset is free as-is. I'll fix simple or game-breaking bugs but more involved support requires payment via either Itch or Patreon. I get the final say in what constitutes "game-breaking."
Click download now to get access to the following files:
- Small fix for "seams" appearing in generated noiseFeb 11, 2022
Leave a comment
Log in with itch.io to leave a comment.