[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Background and collision detection in Lunar Lander game



I have written a simple Lunar lander type game in pygame.
 
I now want to add a lunar surface with a designated landing area.
 
I can do the surface as a BMP of course.  But I want an easy way to handle collision detection.
 
Is there any cookbook method for this?
 
I thought about writing a program to convert the BMP into a set of rectangles that could be used for collision detection.  I coul then put those rectangles in a file, load the file at run time, and build a list.
 
Two problems with that:  I do not know the format of a BMP.  And I think I would get a LARGE number of rectangles on a 30x300 BMP file.