Issue: Bring Life to SwarmShot: Pet Animation Integration
Prerequisites
Before starting, ensure you have the following set up:
- Python: Install the latest version (Python 3.8 or above).
- Pygame: Install the latest version using:
NOTE: Paths and File Organization:
All file paths should be relative to the root directory (SwarmShot folder).
Ex. Use 'Sprites/Sprites_Player/Char_003.png' for the character sprite path.
Replace \ with / in file paths, as Python treats \ as an escape sequence. For example:
Incorrect: Sprites\Sprites_Player\Char_003.png
Correct: Sprites/Sprites_Player/Char_003.png
How to Run any File
We recommend running all files by keeping the root folder as the current directory (Swarmshot Folder ). Means , First Open the SwarmShot folder using V S Code . Using the left Explorer panel , Open the practice.py file in 📁Example_of_Game/Practice_Animation Folder . Run this practice.py file ( either by pressing run code button or typing following in the V S code terminal ).
python .\Example_of_Game\Practice_Animation\practice.py


You can see a character animated through a sprite sheet . We can clearly see that both moving and Idle animations are correctly established. Explanation is in comments (written at the top ) in practice.py file.
Task Details
Create a python file with following naming in the 📁Practice_Animation Folder (which lies in 📁Example_of_Game )
- If you're from IIITA:
Roll_No_Name.py
- If you're not from IIITA:
OpenSource_GithubUserName.py
Use practice.py as the base code and build upon it . (Copy code from practice.py file into your python file )
Replace the Player Character with Favorite pet
Replace the current player sprite (Char_003.png) with a pet sprite from the repository and implement:
- Movement animations for the chosen pet.
- Idle animations when the player isn't moving.
Steps:
- Navigate to the
Sprites/Sprites_Pet/ folder in the repository. Select a pet sprite:
PET_BlueBird.png
PET_Fox.png
PET_Racoon.png
- Update the
Player class to load your chosen pet sprite.
Example:
self.sprite_sheet = pygame.image.load("Sprites/Sprites_Pet/PET_Fox.png").convert_alpha()
- Extract animation frames using the same logic as
Char_003.png in practice.py.
- Implement proper movement and idle animations for the pet. ( Both animations are in the same pet spritesheet ! )
- Result shall be like :

Resources :
Submission Guidelines
- Create a new Python file in this format:
- If you're from IIITA:
Roll_No_Name.py
- If you're not from IIITA:
OpenSource_GithubUserName.py
- PR description shall be :
Issue: #33
Added my favourite pet .
Tips
- Check the properties of your spritesheet to calculate frame dimensions and grid size.
- Refer to the
practice.py file for detailed explanations and example code.
- Test your implementation thoroughly to ensure smooth animations.

Issue: Bring Life to SwarmShot: Pet Animation Integration
Prerequisites
Before starting, ensure you have the following set up:
NOTE: Paths and File Organization:
All file paths should be relative to the root directory (SwarmShot folder).
Ex. Use 'Sprites/Sprites_Player/Char_003.png' for the character sprite path.
Replace \ with / in file paths, as Python treats \ as an escape sequence. For example:
How to Run any File
We recommend running all files by keeping the root folder as the current directory (Swarmshot Folder ). Means , First Open the SwarmShot folder using V S Code . Using the left Explorer panel , Open the practice.py file in 📁Example_of_Game/Practice_Animation Folder . Run this practice.py file ( either by pressing run code button or typing following in the V S code terminal ).
You can see a character animated through a sprite sheet . We can clearly see that both moving and Idle animations are correctly established. Explanation is in comments (written at the top ) in practice.py file.
Task Details
Create a python file with following naming in the 📁Practice_Animation Folder (which lies in 📁Example_of_Game )
Roll_No_Name.pyOpenSource_GithubUserName.pyUse practice.py as the base code and build upon it . (Copy code from practice.py file into your python file )
Replace the Player Character with Favorite pet
Replace the current player sprite (
Char_003.png) with a pet sprite from the repository and implement:Steps:
Sprites/Sprites_Pet/folder in the repository. Select a pet sprite:PET_BlueBird.pngPET_Fox.pngPET_Racoon.pngPlayerclass to load your chosen pet sprite.Example:
Char_003.pnginpractice.py.Resources :
Submission Guidelines
Roll_No_Name.pyOpenSource_GithubUserName.pyTips
practice.pyfile for detailed explanations and example code.