https://gitlab.com/christosangel/stackabrix

stackabrix is a simple terminal game, written in Bash, where the user, against the clock and with the least moves possible, must sort the blocks according to their color, and stack them in the respective stack.

During the game, the user can move left and right, pick blocks and drop them in other stacks.

The aim is to sort the blocks, and stack them in the respectively named stacks, fast as possible, and with the least moves possible.

The play’s score is the sum of the time achieved in seconds and of the moves made.

If the score is among the 10 best scores achived, it makes it in the Top Ten Highscores.

win_game

Any feedback is welcome.

  • Bad_Company_Daps@lemmy.ca
    link
    fedilink
    arrow-up
    6
    ·
    3 days ago

    Looks pretty cool. I know this isn’t the point but I feel like from a games perspective the scoring is a bit off. I don’t think 1 extra second and 1 extra move should be the same value. For me to sit there and analyze what the optimal move set would be to move set would be to move a certain block may avoid 2-3 extra moves, but would take way longer than 3 seconds for me to calculate in my head. Maybe make a move add 5 points to the score?

    I wonder if there’s a game theory way to find the optimal amount that the moves and time should be weighed to make them equal value.

    Either way, pretty awesome you got this working in bash.

    • christos@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      Summing up seconds and moves seemed a fair way to mark one’s score. The analogy of each in the sum is purely arbitrary, and quite possibly subjective: Some people play based more with their reflexes, muscle memory, than calculation. Not everyone functions the same. However this is a fair point. Thanks for the feedback.

      • Bad_Company_Daps@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        13 hours ago

        I do agree in the end it’s arbitrary, and you’re right there are 2 extremes in strategy, purely analytical and purely reflexive, plus everything in between.

        Admittedly without having played this game specifically using both strategies this is purely speculation. But from my experience playing similar games, exactly to your point of the two strategies, if time and moves are weighed equally, I feel like a player using the analytics strategy would end up with a much higher score than a reflex based player at the “same” skill level (however “skill” levels would be pretty hard to quantify and compare by the two strategies).

        Hope that makes sense :)

        • christos@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          12 hours ago

          It does. And naturally, the more one practices, they become better at it.

          And there is the element of chance: if the randomly generated grid is helpful (e.g. half solved), the easier and quicker it is solved.