Hex map generation using wave function collapse by Troels Hoffmeyer @ Copenhagen Rust Community

Поділитися
Вставка
  • Опубліковано 16 вер 2024

КОМЕНТАРІ • 4

  • @faldarith
    @faldarith 10 місяців тому +2

    Ugh what a perfect intersection of all of my interests lol. Thanks for this.

  • @carterthaxton
    @carterthaxton 10 місяців тому +2

    Thanks for sharing your project, and love of Rust!

  • @johanngambolputty5351
    @johanngambolputty5351 8 місяців тому

    26:22 that's an interesting way of doing cyclic permutations, I imagine for such small arrays it doesn't really matter, but you could filter for positions in side1 where the first element of side2 occurs and just consider those offsets (might only be one).
    So maybe like
    let matching_start_offsets = (0..6).filter(|i| side1[i]==side2[0]);
    for i in matching_start_offsets {
    if (0..6).find(|j| side1[i+j%6] != side2[j]).is_none() {
    return true;
    }
    }
    return false
    Also wave function collapse is pretty much equivalent to the method of constraint propagation? Entropy is just counting the number of configurations, so its the same as the policy of setting the most constrained tiles first, to reduce the likelihood of backing yourself into a corner early, the flexible slots can be left until more is determined...
    P.S. There an MIT open course lecture on this and more by Patrick H. WInston, its really good, there's a bunch of other things like Dijkstra's/A* that you can express as a graph search which you can just do with a cue of nodes to visit and picking things from the queue in different ways...

  • @alexandriap.3285
    @alexandriap.3285 10 місяців тому

    The DBUS TUI sounds really useful! Can I have a link?