Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 UpperWale

A 2D side-scrolling platformer game built with Python and Pygame, featuring tile-based levels, enemy AI, projectile combat, particle effects, and a built-in level editor.


✨ Features

  • Platformer Mechanics — Run, jump, wall-slide, and dash through hand-crafted levels
  • Combat System — Enemies patrol and shoot projectiles; dodge or defeat them to survive
  • Particle & Spark Effects — Leaf particles, hit sparks, and dash trails bring the world to life
  • Multiple Levels — 3 progressively challenging maps (with support for more)
  • Level Editor — Design your own levels with the included tile-based map editor
  • Sound & Music — Ambient sounds, jump/dash/hit/shoot SFX, and background music
  • Screen Shake — Dynamic camera shake on impacts for satisfying game-feel
  • Cloud Parallax — Scrolling cloud layers add depth to the background

📸 Screenshots

Add your gameplay screenshots here!


🛠️ Tech Stack

Technology Purpose
Python 3 Core language
Pygame Game engine / rendering
JSON Level/map data storage

📂 Project Structure

first-game/
├── game.py              # Main game entry point (Adventure class)
├── editor.py            # Built-in tile map editor
├── game.spec            # PyInstaller build spec
├── music.wav            # Background music
│
├── scripts/             # Game engine modules
│   ├── entities.py      #   Player, Enemy & PhysicsEntity classes
│   ├── tilemap.py       #   Tile map loading, rendering & physics
│   ├── cloud.py         #   Parallax cloud system
│   ├── particle.py      #   Particle effects
│   ├── spark.py         #   Spark/flash effects
│   └── utils.py         #   Image loading & Animation helpers
│
├── maps/                # Level data (JSON)
│   ├── 0.json           #   Level 0
│   ├── 1.json           #   Level 1
│   └── 2.json           #   Level 2
│
├── Surface_data/        # Tile & sprite assets (PNG)
│   ├── PNG/             #   Sprite sheets & individual tiles
│   └── License.txt      #   Asset license
│
├── sfx/                 # Sound effects
│   ├── ambience.wav
│   ├── jump.wav
│   ├── dash.wav
│   ├── hit.wav
│   └── shoot.wav
│
├── build/               # PyInstaller build output
└── dist/                # Distributable executable

🚀 Getting Started

Prerequisites

  • Python 3.7+
  • Pygame

Installation

  1. Clone the repository

    git clone https://github.com/devkumar2313/first-game.git
    cd first-game
  2. Install dependencies

    pip install pygame
  3. Run the game

    python game.py
  4. Run the level editor (optional)

    python editor.py

🎮 Controls

Game

Key Action
/ (Arrow Keys) Move left / right
(Arrow Key) Jump
X Dash

Level Editor

Key / Input Action
A / D Scroll left / right
W / S Scroll up / down
Left Click Place tile
Right Click Remove tile
Shift + Click Place off-grid tile
Scroll Wheel Change tile variant
T Save map
G Toggle grid mode

🏗️ Building an Executable

A game.spec file is included for PyInstaller:

pip install pyinstaller
pyinstaller game.spec

The executable will be generated in the dist/ folder.


🗺️ Creating Custom Levels

  1. Launch the editor: python editor.py
  2. Use the controls above to place grass, trees, bushes, and enemy spawners
  3. Press T to save your map as a JSON file in the maps/ directory
  4. Update the level count in game.py to include your new map

🧩 Game Architecture

Adventure (game.py)
├── Player          ← controlled by keyboard input
├── Enemy[]         ← AI-driven patrol & shooting
├── Tilemap         ← collision & rendering from JSON maps
├── Clouds          ← parallax background decoration
├── Particles[]     ← leaf & hit particle effects
├── Sparks[]        ← projectile impact flashes
└── Projectiles[]   ← enemy-fired bullets

Key systems:

  • Physics — Gravity, velocity, tile-based collision detection
  • Animation — Frame-based sprite animation with configurable duration
  • Camera — Smooth follow with screen-shake support
  • Level Loading — JSON-based tilemaps with spawner entities

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/awesome-feature)
  3. Commit your changes (git commit -m 'Add awesome feature')
  4. Push to the branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

📄 License

This project's code is open source. Game assets in Surface_data/ are subject to their own license.


👤 Author

devkumar2313GitHub Profile


Made with ❤️ and Pygame

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages