23
Initial roads support (files.mastodon.social)
submitted 3 months ago by Shatur@lemmy.ml to c/bevy@programming.dev

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 :)

you are viewing a single comment's thread
view the rest of the comments
[-] Rogue@feddit.uk 2 points 3 months ago

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

[-] Shatur@lemmy.ml 1 points 3 months ago

Thank you!

This will definitely come in handy, offsetting is quite hard. For segments it's much simpler.

this post was submitted on 07 Aug 2024
23 points (100.0% liked)

Bevy

236 readers
1 users here now

A community for discussion around the bevy game engine! https://bevyengine.org/

founded 11 months ago
MODERATORS