for practice I'm trying to make a clone of the game Loop hero.
I have most things done but I don't know how to make the procedural generated path that loops around in a nice way.
My best idea is to designate a starting point and create tiles in one direction with small random chances to turn perpendicular to that direction and keep going on the original direction once close to the edge of the zone force a turn and repeat 4 times. To make it wrap around my idea was to check for the position of the starting point on the "third forced direction turn" and with a lot of if statements match the position tile by tile.
Is there an easy way to do this? or should I try to implement the above?