[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Referencing instances by memory address



Here's a couple good tuts on the topic:

http://docs.python.org/library/weakref.html#weak-reference-objects
http://blog.doughellmann.com/2008/01/pymotw-weakref.html
http://mindtrove.info/articles/python-weak-references/
http://www.pygame.org/wiki/MemoizingDecorator?parent=CookBook

> collision detection with no longer "existing" bullets continues, causing a sort of invisible barrier for bullets in the future.

What do you mean here problem with looping and .remove()-ing list items on death? Or need a bitflag?
  for cur in foo:
    if cur.dead or other.dead: continue
    # ...

--
Jake