Pygame Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Blaze Bresko

    #1

    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

  • Marc 'BlackJack' Rintsch

    #2
    Re: Pygame Help

    In <1154208452.432 901.180230@i42g 2000cwa.googleg roups.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

    Comment

    • Lee Harr

      #3
      Re: Pygame Help

      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.



      Comment

      Working...