Repository navigation
Park bench - #910
Park bench#910
Conversation
|
I think the result would be genuinely better if the bench always faced the nearest path instead of being given a random rotation. Is that something I should try to implement? |
I like the idea and I struggled with that in the past. It would make it look better visually, but I'm concerned about the impact on the generation time. Performing the calculations to correctly align the benches might be a few milliseconds on a small area, but it will add up on large areas. In the features I added in the past few months, I always tried to weigh up what matters the most for the individual cases: visual improvement or generation time impact? I'm aware that this shouldn't be too strict, so I will try to judge it on an individual basis after taking a closer look at the calculation efficiency. |
There was a problem hiding this comment.
Pull request overview
Updates amenity bench generation to look more like real benches by using slabs + upside-down stairs and orienting benches based on nearby road surfaces, while also refactoring upside-down stair creation into a shared helper.
Changes:
- Add
top_stair()helper to set stairhalf=topand reuse it in building facade stair generation. - Introduce
nearest_road()in amenities to pick a bench axis based on nearby road blocks (fallback to deterministic RNG). - Replace the old bench (smooth stone + logs) with a slab seat and two upside-down stair end pieces.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/element_processing/buildings.rs | Refactors upside-down stair creation to use the shared top_stair() helper. |
| src/element_processing/amenities.rs | Reworks bench placement (geometry + facing) and adds nearby-road detection heuristic. |
| src/block_definitions.rs | Adds shared top_stair() helper for creating upside-down stair blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
We can also just keep the orientation random, like before. |
…paths, and searching that instead of the actual blocks.
|
retrigger-benchmark |
|
⏱️ Benchmark run finished in 0m 48s 📈 Compared against baseline: 30s 🚨 This PR drastically worsens generation time. 📅 Last benchmark: 2026-04-12 14:21:50 UTC You can retrigger the benchmark by commenting |
|
retrigger-benchmark |
|
Just had a deeper look, looks good to me. I also like the idea of overhanging traffic signals. The ↗ 119% more memory usage isn't caused by this, will investigate where this comes from. Thanks! |
I tried to make the benches look more like actual benches.
