Perlin performance

is it possible to make perlin any more quicker, for example only using math.perlin every 100 blocks squared in a 3d block world then connecting the empty spaces using some type of function

i’m also aware that it would lose some detail doing this

math.perlin() isn’t your issue here, its generating the blocks. It depends how you generate the blocks, but generally its going to cause some lag.

Some things you can do to improve it would be to only generate blocks that are visible, and generate the newer blocks when destroying others. So say you mine a grass block, it generates a new dirt/stone block in every direction besides ones with blocks already.

It also depends on how (or if) you store the blocks in script. If you store the position and block name in a table, or just forget about it. If you’re storing it in a table, I recommend using ID’s for storing what block is there instead of its name. Setting numbers in a table is much faster then setting a string, and will help a lot when generating tons of blocks.

Also if you’re storing it in a table, you can store the matrix in numbers instead of a Vector3, which will also save a lot of performance. Setting a block to the position 5, 25, -5 would be like

Blocks[5][25][-5] = BlockId

You can play this place to test how it works in game, which can generate perlin noise caves with a few thousand blocks in a very short amount of time. Practically instant in studio, but takes a few seconds in Roblox due to ping.