I want to determine which sprite to use when one agent is "facing" another agent. My game is 2d, and uses 8-directional movement. Deciding which sprite to use for movement is easy enough since there ...
Suppose you have two images: step1.png and step2.png . Can anyone show me a very simple example in pyglet how to loop through those 2 images say every 0.5 seconds? The character doesn't have to ...
I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method) How would I retrieve the nth sprite in this group? Code like this does not work: mygroup = ...
Is there a way to shufle a group of sprites created with: pygame.sprite.Group() I have tried using random.shuffle but it apparently doesn't work on sprite groups.