473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Pygame Help

Hi,

I am trying to make a game using either livewires or pygame. The game
is tetris. Right now I have gotten the program to a point where
everything works (as in user input, score, lines, etc), except I can't
get more than one block to work. Right now I have the user playing a
game where a single block falls at a time instead of one of the seven
different patterns. I was curious how you would program the seperate
images to fall together and not break apart, because pygame and
livewires uses images as collision detection, so therefore you can't
make most of the shapes a single image because they will have
transparent spaces as part of the image, which will make floating
shapes and such.

--Thanks
--Andrew

Jul 29 '06 #1
2 1418
In <11**********************@i42g2000cwa.googlegroups .com>, Blaze Bresko
wrote:
[Tetris] I was curious how you would program the seperate images to
fall together and not break apart, because pygame and livewires uses
images as collision detection, so therefore you can't make most of the
shapes a single image because they will have transparent spaces as part
of the image, which will make floating shapes and such.
I wouldn't rely on the graphics library at all but create a "model" of the
game that's completely independent from the graphics. I think a two
dimensional structure with lists of lists is the simplest solution.

Ciao,
Marc 'BlackJack' Rintsch
Jul 29 '06 #2
I was curious how you would program the seperate
images to fall together and not break apart, because pygame and
livewires uses images as collision detection, so therefore you can't
make most of the shapes a single image because they will have
transparent spaces as part of the image, which will make floating
shapes and such.
The way I did it was to compose the shapes out of squares.
The implementation is available in the pygsear-games
distribution. You'd need pygsear also, to play the game.

http://www.nongnu.org/pygsear/

Jul 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Marian Aldenhövel | last post by:
Hi, I am trying to make pygame play music on windows. This simple program: import pygame,time pygame.init() print "Mixer settings", pygame.mixer.get_init() print "Mixer channels",...
3
by: Tim Knauf | last post by:
Hi everyone, I'm glad to have found this list. I've written a small script for my own use which, amongst other things, captures mouse click information from a window containing an image. I used...
3
by: devendra_k | last post by:
I want to intigrate the PyGame module with my Python exe, means i DONT want to generate .PYD files separtely rather than that want to put PyGame "c" src with Python workspace of VC project...
2
by: Brent W. Hughes | last post by:
I'm just starting to learn pygame. I write what I think is just about the simplest program that should display a window and then quit. #----------------------------------------------- import sys...
1
by: kjm | last post by:
Hi everyone, I have recently acquired a Logitech Rumble pad to use as an input device. I have been having trouble getting the event que to respond that a button or hat arrow has been pressed. ...
1
by: liuliuliu | last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a pygame display? i have a surface which is basically the entire visible screen -- how do you write this surface as an image...
5
by: enquiring mind | last post by:
Running 2.4.1 Python (learning) Running SUSE Linux 10 Am learning from a new books that mostly deals with windows python and Pygames called "Game Programming" by Randy Harris (2007) His books...
11
by: dynamo | last post by:
Hi guys i have come again with more problems.This time it has to do with pygame.The following code does not give any error messages but it does not do what it is supposed to do either.the code is a...
10
by: exodus | last post by:
As a fun little task to gain more knowledge of python, i decided to try to mimick the ipod UI with it. here's what i've got so far #!/usr/bin/env python # -*- coding: utf-8 -*- # generated by...
1
by: zswartz | last post by:
Hi All, I've been stuck here for some time now and can't figure this out. If ANYONE can assist me, that would be AMAZING!! I have Windows XP, with Python 25 and Pygame for python 25. I am also...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.