Getting collision detection in Pygames
Posted
by
user36010
on Game Development
See other posts from Game Development
or by user36010
Published on 2013-10-12T07:47:57Z
Indexed on
2013/11/12
10:24 UTC
Read the original article
Hit count: 192
I am writing a game in Pygame, I want to get collision detection. The aim is when a object hits another, the target object disappears. I want to avoid having classes and just have my code class less for now, in one script. This makes it difficult to get collision detection because the Rect method in Pygame is called on by an object(class).
The logic I want to achieve is:
object hits a target object
target object disappears.
is there an easy way to achieve this?(with minimal code possible)
© Game Development or respective owner