Ask coding questions

← Back to all posts
How do you make chunks?
UltraCoders096 (0)

Can somebody help me make code chunks? Is it in Java or what? Can you type the code?
Thanks!

Answered by SixBeeps (5062) [earned 5 cycles]
View Answer
Comments
hotnewtop
SixBeeps (5062)

What exactly do you mean by code chunks?

UltraCoders096 (0)

@SixBeeps What I mean is like in Minecraft there are Terraria chunks.

JacobMcPherson1 (193)

@SixBeeps I think he means terrain generation like how in Minecraft when you walk forward it generates chunks around you

SixBeeps (5062)

@UltraCoders096 Oh, you're looking for terrain generation.
That's not something that's necessarily built into any languages, you actually have to code the algorithms on your own. Also, chunks are simply a unit of measurement to make storing/calculating things a lot easier.
The Diamond-square algorithm for terrain generation is a common algorithm you might want to look into. You'd generate small portions at a time (these are your chunks) then chain them together to make a larger terrain.

tussiez (1514)

@UltraCoders096 Let me know if you need any help with this :)