Noise library for Defold?

Hi,

I’ve just come across and started using Defold and I’m pretty impressed so far.

I’m looking for a noise library to use with Defold for random map generation, unfortunately there don’t seem to be any in the Asset Portal and I’m new to Lua too so I’m not sure what would or wouldn’t be compatible.

Any suggestions on a decent noise library that won’t take too much effort to get working?

Thanks!

Lua has standard math.random()and math.randomseed() functions for even distribution random number generation.

As for noise libraries, you can look for pure Lua implementations. Like these


C++ based libraries are also possible to use, but they will have to be wrapped into Defold native extension.

2 Likes

Thanks, so with a pure Lua noise library would I just copy the code into an Lua module in the project and use it?

How hard is to wrap a C++ library for Defold? Is there some information in the documentation?

And you can ofc checkout other assets, like this PCG extension

Thanks, I’ll give it a try :slight_smile:

Yeah, I’m using that for random numbers already as the built in random didn’t seem great.