Jump to content




2D noise generation API (with demos)

api

  • You cannot reply to this topic
2 replies to this topic

#1 Xella

  • Members
  • 137 posts
  • LocationOn Earth

Posted 07 July 2018 - 01:44 PM

Hello everyone, today I present to you my 2d noise generation API.
It's grid-based and only really has one function.

API Pastebin: XpmVCuU3

Demo1 Pastebin: ebwe7qjQ

(Second and third demo require the BLittle API and my BufferAPI)
Demo 2 Pastebin: rpLzDPmh
Demo 3 Pastebin: MUSiLETr

BLittle: http://www.computerc...76-blittle-api/
BufferAPI: http://www.computerc...343-buffer-api/

You have my permission to include this API in any of your projects. =)

"Documentation":
noise.createNoise(size, x, y, seed, [smoothness])
-- parameters:
-- size: the size of the noise you want, a power of 2
-- x: the x-coordinate of the chunk you want to get
-- y: the y-coordinate of the chunk you want to get
-- seed: the seed to use when generating the noise
-- [smoothness]: (optional) default is 1, minimum is 0. The maximum for this variable depends on the size of the noise you want to generate

-- returns:
-- noise: a two-dimensional table filled with values from 0 to 1

Video explanation:

Edited by Xelostar, 09 July 2018 - 10:18 PM.


#2 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 07 July 2018 - 01:52 PM

Pretty nice stuff! I like it :D

#3 Xella

  • Members
  • 137 posts
  • LocationOn Earth

Posted 07 July 2018 - 02:01 PM

 InDieTasten, on 07 July 2018 - 01:52 PM, said:

Pretty nice stuff! I like it :D
Thanks! Let's hope it'll be useful to someone one day. =P





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users