I'm trying to do a Triangle collision detection for my game in Pygame. I succesfully did the collision detection for all my rectangles via the
rect.collidelist(rectlist)
But now that I have implemented the Poligons (or Triangles more precisely), I can't do any good collisions. The collisions of the Triangles are squares, so I don't know what to do now..
Typically 2D collisions are implemented as squares in most games development frameworks. They are called "collision boxes" or "hit boxes". You could install a PyGame extension such as Pylygon to handle polygon collisions, or alternatively there is a much simpler solution:
Use multiple collision boxes on your triangle object, several small squares could map the collision detection fairly closely to the actual visual's profile. Of course this isn't going to be "pixel perfect" but it typically works pretty well, of course if you need very accurate collisions this way wouldn't suit it.
Here's a picture to illustrate what I mean by that: