Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

After some time doing Advent of Code I've returned to my "game" project. The grid based approach to create maps was too restrictive and didn't take full advantage of the free geometry generation.

I've reworked this to allow arbitrarily shaped rooms in the future. Rooms are added to the layout one by one. Each new room is connected to the existing ones with a corridor defined by a cubic Bézier curve. Each "wall edge" of a room is treated a potential exit.

Next steps will be refining the corridor generation. At the moment I connect the two closest edge of new and existing rooms with control points placed at a fixed distance along the walls normals. This leads to misshaped corridors if the room are too close or at a bad angle.

2D room layout with 3 rooms connected by curved corridors

#gamedev #3d #geometry





Interactions

Reposted by Niko

Reposted by Mathematics Channel