That would depend on what your using to do the animating, but you would need to check the position of objects are inside the screen area and if they not decide what to do with them bounce there co-ord or remove them etc.

Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.