Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 21 Aug 2014, 14:11
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Games
SysTris-v1.1.0
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1053

PostPosted: Thu 01 Nov 2012, 10:30    Post subject:  SysTris-v1.1.0
Subject description: Tetris clone...for geeks only! ;)
 

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!
SysTris.png
 Description   Screenshot
 Filesize   32.5 KB
 Viewed   646 Time(s)

SysTris.png

systris-1.1.0.gz
Description  SysTris stand-alone script (extract and click to play)
gz

 Download 
Filename  systris-1.1.0.gz 
Filesize  3.6 KB 
Downloaded  352 Time(s) 
SysTris-1.1.0.pet
Description  SysTris.pet
pet

 Download 
Filename  SysTris-1.1.0.pet 
Filesize  5.11 KB 
Downloaded  378 Time(s) 

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Sat 03 Nov 2012, 10:18; edited 3 times in total
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 01 Nov 2012, 10:45    Post subject:  

Dear SFR,

Very nice and ingenious. Also works with Lucid!

Thanks.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1053

PostPosted: Thu 01 Nov 2012, 16:46    Post subject:  

Hey Vovchik
I'm glad you like it. Thank you. Smile

__________________

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!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Yogi

Joined: 19 Aug 2005
Posts: 177

PostPosted: Sat 03 Nov 2012, 02:59    Post subject:  

SFR,

Works with Quirky 1.1

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

Thanks.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1053

PostPosted: Sat 03 Nov 2012, 10:27    Post subject:  

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 Evil

Version 1.1.0 uploaded.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Games
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0592s ][ Queries: 13 (0.0045s) ][ GZIP on ]