Skip to content

yachuanms/Python-RPG-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Plop Plop Grandpa’s Escape Plan

Python RPG Game Project

This is a 2D RPG-style game developed using Python and Pygame.
The project was created as a course assignment and focuses on simple gameplay mechanics, turn-based combat, and tilemap-based exploration.


📖 Game Overview

In this game, you play as a hero who is summoned to another world.
After leaving the beginner village, you meet a seemingly kind old man who tricks you into exchanging all your treasures for a legendary sword — which turns out to be fake.

Realizing you have been deceived, you decide to begin an adventure to defeat the old man’s guards and reclaim your lost treasures.


🧙 Story Background

You are a hero summoned to another world.
An old man offers you the legendary sword pulled from a stone,
but only in exchange for all your treasures.

After accepting the deal, you discover the truth —
you have been tricked.

To take back your belongings, you embark on a dangerous journey
and face the old man’s followers in battle.


👤 Characters

Each character has unique abilities and attack styles.

  • Old Man – The mastermind behind the deception
  • Hooded Guard – Physical attack-based enemy
  • Wizard – Magic-based enemy
    Character

⚔️ Gameplay Mechanics

  • Tilemap-based map design
  • Player movement using arrow keys
  • Combat is triggered when the player encounters enemies guarding treasures
  • Each character has unique attack skills (physical or magic)

🎮 Controls

  • Arrow Keys – Move the character (Up / Down / Left / Right)
  • Automatic Battle Trigger – Occurs when touching guarded treasure

⚙️ Game Rules

  • After winning a battle:
    • Player attack power increases
    • Enemy health increases in subsequent battles
  • When hit by enemy attacks:
    • Player is knocked backward
    • Player HP decreases
  • The game is won when:
    • All enemies are defeated
    • All treasures are recovered

🧩 Technical Implementation

🛠 Libraries Used

  • Pygame – Game loop, rendering, and event handling
  • Pytmx – Tilemap (TMX) map loading
  • Random – Randomized elements in combat and gameplay

🗂 Program Structure

  • Main Program

    • Game loop
    • Event handling
    • Scene transitions
  • Object Modules

    • Player
    • Enemies
    • Attacks
    • Map objects
  • Combat System

    • Turn-based combat logic
    • Damage calculation
    • Knockback effects

🖼️ Game Demo (Screenshots)

Game_Scene Fight_Scene


🏁 Winning Condition

  • Defeat all enemies guarding the treasures
  • Successfully retrieve all stolen items
    Win_Scene Lose_Scene

🎯 Motivation

This project was created to:

  • Practice Python game development
  • Learn Pygame fundamentals
  • Build a simple RPG game for stress relief and entertainment

👩‍💻 Authors

  • Ya-Chuan Hsu
  • Wen-Zhen Lin

📌 Notes

This project demonstrates:

  • Basic RPG mechanics
  • Tilemap integration
  • Object-oriented design
  • Simple combat system using Python

About

2D RPG game built with Python and Pygame featuring tilemap exploration and turn-based combat.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages