I was watching this video
(3) Procedural World Generation | How does it work? - YouTube
Time Stamp: 15:06
I thought the generation of dirt looks similar to a random walker that jumped to a random position after a random number of moves.
I’ve not long finished the ‘images’ section of the P5.js course and wondered if it was possible to create an image from a sketch?
I was hoping,
- To use a random walker to generate caves and ores on a canvas,
- convert the canvas into an image array using createImage() and loadPixels(),
- colour pick the pixels using get() to be used as a map for a level,
- and to place tiles(small images) according to the pixel colour of the image array.
I wanted to check my logic, since I’m new to this and not 100% sure if this is how createImage() works.
I looked at get(), but the reference implies this is used for images only.
I’d like to know if I started this project,
is it possible to do in this way,
or will it be a fight against code and its intended purpose?
Is this a project I should be trying to create when still new to code?
or should I wait until I’ve learnt more?
Its just the conversion of a canvas into an array I want to try,
NOT the creation of MineCraft