YoVDO

Wave Function Collapse

Offered By: Coding Train via YouTube

Tags

p5.js Courses Javascript Courses Data Structures Courses Creative Coding Courses Procedural Generation Courses

Course Description

Overview

Dive into the fascinating world of procedural generation with this comprehensive video tutorial on the Wave Function Collapse algorithm. Learn how to implement this quantum mechanics-inspired technique for creating complex, rule-based patterns in JavaScript using p5.js. Follow along as the instructor breaks down the algorithm, starting with basic concepts like entropy and progressing to more advanced topics such as handling asymmetrical tiles. Explore practical applications, refactor code for efficiency, and gain insights into solving common challenges. By the end of this 1-hour 19-minute session, you'll have a solid understanding of Wave Function Collapse and be ready to apply it to your own creative coding projects.

Syllabus

Day 1! Wave Function Collapse!.
Entropy in Sudoku..
Comparing Sudoku to WFC.
Starting to code..
Collapsing cells..
Evaluating entropy..
Updating entropy after collapse..
Data structure for rules..
Implementing rules for next collapse..
Explaining the rules..
Day 2! Refactoring the code..
Create a Tile class.
Generate the rules from Tile objects..
Using new circuit board tileset..
Day 3! Dealing with asymmetrical tiles.
Assigning index values to edges..
Incorporating edges into code..
Change adjacency for assymetry.
First assymetric WFC image!.
Restart if no valid cell found..
Next steps!.
Thanks for watching!.


Taught by

The Coding Train

Related Courses

Intro to Computer Science
University of Virginia via Udacity
Design of Computer Programs
Stanford University via Udacity
Analytic Combinatorics, Part I
Princeton University via Coursera
Algorithms, Part I
Princeton University via Coursera
Algorithms, Part II
Princeton University via Coursera