@playCelestial9 only the ones facing water, a shore tile is any land cell
touching water, everything inland never enters the search. i'm going to stop here, everything else goes in the next post. thanks for the good questions.
How it works: the whole input is one PNG. R paints the city shape, G the main roads, B the water. The generator reads it, drops the landmarks, grows the side roads to connect them, and builds the city on top. Ask me anything about the pipeline.
Devlog #05 ↓ #gamedev#indiedev #roguelite
checked the real numbers so i could answer honestly. twelve specks wouldn't even run, anything under the minimum island size gets rounded to a park before streets exist. twelve real islands is still one pass over one canvas, just grouped per island: flood fill once, then each island spans its own streets.
i did say islands weren't on the roadmap. then i built them this week anyway, because you called out the archipelago hole and it wouldn't leave me alone. the checkbox is optional now: separate regions generate as independent islands, and water gaps get bridged at the narrowest shore-to-shore crossing, with real bridge decks. tested on a three-island map with a river fork: two bridges, one connected road network.
measured while i was at it: 512x512 single island ≈ 1.3s in editor, twelve islands with eleven bridges ≈ 6.6s. not twelve runs, but not free. the bridge shore search is the obvious next profiling target.
i'll write the archipelago update as its own post, thanks for the sharpest questions i've had on here.
yeah, largest region wins and the rest of the archipelago silently sinks. there's literally a checkbox called keep largest land region, and the honest reason it's on. roads can't cross water yet, so a second island would be a city no street can reach.
not going to pretend islands are on the roadmap, they're not, demo comes first. but the shape of the fix is pretty obvious, run the pipeline once per island, and someday let roads pay extra to cross water.
you read the +0.5 exactly right. that half cell is basically the whole bridge between meters and the grid.
and widened, always. if a stroke survived extraction, someone drew it on purpose, and a road's only job is to connect things. dropping it breaks the network, widening it just makes it a bit fat. easy trade. the real noise filter runs way earlier anyway: stray pixels cleaned, holes filled, largest land region kept, all before extraction. by the time something is a polyline it has earned the right to exist.
so min width isn't really a filter, it's just the narrowest thing the world can physically build. the mask can draw thinner than the world can be. those strokes round up, they never round down to nothing.
that said, all of this is still on paper. i'm implementing it
now, so some of these answers might come back with dents. will post what actually breaks.
honestly exactly where i'd get stuck too. the trick is you never pick.
cheap version: the thinning erodes in a fixed scan order, so the centerline just lands half a cell to one side, same side every time. the re-carve is symmetric so the bias basically disappears.
real version: flip the sampling direction. instead of stamping pixels onto cells, extract the intent in continuous space first. strokes become polylines with a width set in meters, land and water become boundary contours. then each cell asks its own question at its center point: road if a centerline passes within half a width, land or water if the center falls inside the contour. nothing snaps to the grid until that test, so even vs odd never comes up. the one edge left is a feature thinner than a cell slipping between centers, and a minimum width in meters covers that. that's actually why my cell→world transform has the +0.5, every cell has an exact center to ask questions at.
yeah that's pretty much the right model, just one knob missing. the ratio decides how many cells the generator gets per pixel, but cell size decides what a cell is worth in meters. double the grid at the same cell size and you just get a bigger city, not a finer one. shrink the cells with it and the same pixel gets
carved twice as fine.
one detail from the code: the stuff you draw inherits the ratio. a 1px road stroke comes out 2 cells wide on 512, 4 on 1024. the stuff the generator invents doesn't, side roads are always carved at a fixed cell width. so your drawing scales, its inventions don't.
honestly that bugs me a bit, so next up: thin the painted strokes to centerlines and re-carve them at a set width. then the mask only says where the road goes, never how wide it is.
also "what you left it free to invent" is honestly a better
summary than anything in my design notes. 👍
good catch, but the png isn’t actually the floor. the generator resamples the mask into its own sim grid, currently 512×512 where each cell = 1×1m. so 1 pixel from the 256x256 mask becomes roughly a 2×2m patch in the world. lots, smaller roads, plazas, etc. are still generated per cell, so they can be much more detailed than the mask.
basically, mask resolution, grid resolution, and world scale are all separate. the same png can drive a 256 or 1024 grid. the png mostly controls how chunky the overall shape and main roads are.
You think the game is almost finished…
Then you notice one tiny detail nobody else would ever notice.
Now you can't stop thinking about it 😅
#IndieDev#GameDev#PixelArt
@RetroStyleGames co-op is a good fit for a pirate game, the friction of coordinating a crew is basically free comedy. congrats on getting to early access.
@lisyarus per-map seasonal patterns is the kind of detail nobody asks for and everybody notices on the second playthrough. a region that just never gets snow gives that map an identity for free.
@turnbasedlovers denied the afterlife is a strong premise for a roguelite specifically. the genre is already about dying repeatedly, so making that the story problem is a clean fit.
@Shadow_Hawk_09 segmenting the geometry up front so rigging and gore both come free is the kind of decision that pays for itself ten models later. a day is fast for that.
@hope42morr0w the overgrown fence line and the tire swing are doing more storytelling than any prop label could. midwest gothic is a great lane, nobody's really claimed it in games.
@domo_yoro_ sliding along the terrain contour instead of catching on every tile edge is what makes movement feel good in a platformer. easy to overlook, miserable to get wrong.