- cross-posted to:
- projectharmonia
- cross-posted to:
- projectharmonia
I working on a life simulation game with a working title Project Harmonia.
Added initial editor for roads, reusing some logic from the walls implementation.
Currently, I’m using segments for road creation, but I plan to add Bezier curves to allow for curved walls and roads. Maybe I should use Bezier curves even for straight lines 🤔
I also need to use a texture without road markings for connection islands and implement rounding for turns.
But wanted to share the current progress :)
This is neat. If you do look at beziers you’ll run into some difficulty with offsetting them / creating parallel curves.
But you can find a solution for that with this crate: https://crates.io/crates/kurbo
And a nifty article on the topic: https://raphlinus.github.io/curves/2022/09/09/parallel-beziers.html
Thank you!
This will definitely come in handy, offsetting is quite hard. For segments it’s much simpler.