Projeler

Güncellendi: Eyl 2026

Ninja Platform Game

Python ve Pygame ile geliştirilmiş piksel sanatlı 2D platform oyunu: altı bölüm, duvar zıplama ve dash mekaniği, ateş eden düşmanlar ve dahili bölüm editörü.

🥷 Ninja Platform Game

A pixel-art 2D platformer built with Python and Pygame. Run, wall-jump and dash through six hand-built levels, taking out every gun-wielding enemy to reach the next stage.

Ninja running across a floating island, dashing through an enemy and moving to the next level

✨ Features

  • Six levels loaded from JSON tile maps, with a circular transition between stages and a finish screen at the end
  • Fluid movement: running, jumping, wall sliding, wall jumps and a dash that also works as your attack
  • Enemies that fight back: they patrol their platforms and shoot when you are on the same height
  • Game feel: screen shake, spark and particle effects, falling cherry blossom petals, parallax clouds and sprite outlines
  • Sound: background music, ambience and sound effects for jumping, dashing, shooting and hits
  • Main menu, tutorial and pause screens
  • Built-in level editor (editor.py) with auto-tiling, on/off-grid placement and JSON save

🎮 Controls

KeyAction
← →Move
↑Jump (press against a wall to wall-jump)
XDash, which defeats any enemy you hit
PPause / resume
EscClose the tutorial screen

Clear every enemy on a level to advance. Getting shot or falling for too long restarts the current level.

🚀 Getting Started

Requirements: Python 3.8+ and Pygame 2.

git clone https://github.com/ibrahimyankac/Ninja-Platform-Game.git
cd Ninja-Platform-Game
pip install pygame
cd ninja_game
python game.py

Run the game from inside the ninja_game folder. Assets are loaded with relative paths such as data/images/....

🖼️ Screenshots

Main menu with Start and Exit buttonsPlayer jumping over the first island
Dash particles next to an enemy on a stone pillarPlayer jumping between floating platforms in the last level

🛠️ Level Editor

cd ninja_game
python editor.py
InputAction
W A S DMove the camera
Left clickPlace a tile
Right clickRemove a tile
Mouse wheelChange tile group
Shift + mouse wheelChange tile variant
GToggle grid / free placement
TAuto-tile the map
OSave to map.json

To use an edited map as a level, copy map.json into data/maps/ with the next level number (for example 6.json).

📁 Project Structure

ninja_game/
├─ game.py          # Game loop, menu, tutorial, pause and finish screens
├─ editor.py        # Tile-based level editor
├─ main_menu.py     # Reusable image button
├─ scripts/
│  ├─ entities.py   # Physics, player (jump, wall slide, dash) and enemy AI
│  ├─ tilemap.py    # Tile map loading, saving, collisions and auto-tiling
│  ├─ particle.py   # Particle animations
│  ├─ spark.py      # Spark effects
│  ├─ clouds.py     # Parallax clouds
│  └─ utils.py      # Image loading and animation helpers
└─ data/
   ├─ maps/         # Levels 0–5 as JSON
   ├─ images/       # Sprites, tiles and UI
   └─ sfx/          # Sound effects

🙏 Credits

The core engine and pixel-art assets follow DaFluffyPotato's Pygame platformer tutorial. For this version the whole game was recolored with a cherry blossom theme: the player, enemies, tiles, trees, sky and menu buttons.

Diğer projeler