r/proceduralgeneration • u/Cryptoler1 • 20h ago
r/proceduralgeneration • u/Staz-GameDev • 23h ago
Procedural race circuits: the racing line, then the world grown around it
I have posted here my first work a few months ago on my procedural track generator.
I have reached the v2 of the generator, and thought I would post here again.
How it works, roughly:
- I measured 173 real circuits (corner radii and angles, straights, length, compactness) and the generator samples corners and straights from those distributions.
- The sequence is solved so the lap closes, then rejected or repaired if it fails. Up to 24 candidates per seed are scored against the statistics of their grade, and the best one wins.
- The pit lane is designed with the lap.
- The racing line is a minimum-curvature path, and the colours come from the speed profile computed on the circuit.
- The surroundings come last: run-off, barriers, service roads, grandstands, car parks, fields
r/proceduralgeneration • u/Velocity_LP • 12h ago
Preview screenshots of Brickadia's upcoming procedural terrain
r/proceduralgeneration • u/Marzipug • 1h ago
My browser game uses procedural generation to create an endless alien ecosystem - Microgenesis
Try it yourself (free): https://transcenduality.itch.io/microgenesis
r/proceduralgeneration • u/GridwrightStudio • 9h ago
Pixel outlines generated from a sampled curve get an extra pixel at every bend. The 3-pixel rule that removes them (61 to 43 px)
If you generate sprites by sampling a parametric curve and flooring each sample to a cell (blobs, slimes, rocks, planets), the outline comes out lumpy: thick on the curves, clean on the straight parts.
The cause: on a slope, a sample almost never crosses a cell exactly at its corner. The path steps one cell sideways, then one cell down, and both cells get set. That's an L: three pixels where two touching at a corner would do.
On the 32x32 slime in the picture (x = 15.5 - 12.6 cos t, y = 24.4 - 17.2 sin(t)^0.92, 2,001 samples over the top half), the raw path had 61 pixels, and 18 of them were L elbows. After the rule below: 43, one pixel wide all the way round.
The rule is the one pixel-art editors call "pixel-perfect": walk the path, and whenever the last three pixels a, b, c have a and c touching diagonally while b is a side neighbour of both, delete b.
def is_corner(a, b, c):
return abs(a[0]-c[0]) == 1 and abs(a[1]-c[1]) == 1 and ((b[0] == a[0] and b[1] == c[1]) or (b[1] == a[1] and b[0] == c[0]))
def pixel_perfect(pts):
out = []
for p in pts:
if out and out[-1] == p: continue
out.append(p)
if len(out) \>= 3 and is_corner(out[-3], out[-2], p): del out[-2]
return out
It only ever deletes the elbow of an L, so straight runs and diagonal steps survive, and it costs O(1) per point.
One more check for generated curves: the run lengths. Along a curve they should only shrink or only grow (4, 3, 2, 2, 1, 1). If they jump around (4, 2, 1, 3, 1, 2), the curve reads as dented even at one pixel wide (bottom of the picture).
(I make pixel-art tools at Gridwright; our browser pixel editor runs this rule on every pencil stroke. Linked below.)
The browser pixel editor that applies this rule as you draw: https://gridwright.dev/tools/pixel-art-editor/?ref=reddit-proceduralgeneration
r/proceduralgeneration • u/Suspicious_Ad1407 • 18m ago
Cornucopia fractal
galleryPart of the procedural fractal generation engine based on the residual ñ = π − 3.
The original Πñ fractal begins with an open heptagon constructed from three one-radian steps around a unit circle. Its seven edges follow the sequence αβαβαβγ.
Hemp Ferñ generalizes the original construction by introducing an adjustable terminal endpoint, allowing the contraction ratios and resulting morphology to vary.
Cornucopias is an extension of this family further through independently rotating endpoints, selectable recursive edges, midpoint and true-chord similarities, and compound leaflet assemblies.
The same underlying geometry produces fern-like structures, spiraling horns, nested cavities, branching trees and intricate organic formations without relying on procedural noise.
Every specimen has a reproducible mathematical recipe. Repeating symbolic addresses generate nested self-similar structures, while address-based coloring reveals their recursive ancestry.
The interactive engine includes adjustable symmetry, contraction parameters, 37 diagnostic fields, deep zoom, horn isolation and image exports.
I'm particularly interested in its applications to procedural vegetation, organic architecture and worldbuilding.
Interactive Πñ HEMP Ferñ · Cornucopia engine:
https://red-cake-f8c8.howmuchdifferencedoes.workers.dev/
Original research paper and tool:
https://zenodo.org/records/23247320
HEMP fern paper and tool:
https://zenodo.org/records/24280209
Happy Thanksgiving! Feel free to experiment with the mathematics and share your discoveries.