50
submitted 2 weeks ago by christos@lemmy.world to c/opensource@lemmy.ml

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.

top 4 comments
sorted by: hot top controversial new old
[-] Bad_company_daps@lemmy.ca 6 points 2 weeks 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.world 3 points 2 weeks 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 2 points 1 week 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.world 2 points 1 week 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.

this post was submitted on 11 Dec 2024
50 points (98.1% liked)

Open Source

31723 readers
110 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS