I adventure into the world of procedural terrain generation for my 2D roguelite platformer and learn a bunch of gamedev maths.
The game engine is Godot 4.2.
I used Canva for the illustrations.
If you want to create x and y like I do at the end of the video you can do it like this:
First generate a random angle between two bounds
var theta = _rng.randf_range(theta_lower, theta_upper)
Next generate a radius length between two bounds
var r = _rng.randf_range(r_lower, r_upper)
Then convert theta and r back from polar coordinates to cartesian coordinates
var x = r * cos(theta)
var y = r * sin(theta)