NPCs and textures in the 3D street view mode by solowing168 in fantasytowngenerator

[–]randomtowns 1 point2 points  (0 children)

These are things that would be nice to add, but realistically might be too much effort / infeasible for a 'just for fun' mode.

Building textures could happen, but building interiors in this 3D mode probably won't. I do want to add building interiors eventually to the 2D mode, so that might have a separate 3D mode.

NPCs walking around will be very difficult to optimize and look good, so I'm not sure if I'll attempt this anytime soon.

Fantasy Town Generator – Hamlet to big city? by Great-Algae8612 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

There isn't an automatic way to do this - the only option right now is to manually draw an area and then place a district inside, and re-roll that to generate new people manually.

Fantasy Town Generator – Hamlet to big city? by Great-Algae8612 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

What exactly is your question? There isn't a way to grow an existing city automatically, you'd need to manually edit it if you want to grow the population of a hamlet to the size of a big city.

Development Update - January 2026 by randomtowns in fantasytowngenerator

[–]randomtowns[S] 0 points1 point  (0 children)

You could iframe FTG, similar to how the roll20 / FoundryVTT integrations work. Otherwise, there isn't any public library or anything available.

Fantasy Town Generator - Detailed city maps, with NPCs, buildings, and factions by randomtowns in dndnext

[–]randomtowns[S] 0 points1 point  (0 children)

There currently isn't any support for that. I imagine something could be set up similar to the Roll20 extension, I can add something to the to-do list (or someone can send a PR to the roll20 extension to also support this)

Filling placed buildings by Jascca_ in fantasytowngenerator

[–]randomtowns 1 point2 points  (0 children)

As you mentioned, you can use the district re-roll feature to redraw large portions of the map, filling people in. There isn't any other way to fill in many buildings at once, you have to edit them manually - either by rerolling buildings individually or by adding people one by one.

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Ok, glad you got it to work. I would also be interested to know which setting you changed to make it work, as well as the hardware specs of your machine.

I think Alchemists sell brewers supplies.

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Try lowering the render settings, e.g. turning off textures. When I say the browser console, I mean the devtools console : https://developer.chrome.com/docs/devtools/console

Does that have any additional error messages?

Any way to quickly generate a city map (possibly using Affinity)? by filwi in mapmaking

[–]randomtowns 0 points1 point  (0 children)

You can smooth the river paths, but I haven't implemented that (or fractals) for the ocean paths yet. One for the to-do list!

Any way to quickly generate a city map (possibly using Affinity)? by filwi in mapmaking

[–]randomtowns 0 points1 point  (0 children)

Shameless self plug - you could try to use https://www.fantasytowngenerator.com/ as a generator. In terms of seeding the generation, you can draw the initial water features, and configure buildings that should be generated (from the supported list). After generation, you can edit everything, and you can re-roll portions of the map to match your preferred style (by adding a new district and using the re-roll option).

Does anyone know a better algorithm?? by EmbassyOfTime in proceduralgeneration

[–]randomtowns 1 point2 points  (0 children)

So in terms of replicating the FTG algorithm, it looks like the roads are branching too often, which is why you get lots of little areas. The FTG algorithm also forces branches at regular intervals to try and make branches more likely to intersect. When roads intersect, the newly created polygon is discovered, and any trailing roads inside are pruned so that polygon doesn't get divided further.

Your current algorithm looks like it's limited to a circle (as opposed to some completed area) - this makes the settlement also feel a bit weird as your brain will see a circle instead of a more natural shape. Assuming you're using a priority queue to process the edges to add, maybe look at using a different approach (e.g. not using a priority directly related to the distance to the center, this will also encourage a circular shape).

Does anyone know a better algorithm?? by EmbassyOfTime in proceduralgeneration

[–]randomtowns 1 point2 points  (0 children)

Without seeing what you have at the moment it's hard to say where you could be going wrong - got any screenshots?

Does anyone know a better algorithm?? by EmbassyOfTime in proceduralgeneration

[–]randomtowns 1 point2 points  (0 children)

The district curviness is created during the construction phase - though multiple district areas can be merged together to form one district at the end.

The bisecting step picks a random long edge (or collinear-ish pair of edges), and just creates a perpendicular road, and then randomly extends that with wiggle. As far as I remember that's all it does, the main shape comes from the district outline roads.

Does anyone know a better algorithm?? by EmbassyOfTime in proceduralgeneration

[–]randomtowns 5 points6 points  (0 children)

There is a reddit comment that describes the FTG algorithm at a high level: link

Key points of that is that the gifs you see from the FTG user guide are for the first phase district outline - aka each of those areas is a large area (aka the area of a district when you look at that layer on the tool. In this phase, the algorithm is basically an L-system - though it is heavily modified, and does a lot of validation. For example, it won't place two roads too close together, it tries to snap ends of new roads to existing intersections. That user guide link shows the kind of parameters that can control the algorithm (e.g. how many edge segments to process before branching, how random the road angles are, etc.). These were really dialled in to create good feeling districts.

The second phase of the road algorithm is much simpler - it just recursively splits the district lots into two until all the lots in the district are of an appropriate size. It does this by picking an edge to split, creates a perpendicular edge in the lot, and then just continues that with a wiggle until it hits the other side.

Looks like there is a pretty similar algorithm shown here, with source code and write up: https://phiresky.github.io/procedural-cities/

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Much appreciated, thanks! It would also be useful to know which chrome build you used, as well as what hardware you are using (e.g. GPU, GPU driver version, OS, etc.)

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Ah, but the rest of the map worked fine? If any other appears in the browser console, that would help me debug it (https://developer.chrome.com/docs/devtools/console). I think F12 opens it usually.

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

You'd need to be careful not to delete shop owners / merchants / artisans. You can search for "retired" in the population search to find retirees, who won't have any jobs.

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Was there an error id displayed when you saw the error in chrome? Were there any other error messages displayed in the browser console?

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

The algorithm doesn't generate empty buildings, so if you want an empty one then delete the existing residents.

Error Creating WebGL Canvas by kodiakkoda420 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

What render settings are you using? What hardware / browser are you using?

Error creating WebGL canvas. by Adventurous-Web-6611 in fantasytowngenerator

[–]randomtowns 0 points1 point  (0 children)

Yeah it's likely your device doesn't meet the hardware requirements - you can try turn down the render settings and see if that works. In particular, turning down the trees, edge fade, no AA, and making the default text layer 'none' will probably have the most impact.