GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Joji0/Pokemon-Prolog: Text-based Pokémon RPG and battle simulator built in GNU Prolog with rule-based logic and backtracking AI.

BranchesTags
Open more actions menu

Latest commit

 

History

148 Commits
148 Commits

Folders and files

NameName
Last commit message
Last commit date
doc
doc
 
 
image
image
 
 
src
src
 
 
.DS_Store
.DS_Store
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Pokemon Prolog RPG

Prolog Paradigm Course

A turn-based Pokémon RPG simulation engine implemented entirely in GNU Prolog. Features open-world grid navigation, dynamic wild Pokémon encounters, a full combat system with elemental type effectiveness, inventory and party management, sidequests, and an endgame boss encounter.

Developed for the IF1221 Computational Logic coursework at Bandung Institute of Technology (ITB).

Pokemon Banner

Features

  • Grid-Based World Exploration

    • 2D grid world coordinate system with boundary checking and obstacle detection.
    • Directional movement with single-key shortcuts (w, a, s, d).
    • Interactive map locations including wild grass zones and PokeCenters for healing party members.
  • Turn-Based Battle Engine

    • Four core combat actions: Standard Attack, Defend, Elemental Skills, and Item/Potion usage.
    • Elemental type effectiveness chart (Fire, Water, Grass, Electric, etc.) applied dynamically via pattern matching.
    • Skill cooldown management and level-gated skill unlocks (e.g. secondary skill unlocked at Level 5).
    • Damage calculation engine incorporating base attack, target defense, elemental multipliers, and critical hit probability.
    • Opponent AI with randomized tactical action selection.
  • Capture & Party Management

    • Wild encounters across Common, Rare, and Legendary tiers.
    • Capture mechanic calculating catch rates based on remaining target HP.
    • Party management system supporting active roster organization, swapping, and stat scaling.
  • Inventory & Item Management

    • Dynamic inventory storage managing Pokéballs, Potions, Super Potions, and Hyper Potions.
    • Post-battle item drops and loot tables.
  • Sidequests & Endgame Boss

    • Interactive NPC dialogues and trivia mini-games.
    • Challenging final boss battle with unique action phases and custom ending screen sequence.
  • ASCII Art Sprites

    • Custom ASCII art sprite renderings for Pokémon species, bosses, and game logos.

Project Structure

Pokemon-Prolog/
├── doc/                             # Course documentation and milestones
├── image/                           # Visual assets and logo
├── src/
│   ├── main.pl                      # Primary game driver and module loader
│   └── modules/
│       ├── bag/                     # Inventory, potions, and item drops
│       │   ├── bag.pl
│       │   ├── itemdrop.pl
│       │   └── usepotions.pl
│       ├── battle/                  # Combat engine, damage formulas, actions
│       │   ├── actions.pl
│       │   ├── battle.pl
│       │   ├── crit.pl
│       │   ├── postbattle.pl
│       │   └── prebattle.pl
│       ├── endgame/                 # Boss battle mechanics and end screen
│       │   ├── bossactions.pl
│       │   ├── bossbattle.pl
│       │   ├── bossprebattle.pl
│       │   └── endscreen.pl
│       ├── init/                    # Game initialization and state reset
│       │   ├── init.pl
│       │   └── reset.pl
│       ├── interact/                # NPC interaction dialogues
│       │   └── interact.pl
│       ├── map/                     # Grid map, movement, wild spawns, Pokecenter
│       │   ├── initmap.pl
│       │   ├── move.pl
│       │   ├── movementshortcuts.pl
│       │   ├── pokecenter.pl
│       │   ├── showmap.pl
│       │   ├── turn.pl
│       │   └── wildpokemon.pl
│       ├── party/                   # Party roster and active Pokémon status
│       │   ├── setparty.pl
│       │   └── showparty.pl
│       ├── sidequest/               # Mini-games and trivia quiz
│       │   └── quiz.pl
│       ├── utils/                   # List helpers and utility predicates
│       │   ├── list.pl
│       │   └── misc.pl
│       ├── facts.pl                 # Species database, types, and stats
│       ├── formulas.pl              # Mathematical formulas (damage, EXP)
│       └── sprites.pl               # ASCII art renderings
└── README.md

Requirements

  • GNU Prolog (gprolog): Version 1.4.5 or higher

Installation

macOS

Install via Homebrew:

brew install gnu-prolog
Linux (Ubuntu/Debian)

Install via apt:

sudo apt update
sudo apt install gprolog -y
Windows

Download the installer from the official GNU Prolog Website and ensure gprolog is added to your system PATH.

Getting Started

  1. Clone the repository:

    git clone https://github.com/Joji0/Pokemon-Prolog.git
    cd Pokemon-Prolog
  2. Launch GNU Prolog in the source directory:

    cd src
    gprolog
  3. Consult the driver file:

    | ?- ['main.pl'].
  4. Start the game:

    | ?- start.

Controls & Gameplay Reference

Command Action
start. Initialize a new game, register player name, and choose starter Pokémon
w. / a. / s. / d. Move Up / Left / Down / Right on the world map
map. Display current world map and player coordinates
status. View active Pokémon stats, health, and current level
party. View party roster and reserve Pokémon
bag. Inspect bag inventory and potion counts
heal. Heal all party Pokémon (available at the PokeCenter)
interact. Interact with nearby NPCs or world objects
help. View the in-game command reference

Contributors

  • Philipp Hamara - 13524101
  • Muhammad Aufar Rizqi Kusuma - 13524061
  • Kevin Wirya Valerian - 13524019
  • Jonathan Kris Wicaksono - 13524023

About

Text-based Pokémon RPG and battle simulator built in GNU Prolog with rule-based logic and backtracking AI.

Topics

aigame-developmentgnu-prologlogic-programmingpokemonprolog

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.