August 29, 2005
[Daniel] PyWeek: Collision Detection
VICTORY IS MINE! After 4 hours of struggling with worthless tries at collision detection, I have succeeded at creating an effective and extremely flexible solution. Collision detection in video games provides the game engine notice of when two objects (such as player & wall or bullet & opponent) hit each other's outmost region. This is usually done using rectangles to surround the objects in question. However, the method I finally thought up and used uses a "mask" (or black & white) version of the landscape. The white are areas you can roam in, the black is a wall. This worked far better than all the previous tries and I am super-excited that it works this well.But this version is not called "So Tired" for no reason. I have to get up in 5 short hours and work. =( Oh, well. I had a good night and, while I'm slightly behind schedule, I'm doing way better than I thought I would. Tomorrow night, I tackle the scoring subsystem and the power meter.
As usual, the screenshot and download are located above.
Permalink
|
Comments (0)

