# This is a part of the Avatar class, which has a map in self.map which has platforms (their pygame.rect's) in it.
for platform in self.map.platforms:
left = self.rect.x
right = self.rect.x + self.rect.w
top = self.rect.y
bottom = self.rect.y + self.rect.h
platformLeft = platform.rect.x
platformRight = platform.rect.x + platform.rect.w
platformTop = platform.rect.y
platformBottom = platform.rect.y + platform.rect.h
# If there is a collision
if (bottom >= platformTop) and \
(top <= platformBottom) and \
(right >= platformLeft) and \
(left <= platformRight):
pass
# NO IDEA
Help is very much appreciated, thanks for reading!