Terrain Generation in Scratch Caves and Ores
We'll write code to add caves and ores to our 2D terrain in Scratch. We'll cover how to create smooth cave generation, as well as how to scroll around our world. Enjoy!
Add your projects to this Scratch studio: https://scratch.mit.edu/studios/32662603
Chapters
00:00 Introduction
01:55 Some small changes
02:27 Basic scrolling
04:57 Drawing only onscreen columns
06:30 Camera controls
09:30 Adding ores
12:00 Drawing ores
14:37 Different ore types
17:39 Cave starts
22:20 Drawing caves
23:43 Underground cave starts
25:20 Extending caves
32:44 Ending caves
34:31 Ending caves that are off the world
37:08 Extending after generation is complete
38:30 Branching caves
39:43 Preventing caves from overwriting trees
42:16 Preventing trees from drawing on caves
44:30 Preventing caves from drawing on water
47:15 Summary / Announcements