Sections
Daniel
Moriah
Photos
Recipes
Movies
Software
Other
About
Contact
Show/Hide Search
Wolf
Entries By:
Daniel
Moriah

Entry Type:
Audio
Blog
Chat
Code
Link
Lyrics
Picture
Quote
Thought
Video

Archives By:
2012
M
A
M
F
J
2011
D
N
O
S
A
J
J
M
A
M
F
J
2010
D
N
O
S
A
J
J
M
A
M
F
J
2009
D
N
O
S
A
J
J
M
A
M
F
J
2008
D
N
O
S
A
J
J
M
A
M
F
J
2007
D
N
O
S
A
J
J
M
A
M
F
J
2006
D
N
O
S
A
J
J
M
A
M
F
J
2005
D
N
O
S
A
J
J
M
A
M
F
J
2004
D
N
O
S
A
J
J
M
A
M
F
J
2003
D
N
O
S
A

Links:
Toast Driven
Gemstone Creations
Wagging Work
Luke
Peter
Matt
Christian
Andy
Nummy!
Arthur
Nico
Mike T.
Phil
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.

Add A Comment