Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Try Not To Die 🎮

License: MIT Python 3.x Pygame 2.x Levels

Try Not To Die is a punishing, rage-inducing 2D troll platformer built in Python using Pygame. Inspired by classic trial-and-error games like I Wanna Be The Guy and Cat Mario, this game challenges your memory, reflexes, and patience with hidden traps, fake platforms, falling hazards, gravity bounce pads, moving elevators, ice sliding, ceiling gravity flips, and deceptive goals.

Can you survive all 8 levels, or will you succumb to the devious level design?


🚀 Features

  • 🎮 8 Unique Hand-Crafted Levels:
    • Level 1 (Leap of Faith): Intro to spike traps, fake spikes, drop blocks, and teleporting goals.
    • Level 2 (Trust Issues): Invisible blocks and gap jumps.
    • Level 3 (Bullet Hell): Multi-turret timing puzzles with cover structures.
    • Level 4 (Watch Your Step): Moving elevators, crumbling bridges, and spring bounce pads near hidden ceiling traps.
    • Level 5 (The Mimic Trap): Gauntlet featuring a Mimic Goal and a secret path to the true exit.
    • Level 6 (Slippery Slopes): Ice platform physics with low friction sliding over spike pits.
    • Level 7 (Gravity Shift): Inverted ceiling platforming with purple gravity flip portals.
    • Level 8 (The Grand Finale): The ultimate trial combining ice sliding, upside-down crumbling bridges, turrets, and mimic goal traps.
  • ✨ Dynamic Aesthetics & "Game Juice":
    • Squish & Stretch Physics: Expressive player deformation during jumps and landings.
    • Animated Player Face: Pupils that look in the direction of movement and blink periodically.
    • Animated Goal Portal: Rotating concentric glowing portal rings with pulsing cores.
    • Particle Systems: Physical death debris shattering, movement trails, and ambient floating background dust.
    • Screen Shake & Level Title Cards: Dynamic translational screen shakes on impacts and slide-in level headers.
  • 🔊 Procedural Retro SFX Synthesis:
    • Dynamically synthesizes 8-bit sound effects (Jump, Death, Bounce, Crumble, Click, Victory, Dash, Coin) using Python's standard math and array libraries (no external WAV/MP3 files required).
  • ⏱️ Speedrun Timer & Save System:
    • Millisecond-accurate stopwatch tracking level times and total run time.
    • Local data persistence (save_data.json) storing best level records, overall best time, total coins collected, and lifetime death counters.
  • 🪙 Collectible Coins:
    • Explore and collect hidden coins scattered across all 8 levels for an extra challenge.
  • ⏸️ Pause Menu & Quick-Restart:
    • In-game Pause overlay (ESC or P) with options to restart, toggle audio, or quit.
    • Instant retry hotkey (R) for seamless speedrunning retries.

🛠️ Recent Updates (v1.2 Patch)

  • Pop-Up Troll Spikes: Spikes now wait hidden beneath the ground and launch upwards to skewer the player upon detection!
  • Air Dash Mechanic: You can now press LSHIFT, RSHIFT, or Z to perform a high-speed dash (ground or mid-air) to dodge spikes or cross wide gaps.
  • Collectible Coins: Added glowing, animated coins to every level. Your total collected coins are tracked in the top HUD and saved permanently!
  • Smooth Screen Transitions: The jarring instant-level-resets have been replaced with a stylish circular fade-in/fade-out transition.
  • Cleaned up Visuals: Removed the excessive glow effects to improve visual clarity while preserving the polished dynamic animations.

🎮 Controls

Action Primary Key Secondary Key
Move Left A Left Arrow
Move Right D Right Arrow
Jump W Space / Up Arrow
Dash LSHIFT / RSHIFT Z
Quick Restart Level R
Pause / Resume ESC P
Toggle Sound (SFX) M

🎮 Quick Play (No Installation Required)

The easiest way to play the game is to download the standalone executable. You do not need Python or any other dependencies installed!

  1. Go to the Releases page on the right sidebar of this repository.
  2. Download the TryNotToDie.exe file from the latest release.
  3. Double-click the downloaded .exe file to play instantly!

🛠️ Running from Source (For Developers)

If you prefer to run the game from source, ensure you have Python 3.x and Pygame installed.

1. Clone the Repository

git clone https://github.com/your-username/TryNotToDie.git
cd TryNotToDie

2. Install Dependencies

pip install pygame

🎮 How to Play

Run the game using Python:

py TryNotToDie.py
  1. Select Difficulty: In the main menu, walk your player (the blue square) into the Easy (5 Lives) room (green) or Hard (1 Life) room (orange).
  2. Navigate Levels: Reach the glowing green portal at the end of each level. Watch out for sudden trap triggers!
  3. Learn and Adapt: Success requires memorization and quick reflexes!

📁 Project Structure

  • TryNotToDie.py - Core game engine containing physics, 8 level layouts, hazard mechanics, SFX synthesis, and render pipeline.
  • save_data.json - Persistent JSON storage for best times and death counts.
  • README.md - Documentation overview.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A punishing, rage-inducing 2D troll platformer built with Python and Pygame.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages