Skip to content

Auto-generating 2D platformer inspired by Jump King and Celest with built-in AI training.

Notifications You must be signed in to change notification settings

eshwar-18/Infinite_Platformer

Repository files navigation

INFINITE PLATFORMER (WITH AI)

This project is a 2D momentum-based vertical platformer inspired by Jump King and Celeste, built using Python and Pygame. The game features infinite, auto-generated platforms, a camera that follows the player, and a score based on the player’s current height above the ground.

The project also includes an AI powered by TensorFlow (Deep Q-Learning). The AI learns to control the player by maximizing height. If the AI jumps from a position and fails to land on a platform, it remembers that location and avoids retrying jumps from the same area.

The game supports two modes:

PLAY: Human-controlled gameplay using the keyboard

TRAIN AI: The AI controls the player and learns through reinforcement learning

REQUIREMENTS

You need Python 3.9 or newer.

Install dependencies with:

pip install pygame tensorflow numpy

HOW TO RUN

From the project directory, run:

python jump_king_ai.py

When the game starts, a menu will appear:

Select PLAY to control the character yourself

Select TRAIN AI to let the AI train and play automatically

Use the arrow keys or W/S to navigate the menu and press Enter to select.

CONTROLS (PLAY MODE)

A / Left Arrow – Move left
D / Right Arrow – Move right
Space or Z – Jump
X or Left Shift – Dash
Esc – Quit

About

Auto-generating 2D platformer inspired by Jump King and Celest with built-in AI training.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages