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?
- 🎮 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
mathandarraylibraries (no external WAV/MP3 files required).
- Dynamically synthesizes 8-bit sound effects (Jump, Death, Bounce, Crumble, Click, Victory, Dash, Coin) using Python's standard
- ⏱️ 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 (
ESCorP) with options to restart, toggle audio, or quit. - Instant retry hotkey (
R) for seamless speedrunning retries.
- In-game Pause overlay (
- 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, orZto 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.
| 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 |
— |
The easiest way to play the game is to download the standalone executable. You do not need Python or any other dependencies installed!
- Go to the Releases page on the right sidebar of this repository.
- Download the
TryNotToDie.exefile from the latest release. - Double-click the downloaded
.exefile to play instantly!
If you prefer to run the game from source, ensure you have Python 3.x and Pygame installed.
git clone https://github.com/your-username/TryNotToDie.git
cd TryNotToDiepip install pygameRun the game using Python:
py TryNotToDie.py- 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).
- Navigate Levels: Reach the glowing green portal at the end of each level. Watch out for sudden trap triggers!
- Learn and Adapt: Success requires memorization and quick reflexes!
- 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.
This project is licensed under the MIT License - see the LICENSE file for details.