Sky Warrior is a fast-paced 2D space combat game built with Python and Pygame. Pilot your spaceship through waves of AI-driven fighters, dodge missiles, and emerge victorious by unlocking higher levels. The gameplay features intense dogfights, EMP attacks, turbo boosts, slow motion mechanics, and a score system that rewards smart tactics.
- Features
- Gameplay
- Controls
- Installation
- Running the Game
- Running from the Pre-Built Distribution
- Project Structure
- Contributing
- License
- Credits
- Contact
-
Multiple Levels & Level Unlocks
- Progress through 5 levels of increasing difficulty.
- Levels are loaded from
levels.jsonand controlled by an internal SQLite database.
-
Diverse Enemy Fighters
- Standard Fighter: Launches missiles and fires bullets.
- EMP Fighter: Fires an EMP pulse that slows or disables your ship for a short duration.
-
Adaptive AI
- A centralized AI (
brain.py) dynamically controls how fighters maintain distance, slow down, or turn away from threats.
- A centralized AI (
-
Slow Motion Mechanic
- Trigger slow motion with
Left Ctrl/Right Ctrlfor tactical advantages.
- Trigger slow motion with
-
Turbo Boost
- Hit
Left Shiftfor a speed burst—provided you have enough turbo charge left.
- Hit
-
Scenic Background & Clouds
- Dynamic cloud images that wrap around the screen, giving the impression of a vast environment.
-
Minimap
- A small minimap helps you track nearby enemies, missiles, and important objects.
-
Particle Effects & Explosions
- Bullet trails, missile explosions, screen shake, and spark effects for an immersive experience.
-
Database-Driven Progress
- Your high score and unlocked levels are stored in a local SQLite database (
db/folder) for persistence.
- Your high score and unlocked levels are stored in a local SQLite database (
You control a player spaceship in a top-down view. Survive waves of enemies, shoot them down, and avoid collisions:
- Use your Throttle to control speed, turning to outmaneuver enemy ships.
- Launch bullets to deal continuous damage and keep foes at bay.
- Fire or dodge missiles—they are lethal but have limited fuel.
- Stay alert for EMP blasts that can halt your engines.
- Complete each level by destroying all fighters on-screen.
Objective: Accumulate the highest possible score through efficient kills, minimal damage taken, and level completions.
-
Movement & Steering
- Turn Left:
A - Turn Right:
D - Throttle Up (Increase Speed):
W - (Throttle Down can happen automatically when you release
Wor based on code logic.)
- Turn Left:
-
Actions
- Shoot Bullets:
Spacebar - Turbo Boost:
Left Shift - Slow Motion:
Left CtrlorRight Ctrl
- Shoot Bullets:
-
Pause / Menu
- Pause or Open Game Menu:
Escape - Navigate Menus: Mouse click
- Pause or Open Game Menu:
Your Score updates dynamically based on your performance:
-
Enemy Destruction
- Standard Fighter: +100 points
- EMP Fighter: +100 points, plus an extra +50 bonus
-
Taking Damage
- Hit by Missile: –50 points
- Hit by Enemy Bullets: –10 points
-
Level Completion
- Clearing a level (all fighters and missiles destroyed) grants +500 bonus points.
-
Floating Score & Animation
- Each point gain/loss is briefly displayed near the impact or destroyed entity.
- The current Score is always visible in the top-right HUD.
-
High Score Tracking
- If your total score exceeds the existing high score, it updates automatically in the local SQLite database.
- Compete against your personal best each session!
- Python 3.7 or higher
Ensure Python is installed on your system. You can download it from the official website.
git clone https://github.com/rushi1222/skywars.git
cd SKYWARRIOR-
Navigate to the Project Directory:
cd source
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv # On Linux/Mac: source venv/bin/activate # On Windows (PowerShell): .\venv\Scripts\Activate.ps1
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Game:
python main.py
This command will launch the SkyWars game window. Use the controls outlined above to start playing.
For convenience, a pre-built version of Sky Warrior is available. You can:
-
Download the ZIP from:
dist.zip -
Extract the ZIP to any folder on your system.
-
Locate and run
main.exein the main directory of the extracted folder:- Double-click
main.exeto launch the game—no additional setup required.
- Double-click
(Make sure your system allows executing files from unknown sources. On Windows, you might need to “Allow app to run” when prompted.)
skywarrior/
├── db/ *(SQLite database file)*
├── README.md
├── source/
├── levels.json
├── brain.py
├── bullet.py
├── clouds.py
├── config.py
├── database.py
├── emp.py
├── explosion.py
├── fighter.py
├── font.py
├── levelloader.py
├── main.py
├── menu.py
├── minimap.py
├── missile.py
├── object.py
├── particle.py
├── player.py
├── sound.py
├── spritesheet.py
├── vectors.py
main.py– Core loop: Handles events, updates & draws sprites, checks collisions, and manages game states.brain.py– AI logic: Issues commands to fighters about distancing, slowing down, or turning away.fighter.py&emp.py– Define standard fighters and EMP-firing fighters.missile.py&bullet.py– Movement, collisions, and specialized rendering for projectiles.particle.py– Manages smoke trails, explosion particles, and spark effects.database.py– Stores and updates level progression and high scores in SQLite.levelloader.py– Loads level details (enemy counts, etc.) fromlevels.json.menu.py– UI system for main menus, pause menus, and level selection.minimap.py– Renders a small map in the corner showing positions of entities around the player.clouds.py– Draws large cloud sprites that scroll as the player moves.sound.py– Background music, gunfire, explosion sounds, and slow-motion “tick” effects.config.py– Central place for game constants and parameters (e.g., screen dimensions, speeds, health).object.py/vectors.py– Shared math for vector operations, angles, and movement.
- Clouds: Some clouds (re-edited for color, size, and borders)
- Background: Background (re-edited for color, size, and borders)
- Enemy Ship (Fighter): Space Shooter Assets 2 (re-edited)
- Player (Ship) and Enemy Ship (EMP): Kenney’s Space Shooter Redux (re-edited)
- Bullet, Missiles, Health, and Special Fuel Bar: Custom Photoshop work by the developers.
(Note: All images listed above have been modified for this project in color, size, and/or borders.)
- explosion01: Synthesized Explosion
- explosion: Big Low Frequency Explosion Boom
- shootbullet: Space Shoot Sounds
- bullethit: Retro Sounds 0
- tick1: Tick and Tock
- gametrack: Funny Track with Ringtone Effects (C64 style)
(All sounds are also tweaked as needed to fit the project.)
Contributions are welcome! Whether it's reporting bugs, suggesting features, or submitting pull requests, your input is valuable to improve SkyWars.
-
Fork the Repository
-
Create a New Branch
git checkout -b feature/YourFeatureName
-
Make Your Changes
-
Commit Your Changes
git commit -m "Add your message here" -
Push to Your Fork
git push origin feature/YourFeatureName
-
Create a Pull Request
Provide a clear description of your changes and why they should be merged.
This project is licensed under the MIT License. You are free to use, modify, and distribute this software in compliance with the license terms.
Have questions, ideas, or just want to say hello?
- Email: [email protected]
- GitHub: Rushi1222
Enjoy the thrill of Sky Warrior—and may your aim be true!
“When in doubt, hit the turbo!”