headbreaker
headbreaker copied to clipboard
Slightly different puzzle piece sizes/shapes/connections
Is your feature request related to a problem? Please describe. In real world jigsaw puzzles each piece is slightly different so just by (shape/size/connections position and size) you can tell if piece will fit with another one.
Describe the solution you'd like Differentiate each piece slightly.
Additional context
:wave: Hi @MartinTale!
That would be a nice feature. It is quite tricky, though, since designing such irregular but still matching connection - and making them look good :sparkles: - is a complex task. That is why headbreaker
puzzles don't try to mimic realistic features, but instead focus on providing flexible building blocks for implementing jigsaw-like data structures and games.
That said, implementing your own pieces outlines is provided out-of-the-box. Just pass your own outline
object - which should be capable of providing straight or Bezier points for a given piece - when you create your canvas
. See https://github.com/flbulgarelli/headbreaker/discussions/55 for more details.
Since you can attach your own metadata
to your pieces, you should be also able to control how each individual piece is rendered.
That said, feel free to provide a more detailed specification of how that edges should be drawn, or even an implementation of a working outline
, and I would happily integrate it to the core :muscle: .
Hope that helps!