XaiJu
fantasytowngenerator
fantasytowngenerator

patreon


Development Update - May 2024

Hey everyone, I hope you're all doing well. In April I worked on improving the edit settlement layout controls, as well as some rendering tweaks. This is the full list of updates:

Snapping controls

I fixed some issues with the implementation of the snapping, that caused inconsitent snapping behaviour. Essentially, the snapping depended on the camera angle rather than what was around the mouse cursor. Also, I added controls to let you change the snapping strength in tools that use snapping.

Better line intersections

I've updated how road intersections are rendered. Previously, they were not rendered:

Now, they are:

Essentially, I now render a circle at the intersection (with some logic based on the roads at the intersection to choose the right size + colour), along with the edges. This applies to most lines being drawn (like the active building line).

Tree brush tool

Added a tree brush tool that can be used to place multiple trees at once in a radius around the cursor. This can be found under the decoration tab of the edit layout controls.

New river drawing tool

There is a new river drawing tool available in the initial water view of the create settlement form and the edit settlement layout view. This control lets you draw just the general path of the river, and then use sliders to choose how wide and how smooth the river should be.

Building colour and roof shape brush

There is a new brush tool under the building controls. This lets you change the colour and roof shape of buildings. The roof shape options are hip and gable.

Background texture updates

Background textures have been updated to support custom solid colours. I've also added a tool to update background textures (similar to the building colour brush).

Draw custom building shapes

You can now draw the shape of buildings by hand. This option is found under the edit building controls.

New roof drawing method

While building the custom building shapes feature, I knew that the existing way of rendering roofs wouldn't handle the custom shapes well. This is because the existing way of rendering roofs just overlays a rectangular roof texture over the building, so for complex building shapes, the roof texture doesn't follow the flow of buildings.

I've created a new method of rendering the roofs based on the straight skeleton algorithm. This can be used to create a hip roof for complex building shapes, and a gable roof with some extra postprocessing. This looks like:

This is more computationally expensive to render - the building has more faces which need to be rendered.

There are two versions of this - a flattened version (seen above), or a full 3D version that gives a depth effect to the roofs. The old rendering option still exists (and is the default for less powerful devices). The flattened version is the default for more powerful devices. You can manually choose which option to use under the render option settings (accessed from the cog by the settlement name).

Other fun stuff

While playing around with the 3D building roofs, I thought it would be cool to build a full 3D map view. Turns out, that wasn't that hard, so I also added that as an option in the render settings. This is marked as unstable as it's not the intended way to interact with map, so there may be things that I haven't handled (and I don't think I'll spend much time fleshing it out in the future). As a fun toy, it should work fine (though it is more demanding to render). As part of this, I added a 'Street view' mode, that lets you walk (and fly) around the town in first person. This lets you get a view like this:

Conclusion

Well that's all for this month! I'm not sure what I'll work on next, maybe more interesting road junctions. As always, thank you for all your support, and if you have any thoughts or feedback let me know!

Comments

Love what you've created. Hills and cliffs would be cool to add to backgrounds. Also rock decoration that you could place like a tree. Keep up the great work!

Will Lillard

You so good at this, im in need of some hills or mountains

Thomas Bendesen


More Creators