- 📥 Download animated Pokémon sprites from PokéAPI
- 🖼️ View animated GIF sprites with proper timing
- 🛠️ Multiple renderer implementations (Pygame, Tkinter, Matplotlib)
- 🖱️ Simple drag-and-drop interface (in some implementations)
- ⌨️ Keyboard shortcuts for quick sprite selection
- 🔄 Proper animation timing from the original GIFs
Charizard, the iconic Fire/Flying-type Pokémon (#6 in the Pokédex), is a fan favorite and the star of this renderer! With its majestic wings and flaming tail, Charizard represents the power and beauty of Pokémon animation.
View Charizard in all its animated glory with:
python pokemon_sprite_renderer.py sprites/6.gif-
Clone the repository:
git clone https://github.com/yourusername/poke-sprites.git cd poke-sprites -
Set up a virtual environment (recommended):
python -m venv poke -
Activate the virtual environment:
- Windows:
poke\Scripts\activate - macOS/Linux:
source poke/bin/activate
- Windows:
-
Install the dependencies:
pip install -r requirements.txt
Use the download_sprites.py script to download Pokémon sprites:
# Download the first 25 Pokémon
python download_sprites.py --range 1-25
# Download specific Pokémon by ID
python download_sprites.py 1 4 7 25
# Download sprites to a custom directory
python download_sprites.py --range 1-151 --output mypokemon
# Download Charizard (of course!)
python download_sprites.py 6The project includes multiple implementations for viewing sprites:
python pokemon_sprite_renderer.py sprites/1.gifControls
- Drag and drop GIF files to view them
- Press Escape to exit
- Press 1-5 to quickly load sprites starting with those numbers
A minimal implementation using Pygame:
python simple_gif_viewer.py sprites/25.gifControls
- Press Escape to exit
A viewer using the built-in Tkinter library:
python tkinter_sprite_viewer.py sprites/4.gifControls
- Use File > Open to load a sprite
- Press 1-5 to quickly load sprites starting with those numbers
- Press Escape to exit
A viewer using the Matplotlib library:
python matplotlib_sprite_viewer.py sprites/25.gifControls
- Press 'o' to open a sprite file
- Press 1-5 to quickly load sprites starting with those numbers
- Press Escape to exit
A viewer using PySide6 (Qt). Requires additional installation:
pip install PySide6
python qt_sprite_viewer.py sprites/6.gifControls
- Drag and drop GIF files to view them
- Use File > Open to load a sprite
- Press 1-5 to quickly load sprites starting with those numbers
- Press Escape to exit
| Component | Description | Pokemon Type |
|---|---|---|
| download_sprites.py | Downloads animated Pokémon sprites from the PokéAPI GitHub repository | ⬇️ Normal |
| pokemon_sprite_renderer.py | The main Pygame-based implementation for viewing animated sprites | 🔥 Fire |
| simple_gif_viewer.py | A simplified version of the Pygame renderer | 💧 Water |
| tkinter_sprite_viewer.py | An implementation using Tkinter, which is included in the Python standard library | 🌿 Grass |
| matplotlib_sprite_viewer.py | An implementation using Matplotlib for rendering | ⚡ Electric |
| qt_sprite_viewer.py | An implementation using PySide6 (Qt) for a modern UI experience | ✨ Psychic |
- Pygame: For rendering graphics and handling input in the main implementation
- Pillow (PIL): For processing GIF images
- Requests: For downloading sprites from the internet
- tqdm: For progress bars during downloads
- Matplotlib & NumPy: For the Matplotlib implementation
- PySide6 (Optional): For the Qt implementation
Most implementations include commented code for scaling sprites if they're too small. To enable scaling, uncomment the relevant sections in the viewer of your choice.
You can add custom sprites to the sprites/ directory and view them with any of the renderers. The viewers support any properly formatted GIF file.
-
GIF animation appears choppy
This can happen with GIFs that have inconsistent frame durations. Each implementation handles timing slightly differently. -
Error: No module named 'PySide6'
The Qt implementation is optional. Either install PySide6 withpip install PySide6or use one of the other viewers. -
Sprite files not found
Make sure to download sprites first withdownload_sprites.pyor place your GIF files in thesprites/directory.
This project is licensed under the MIT License - see the LICENSE file for details.
- PokéAPI for providing the Pokémon sprite data
- Pokémon is © Nintendo, Game Freak, and The Pokémon Company
- This project is for educational purposes only
"The important thing is not how long you live. It's what you accomplish with your life."
— Mewtwo