ScratchData LogoScratchData
Back to Nred2010's profile

Procedural World Generator (with basic wave function collapse)

NRNred2010•Created January 27, 2024
Procedural World Generator (with basic wave function collapse)
5
4
71 views
View on Scratch

Instructions

for the algorithm to work you'll need to turn on turbo mode by holding shift on your computer and pressing the green flag, and then press it again without holding shift. after the world is generated or the project is stopped manually four sliders will appear that will change how the next world is generated, these are; ------------------------------------------------------------------- sandiness; increases the chance for a chunk to be sand. roughness; decreases the chance for a grass chunk to be created next to another grass or water next to water. size; increases the size of each chunk (lowering wait time but having less chunks in total). extras; increases chance for an extra to spawn ------------------------------------------------------------------- The chunks that can be created are; ------------------------------------------------------------------- sand; can always be placed. grass; can't be placed next to water but has higher chance of being placed next to another grass. water; can't be placed next to grass but has higher chance of being placed next to another water. ------------------------------------------------------------------- after the chunks are generated, it can then create the following extras; ------------------------------------------------------------------- flower; placed on grass. tree; placed on grass. forest; placed on grass surrounded by other grass. rock; placed on grass or sand next to grass. palm; placed on sand next to water. cactus; placed on sand surrounded by sand. lily pad; placed on water in between two sand. deep water; placed on water surrounded by water. -------------------------------------------------------------------

Description

i was inspired to make this after watching a video explaining the wave function collapse algorithm that can be used for world generation (among other things), and i think i did quite a good job replicating it.

Project Details

Project ID957233183
CreatedJanuary 27, 2024
Last ModifiedFebruary 1, 2024
SharedFebruary 1, 2024
Visibilityvisible
CommentsAllowed