Coral Generator
Overview
when:
The last week of March 2021
Objective:
Translate the splendor of Blue Planet II onto the small small screen (i.e. make something cool inspired by the ocean).
my motivations:
I had just learned about procedural generation and was curious about how it worked. I thought that coral would be the perfect thing to procedurally generate because they look like they grow according to a set of rules.
technologies:
React, Node, JavaScript, HTML5, seedrandom npm package.
Current solutions:
There are lots of cute ocean flash games out there. I like this one.
The final product:
A website that lets you randomly generate coral seascapes and download or save the seed of ones you like. I like to use it for giving people seascapes that are generated using their names.
What I learned
- JavaScript's random number generation isn't truly random, it only simulates randomness.
- In procedural generation, seeds are strings that pseudo-random number generators use to produce the same numbers in the same order when called by a script. This means that the same seed always produces the same results.
- A recursive function calls itself over and over to perform some computation and must be told when to stop calling itself by the implementation of a base case (or else it goes on forever and breaks your device).