Pytetris Released


barnesy

Member
Joined
Sep 5, 2003
Messages
488
Website
Visit site
Hi all,

I've just released the first version of a Tetris port using pygame. You can download it here.

I've just written a readme, so may as well stick it here too:


This is pyTetris - a simple Tetris port for the gp2x handheld, built using pygame and python. The original version I modified is here: http://www.pygame.org/projects/21/133/

I don't think people have realised quite how exciting pygame is yet - I had never tried programming in Python until yesterday, but now feel like I can get fairly decent results with quite a small amount of effort. This port was very easy! I can happily try to answer questions on hat I've learned so far if it'll help.


Installation
============

You'll need to install theoddbot's python and pygame package to run this. You can find that and some info about it here: http://www.gp32x.de/board/index.php?showtopic=22505&hl=

To install python, you just need to download the zip file and copy the entire 'python' directory to the root of your SD card.

To install pyTetris, just copy the whole of the directory from this zip file into the root of your SD card. If you want it to run from anywhere other than \pyTetris you'll need to edit the .GPE file to match the new location.


How to play
===========

It's Tetris.


Controls
========

Joystick left and right - move blocks sideways
Joystick down - Make blocks move more quickly
Button X - Rotate left
Button B - Rotate right
Start button - Pause and restart
Select button - Quit


The future
==========

I've remarked out all the sound code for now, but I'll bring that back in at some point. And the high score code needs bringing back too.


Thanks to theoddbot for bringing python to the gp2x and for answering my questions on #gp2xdev, and thanks to Pea for the background image.

Enjoy!
Barnesy
 
Last edited by a moderator:
How does Python perform on the gp2x?

I love it too, but I always got the impression that on the PC, it's a bit slow, and a *huge* memory hog... which ware both things we can't really afford on the '2x...
 
The game doesn't launch all that quickly, but it seems to perform pretty well from what I've seen so far. I don't think the sort of things I'm aiming to write are going to be all that intensive anyway - I've not tried anything where speed really matters yet. I suppose I should play pyTetris for longer than I have, to see how well it speeds up!
 
Awww... and I wanted to do the first version of tetris as a homage to my wife since it's her favorite game.

Oh well, when my unit finally arrives I'll probably still do a tetris clone in C / SDL just for practice.

At least this way the wife will have something to play on my new GP2x as soon as it arrives without having to wait for me to code it first :D

Cheers barnsey :)
 
barnesy,

Thanks for reminding people that pyGame could be a really cool way to do simple (and a lot of not so simple) games on the GP2X, much like Fenix is on the GP32.

People, if you want to write code and C and C++ scares you? Give pyGame a try, it is a great way to express ideas and concepts and the results speak for themselvs.
 
FluffyPanda posted on Dec 3 2005 at 06:17 AM said:
Awww... and I wanted to do the first version of tetris as a homage to my wife since it's her favorite game.

Oh well, when my unit finally arrives I'll probably still do a tetris clone in C / SDL just for practice.

At least this way the wife will have something to play on my new GP2x as soon as it arrives without having to wait for me to code it first :D

Cheers barnsey :)

I'm working on one too, thus fulfilling the prophesy of 1 000 000 tetris clones for the GP2X. :p Puzzle games usually have simple logic and graphics and seem like the best place to start for programming games. Seriously though, I'm probably going to do it as part of a puzzle pack with a bunch of other puzzle games and release it as one big bundle. So please, nobody else do that.
 
Last edited by a moderator:
DJWillis posted on Dec 3 2005 at 11:47 AM said:
barnesy,

Thanks for reminding people that pyGame could be a really cool way to do simple (and a lot of not so simple) games on the GP2X, much like Fenix is on the GP32.

People, if you want to write code and C and C++ scares you? Give pyGame a try, it is a great way to express ideas and concepts and the results speak for themselvs.

I agree 100%, pygame is awesome. :)

In fact even C/C++ developers can find something cool about python and pygame. Sometimes you don't want to get bogged down in code and pygame is just a nice change of pace. I do C/C++ all day at work and working with python is a total joy.

What's also nice is that if you get comfortable with pygame and decide to switch to C/C++ for more power etc, most of the concepts apply and even some of the function calls have similar names since pygame is a wrapper around SDL.

cool stuff... I just need to actually *get* my gp2x so I can start enjoying these things!

~telengard
 
Last edited by a moderator:
Back
Top