Active Topics

 



Notices


Reply
Thread Tools
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#11
BTW last year there was a Gorillas 2 (for MS-Windows PCs) which has new types of bananas and online play.

next you can try to find a DONKEY.BAS for n900
 
StefanL's Avatar
Posts: 298 | Thanked: 341 times | Joined on Aug 2010 @ This world :)
#12
Try installing on of the Python based programs (PyGTKEditor, gPodder); that should fix some missing Python dependies on your N900, or do an apt-get install pygame .
 
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#13
I believe the package is python-pygame that you are looking for. A good way to check is
Code:
apt-cache search pygame
Since you are already running experimental software, Omnom from extras-devel will pull in the right deps.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following User Says Thank You to epage For This Useful Post:
xxxxts's Avatar
Posts: 491 | Thanked: 341 times | Joined on Nov 2009 @ LA
#14
Originally Posted by epage View Post
I believe the package is python-pygame that you are looking for. A good way to check is
Code:
apt-cache search pygame
Since you are already running experimental software, Omnom from extras-devel will pull in the right deps.
Already had PyGTKEditor installed - I am now installing pygame. I will give this a try myself as well.
 
xxxxts's Avatar
Posts: 491 | Thanked: 341 times | Joined on Nov 2009 @ LA
#15
Code:
./gorilla.py: line 19: Hello, and welcome to the source code of Gorillas.py. This program is meant to be very well documented so that a
novice programmer can follow along. This program was written by Al Sweigart as a companion for his free, Creative
Commons-licensed book Invent: File name too long
: not foundy: line 20:
./gorilla.py: line 21: import: not found
./gorilla.py: line 22: from: not found
./gorilla.py: line 25: We'll import quite a few modules for this game. pygame has all the graphics & game-related functions that the
Pygame game engine provides. sys has the exit() function. time has the sleep() function. random has the randint()
: File name too longontains the pi constant.
: not foundy: line 26:
: not foundy: line 27:
./gorilla.py: line 32: All of the variables below in CAPS LETTERS are constants, that is, they are only supposed to be read and not
modified. (There's nothing to keep the program from modifying them, but it's just a convention programmers use.
The constants are a bit more descriptive than just using the numbers by themselves. And if you ever want to change
some value (such as the size of the explosions or the color of the gorillas), you only have to change it in one
: File name too long
: not foundy: line 33:
./gorilla.py: line 34: SCR_WIDTH: not found
./gorilla.py: line 35: SCR_HEIGHT: not found
./gorilla.py: line 36: FPS: not found
./gorilla.py: line 37: syntax error: "(" unexpected
I remember messing around with Gorillas when I was a kid in QBASIC - and Python is not very difficult, if I can just get it working!!!
 
StefanL's Avatar
Posts: 298 | Thanked: 341 times | Joined on Aug 2010 @ This world :)
#16
I just navigate to the location of the gorilla.py file on my Nokia in x-term then type python gorilla.py and it loads fine. Still have the key assignment problems (same as Noobmonkey Post #5, ie. can't enter name of players) to test it but it loads . Might mess with it a bit later.

NB: Got the file from an earlier post (Post #1) in this thread on a Windows machine and saved the web page to the N900.

Stefan

Last edited by StefanL; 2011-02-15 at 18:50. Reason: Fixed references
 
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#17
Originally Posted by xxxxts View Post
Code:
./gorilla.py: line 19: Hello, and welcome to the source code of Gorillas.py. This program is meant to be very well documented so that a
novice programmer can follow along. This program was written by Al Sweigart as a companion for his free, Creative
Commons-licensed book Invent: File name too long
: not foundy: line 20:
./gorilla.py: line 21: import: not found
./gorilla.py: line 22: from: not found
./gorilla.py: line 25: We'll import quite a few modules for this game. pygame has all the graphics & game-related functions that the
Pygame game engine provides. sys has the exit() function. time has the sleep() function. random has the randint()
: File name too longontains the pi constant.
: not foundy: line 26:
: not foundy: line 27:
./gorilla.py: line 32: All of the variables below in CAPS LETTERS are constants, that is, they are only supposed to be read and not
modified. (There's nothing to keep the program from modifying them, but it's just a convention programmers use.
The constants are a bit more descriptive than just using the numbers by themselves. And if you ever want to change
some value (such as the size of the explosions or the color of the gorillas), you only have to change it in one
: File name too long
: not foundy: line 33:
./gorilla.py: line 34: SCR_WIDTH: not found
./gorilla.py: line 35: SCR_HEIGHT: not found
./gorilla.py: line 36: FPS: not found
./gorilla.py: line 37: syntax error: "(" unexpected
I remember messing around with Gorillas when I was a kid in QBASIC - and Python is not very difficult, if I can just get it working!!!
The shell can't figure out how to run it. The file is missing a line in it to run properly. You need to prefix the command with "python" to work around this.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following 2 Users Say Thank You to epage For This Useful Post:
xxxxts's Avatar
Posts: 491 | Thanked: 341 times | Joined on Nov 2009 @ LA
#18
Originally Posted by epage View Post
The shell can't figure out how to run it. The file is missing a line in it to run properly. You need to prefix the command with "python" to work around this.
I feel like such a dummy! Thanks!
 
StefanL's Avatar
Posts: 298 | Thanked: 341 times | Joined on Aug 2010 @ This world :)
#19
Messed around with this a bit more now and can get into the game, but still having problems with user input (biggest problem is with entering numbers, I got the text input to work). I get all the way to the game screen, but only manage to blow up the monkey that is supposed to be throwing the banana. Anybody else managed to run the complete game?
 

The Following User Says Thank You to StefanL For This Useful Post:
StefanL's Avatar
Posts: 298 | Thanked: 341 times | Joined on Aug 2010 @ This world :)
#20
Ok, managed to get the game fully functional now. It is running in full screen mode with full hardware acceleration. Had to do some hacking on the user input side to get it to work, but was minor and probably took this long, because I am not experienced in python.

Added my edited version of the file, made some small changes in main() and the user info screen subroutine. Sorry, have not really properly documented all the changes yet.

Added some screenshots for all you out there enjoying retro-land .
Attached Images
    
Attached Files
File Type: zip gorilla.zip (11.4 KB, 146 views)

Last edited by StefanL; 2011-02-17 at 12:46. Reason: Added Screenshots
 

The Following 5 Users Say Thank You to StefanL For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:04.