Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Tetris Game -- based on a shell script (new algorithm)

Shell Programming and Scripting


Tags
shell, tetris

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 01-08-2012
Neo's Unix or Linux Image
Neo Neo is online now Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 22 October 2017, 9:48 AM EDT
Location: Asia pacific region
Posts: 13,782
Thanks: 893
Thanked 1,219 Times in 569 Posts
Thanks for that... yea, still has portablity issues on my Mac... will take a look in a Linux shell later...

Does seem like a very fine coding effort! Would be even more "cool" if portable across various OS!
Sponsored Links
    #9  
Old Unix and Linux 01-09-2012
complex.invoke's Unix or Linux Image
complex.invoke complex.invoke is offline
Registered User
 
Join Date: Nov 2009
Last Activity: 17 August 2017, 7:42 PM EDT
Location: BeiJing China
Posts: 236
Thanks: 6
Thanked 29 Times in 8 Posts
fixed!

Last edited by complex.invoke; 03-13-2012 at 02:27 AM..
Sponsored Links
    #10  
Old Unix and Linux 01-09-2012
sdebasis's Unix or Linux Image
sdebasis sdebasis is offline
Registered User
 
Join Date: Nov 2011
Last Activity: 9 January 2017, 12:27 PM EST
Posts: 23
Thanks: 10
Thanked 2 Times in 2 Posts
Hi,

Not able to run the game in my machine.Getting following error

Code:
Tetris_Game.sh[17]: syntax error: `(' unexpected

FYI:- I'm using bash shell. (LINUX RHE4)


Moderator's Comments:
Tetris Game -- based on a shell script (new algorithm) Please use code tags!

Last edited by zaxxon; 01-09-2012 at 06:41 AM.. Reason: code tags
    #11  
Old Unix and Linux 01-09-2012
complex.invoke's Unix or Linux Image
complex.invoke complex.invoke is offline
Registered User
 
Join Date: Nov 2009
Last Activity: 17 August 2017, 7:42 PM EDT
Location: BeiJing China
Posts: 236
Thanks: 6
Thanked 29 Times in 8 Posts
Quote:
Originally Posted by sdebasis View Post
Hi,

Not able to run the game in my machine.Getting following error

Tetris_Game.sh[17]: syntax error: `(' unexpected


FYI:- I'm using bash shell. (LINUX RHE4)
Your bash version is too low!
Sponsored Links
    #12  
Old Unix and Linux 01-09-2012
mirni mirni is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 15 August 2015, 3:18 AM EDT
Posts: 686
Thanks: 51
Thanked 178 Times in 171 Posts
Quote:
Originally Posted by huaihaizi3
The script is intended for redhat-based distro!
It runs on my Fedora16 machine, but the bottom half of the screen is messed up. There are brackets all over, and also some code can be seen:

Code:
cos(a) sin(a)
sin(a) cos(a)

This makes it not playable.

Moderator's Comments:
Tetris Game -- based on a shell script (new algorithm) Removed URL to pay to play site


Here are the details of my system:

Code:
$ uname -a
Linux mirosHP 3.1.0-0.rc9.git0.0.fc16.i686 #1 SMP Wed Oct 5 16:15:47 UTC 2011 i686 i686 i386 GNU/Linux
$ bash --version
GNU bash, version 4.2.10(1)-release (i386-redhat-linux-gnu)

Sponsored Links
    #13  
Old Unix and Linux 01-09-2012
complex.invoke's Unix or Linux Image
complex.invoke complex.invoke is offline
Registered User
 
Join Date: Nov 2009
Last Activity: 17 August 2017, 7:42 PM EDT
Location: BeiJing China
Posts: 236
Thanks: 6
Thanked 29 Times in 8 Posts
Quote:
Originally Posted by mirni View Post
It runs on my Fedora16 machine, but the bottom half of the screen is messed up. There are brackets all over, and also some code can be seen:

Code:
cos(a) sin(a)
sin(a) cos(a)

This makes it not playable.
The code below

Code:
 cos(a) sin(a)
-sin(a) cos(a)

on the lower right corner is the matrix equation of the core algorithm used for rotate and transpose! They are intended to show the core algorithm there just as the string "Algorithm" noted above them!
The left Rectangular area is the game area!

---------- Post updated at 09:27 AM ---------- Previous update was at 08:37 AM ----------

Quote:
Originally Posted by Neo View Post
Thanks for that... yea, still has portablity issues on my Mac... will take a look in a Linux shell later...

Does seem like a very fine coding effort! Would be even more "cool" if portable across various OS!
I added the link, you can see the Screenshot!
Sponsored Links
    #14  
Old Unix and Linux 01-09-2012
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 20 October 2017, 3:09 PM EDT
Location: Saskatchewan
Posts: 22,469
Thanks: 1,143
Thanked 4,262 Times in 3,936 Posts
Quote:
Originally Posted by huaihaizi3 View Post
Your bash version is too low!
Are the features you demand truly necessary?
Quote:
Originally Posted by huaihaizi3 View Post
I added the link, you can see the Screenshot!
Though it's difficult to be totally sure, being you saved your screenshots as bloated blurry jpg's instead of saving them as better-compressed, clearer png's with a smaller filesize, it looks like your game assumes everyone has terminals 120 characters wide.

When I make my terminal huge, it works, but almost nobody has terminals 120 characters wide. A warning could prevent a lot of confusion.

It certainly works well enough, knowing that! Looks nice. Your choice of pieces makes the game unwinnable but it's still fun for that Linux

Last edited by Corona688; 01-09-2012 at 10:26 AM..
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Is there picture based game under linux terminal? vistastar UNIX for Dummies Questions & Answers 18 09-02-2011 12:57 AM
text based football game? dadoprso UNIX for Dummies Questions & Answers 1 04-22-2010 12:32 PM
calling 'n' number of shell scripts based on dependency in one shell script. shashi369 Shell Programming and Scripting 1 11-03-2009 04:31 PM
Need to Write Shell Script based off of this shell command Rally_Point Shell Programming and Scripting 3 06-10-2009 05:19 PM
Shell Script Poker Game earnstaf Shell Programming and Scripting 8 03-11-2008 11:46 AM



All times are GMT -4. The time now is 09:49 AM.