Problem mit dem "Sliding Puzzle (CMS) - by AFRLme"

  • #1, by eviltaigaThursday, 28. April, 08:11 A month ago
    Ich wollte das Script von AFRLme (Sliding Puzzle (CMS) bei mir einfügen, soweit funktioniert auch alles ohne Probleme und obwohl ich keine Ahnung von LUA habe, konnte ich auch alles soweit auf 1080p ändern, allerdings gibt es ein gewaltiges Problem, das Puzzle ist manchmal unlösbar.

    Ich habe soweit verstanden, dass "math.random(8)" für das mischen zuständig ist.
    Manchmal generiert er dabei Puzzle die unlösbar sind, wie zum Beispiel das hier:



    Wie gesagt, habe ich keine Ahnung von LUA, daher meine Frage: Kann man das mischen auf gewisse "Muster" beschränken? Dass man sagen kann "Schiebe 1 nach 3, 2 nach 5, etc", davon dann 2-3 Versionen und das Script sucht sich dann zufällig eine Version aus, damit man sicherstellen kann, dass das Puzzle auch wirklich immer lösbar ist.

    Newbie

    4 Posts


  • #2, by afrlmeThursday, 28. April, 14:30 A month ago
    That is correct. Back when I created & shared that sliding puzzle I didn't take into consideration that the randomization of the tiles might make the puzzle unsolvable. The solution is simple, just rework it so that the tiles always start in fixed positions & remove the lines of code to do with the randomization.

    Quick tip: I highly recommend posting in English if you want the best chance of getting help on the forum. I know Visionaire is a German based game engine, but a lot of the users of the engine & forum aren't German & don't speak German.

    I would also recommend checking out our discord server too @ https://discord.gg/g5zFejW, as you are more likely to get answers on there much faster than on here - eu times anyway.

    Imperator

    7122 Posts

  • #3, by afrlmeThursday, 28. April, 20:29 A month ago
    Ok, I've updated the wiki tutorial page. I've also added the correct color syntax & I've uploaded a new version of the sliding puzzle with a fixed starting tile position & I've added in a puzzle solved action & I've also added in a move counter example (could be inversed to limit amount of moves allowed to solve the puzzle).

    For some reason there was a bunch of stuff missing from the ved & resources. I've fixed that too.

    Also you can check out this website here to learn about sliding puzzles & what tile combination positions work - they have a random generator too that's supposed to generate solvable starting tile positions.

    Imperator

    7122 Posts

Write post