SysTris-v1.1.0

Play with your Puppy.
Post Reply
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

SysTris-v1.1.0

#1 Post by SFR »

There's a lot of Tetris clones, inter alia "letter tetris'es", where Player have to match certain words to gain points and clear the board.

SysTris is similar, but the special thing about this one is that instead of "normal" words, Player have to match system commands!


Rules:
All kinds of commands (lower case only and 2-10 chars long) are allowed, eg.: echo, cat, gnumeric, dd, kill and so on; it depends only on what's available in your system.
(btw, due to my biased aesthetic concept, ingame letters are displayed in upper case)

HINT: to get some overview on available commands, open terminal window and press 'tab' key twice.

Commands are recognized if placed horizontaly or vertically, both forward or backward.
Just keep in mind, that some of them are impossible to match directly, because they have shorter commands inside, eg.: "depmod" may have: do, od, ed, mp.
But it's possible to match such commands indirectly, when letters fall down to fill empty spaces after previously matched command(s).

Now take a look at the screenshot.
The bottom cyan (with yellow letters) 10x10 area is significant, only commands from that area are being recognized.
The black (with purple letters) area above is neutral.
"GAME OVER" is when the whole significant (cyan) area is filled with letters.


Keys:
Left - move left
Right - move right
Down - drop the letter
P - Pause (press P again to unpause)
Q - Quit

On "GAME OVER" screen:
R - Restart
Q - Quit


Scoring:
A letter goes one field down on significant (cyan) area...........1 pts
Matching the command............................................................(10 * (command_lenght ^ 2)) pts
Matching multiple commands at once......................................500 pts extra for each additional command

BONUS: for each 10000 pts the lowest line will be wiped out.


Requirements:
Urxvt + Bash + tput (<-crucial) + usual set of external commands (sed, tr, cut, etc.)

Tested on:
- Slacko-5.3.3
- Lupu-528.005
- Precise-5.4
- Carolina-0.2
- Squeeze-5.X.3.4.2.9
- Lighthouse64-5.15
- MacPup-528v2
- Racy-5.3
- Quirky-1.1

Unfortunately it doesn't work on Akita OOTB due to lack of 'tput' and 'urxvt'.
Workaround:
- Grab /usr/bin/tput from other Puppy
- Install rxvt-unicode from Wary5 repo
- Go to /usr/share/terminfo/ and duplicate "rxvt" file under new name "rxvt-unicode"


NOTICE:
Due to massive calculations, it's not recommended to play this game on older hardware; might be simply too slow...
And it's best to turn off reduntant, resource-hungry apps before playing.


I've attached gzip'ed, stand-alone script (extract and click to play) as well as .pet with menu entry and program icon.
________________


Written on Slacko-5.3.3

Enjoy &
Greetings!
Attachments
SysTris.png
Screenshot
(32.5 KiB) Downloaded 785 times
systris-1.1.0.gz
SysTris stand-alone script (extract and click to play)
(3.6 KiB) Downloaded 592 times
SysTris-1.1.0.pet
SysTris.pet
(5.11 KiB) Downloaded 618 times
Last edited by SFR on Sat 03 Nov 2012, 14:18, edited 3 times in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#2 Post by vovchik »

Dear SFR,

Very nice and ingenious. Also works with Lucid!

Thanks.

With kind regards,
vovchik

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#3 Post by SFR »

Hey Vovchik
I'm glad you like it. Thank you. :)

__________________
Murphy wrote:Any non-trivial program contains at least one bug.
Hopefully the one I just found is also the last one.

Bugfix: not every command gets found when letters are being rearranged after previous, successful match.
Well, it's hard to me to explain this in details, but should be fine now; and the game should be also "a little bit" faster (side effect).

Version 1.0.1 uploaded.

PS. The game works fine also on Porteus and PCLinuxOS (after installing 'rxvt-unicode' of course).

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Yogi
Posts: 207
Joined: Fri 19 Aug 2005, 18:50

#4 Post by Yogi »

SFR,

Works with Quirky 1.1

Very nice. Small size but big challenge.
Fun way to learn system commands.

Thanks.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#5 Post by SFR »

Hey Yogi

Thanks for the info about Quirky, good to know!

________________

BTW, I'm not satisfied with the scoring. The model I've chosen is very bad.
For example: it's very difficult to match word "GETCONF" and Player gains only (left2right) 10*7=70 pts, but then for simple "IF" or "DD", user can gain even:
IF (down2up) => 2*80=160 + FI (up2down) => 2*40=80 + multiple_match bonus => 2*1000 = 2240 pts (!!!)

Therefore I equalized scoring to (10 * (command_lenght ^ 2)) pts in each direction:
2 = 10*(2^2) = 40 pts
3 = 10*(3^2) = 90 pts
4 = 10*(4^2) = 160 pts
5 = 10*(5^2) = 250 pts
6 = 10*(6^2) = 360 pts
7 = 10*(7^2) = 490 pts
8 = 10*(8^2) = 640 pts
9 = 10*(9^2) = 810 pts
10 = 10*(10^2) = 1000 pts

Also, for multiple matches it's 500 pts bonus now and only for each additional command.

So now for "IF" Player will get 4*10=40 pts (if) + 4*10=40 pts (fi) + 500 bonus = 580 pts
for "GETCONF" 49*10 = 490 pts
and for "OPENSSL" 49*10=490 pts (openssl) + 4*10=40 pts (ls) + 500 bonus = 1030 pts

Perhaps it's still not perfect, but much more fair, IMHO.

Anyway, the game is harder now. :twisted:

Version 1.1.0 uploaded.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply