[Previous] i hate commies | Home | [Next] Alias is r0xx0r despite my complaints

curi's blocks

UPDATE: this entry is old. go here if you want my tetris.

i wrote a tetris clone is python using pygame. started 24hours 20min ago

the source code comes in 2 files:

[removed]

you wanna run tetris with blocks in the same folder. but first you need to have python and pygame installed.

NOTE: you have to right-click save-target-as to get the files, then name them correctly (tetris.py and blocks.py) because if you just click you'll open them in your browser. this will remain until someone explains to me how to put them up right.

get python here

get pygame here

the game isn't documented yet, but:

KEYS:

KEYPAD 4 or LEFT ARROW = LEFT
KEYPAD 6 or RIGHT ARROW = RIGHT
KEYPAD 5 or DOWN ARROW = TURN COUNTER CLOCKWISE
KEYPAD 8 or UP ARROW = TURN CLOCKWISE
SPACE or KEYPAD 0 = DROP
ESC = QUIT
B = redraw the screen. a debugging function. should never do anything. if it does there was a bug. tell me.

also there are some constants at the top of the blocks file you can change with a text editor. you can change the size of the blocks in pixels, the number of rows and columns the game uses, and the minimum brightness of blocks (they get a random color). changing anything but those 4 is highly NOT recommended unless you're a programmer.

if you find a bug please tell me. hopefully stupid, large bugs, if any, will be found before monday.

UPDATE:

version 1.1 now. a redraw bug fixed. rotation keys swapped. arrow keys added. b key added. game a little faster now. your score displays while you play. keypad 0 drops

INTENDED FUTURE FEATURES:

pausing (p key). game will get faster relative to your score up to a max speed. controls to send piece all the way left or right with one keypress (7,9,c,v keys). you currently can't slide a piece after hitting drop. i might change that. no guarantees (you can if you wait for it to fall)

NOT intended features: seeing next piece and a key to make piece drop faster but not instantly while held down, custom keybindings in-game. music. just play your own.

suggestions welcome, including extra keybindings


Elliot Temple on January 31, 2004

Comments (1)

wow this version is almost better than the one i downloaded that potentially costs money and it's prettier and stuff but yours is simple and elegant. The colors are pretty.


fr0ggE at 5:48 PM on February 1, 2004 | #409

What do you think?

(This is a free speech zone!)