A simple pygame script for generating HEADPATS animations, like so
I've included sample images for a windows 3.1 icon and my twitter avatar.
- Python 2.7
- pygame (tested with 1.9.5)
- Provide your own background image (for example, your twitter avatar), and change BACKGROUND_IMAGE to point to it
- Optionally, provide a different hand image. This should be at approximately 10x scale, and have a transparent background. Set HAND_IMAGE to this image.
- Run headpats.py and see how the alignment looks
- Adjust HORIZONTAL_POSITION if it needs to be farther left (smaller values) or right (bigger values)
- Adjust PAT_OFFSET if it needs to be higher up (smaller) or lower (bigger)
- Adjust PAT_MULT if the hand needs to move farther or less far per pat. Bigger values mean more movement.
- Adjust TIME_DIV if the hand needs to move slower or faster. Bigger values move slower.
I didn't build in any function to directly create the GIFs, I instead captured the program running using OBS.
All code is GPL3. The example images come from iconart.dll and Microsoft Windows 95.