I guess this might be a trivial question, nonetheless I couldn't find the answer anywhere.
I am currently building a small rpg style game and I am starting to have quite a few sprite groups.
I was wondering if there was a way to ask Pygame to refer to all existing groups ?
I would need this function to be able to move sprites which are deleted from my game to a deleted_sprite_group that I have.
At the moment I am adding all the groups to a list and iterating through that list but this requires some maintenance.
Note: I am not that lazy as to mind using a list but I try and optimize and clean up my code every so often. ;)
Thank you for your help !
Try making one group for all sprites in your game, and filling it while filling the separate groups
Is there a way to iterate through all existing groups automatically?