In order to draw the sprites in order, so the ones in front would overlap the ones in back, I implemented a routine that would sort all of the game objects by order of their y position. This was done by putting the sprites into a binary search tree, and doing an in-order traversal to draw them with the correct overlap. I added a trash can object to test it, so here is the game running with 20 trash cans:
Here it is running with 2000 trash cans:
That seems to work fine, so I'm going to move on to getting grabbing and throwing working. Once I do that, I can get some enemies in to fight. I sense there might be a demo in the near future, one with fighting and trash can throwing.