Deterioration & Restoration (a.k.a. “Can You Reverse Time?”) is a 2D simulation game that challenges you to heal a user‐generated world before it collapses into a fully apocalyptic state. Built in Python with cmu_graphics, Pillow, and NumPy, the project emphasizes procedural texture manipulation and dynamic terrain deterioration.
Github Repository
Key Features
- User‐Generated Terrain
- Start by “drawing” your own map in an editor reminiscent of Photoshop.
- White regions become elevated terrain; black regions become water.
- Quick brush tools and contrast adjustments let you shape a unique world before entering the game.
- Deterioration & Restoration
- Textures degrade over time, introducing visible wear and tear on land and foliage.
- Control a character with special healing abilities to reverse or slow the decay.
- Collect power‐ups and inventory items that boost your healing radius or allow instantaneous bursts of restoration.
- Multiple Game Modes
- Timed Mode: Survive until the countdown expires without letting overall deterioration exceed 80%.
- Infinite Mode: Face continuous global deterioration with no countdown. Sustain your environment as long as possible, then end the game when you’re ready.
- Real‐Time Feedback
- Visual cues show deterioration in real time, from subtle texture fading to severe breakdown.
- A final results screen reveals how your world changed over time and charts your character’s growth in healing power.
- Easy to Run & Expand
- Simple Python 3.6+ codebase with clear dependencies (
cmu_graphics
,Pillow
,NumPy
). - Organized file structure (
main.py
,game.py
,menu.py
, and anassets
folder for textures) for easy customization. - Debug keys and commands allow on‐the‐fly testing of terrain, zoom, and texture states.


Game Assets
- Equipment Icon
- Character Sprite
- Textures (Samples of Original and Deteriorated Pairs)
Technical Highlights
- Procedural Texture Deterioration Implemented via Pillow image enhancements (contrast, brightness, color adjustments), plus Gaussian blur for water effects.
- NumPy‐Based Editing Efficient brush masking and terrain upscaling with NumPy arrays, ensuring smooth real‐time drawing and quick texture generation.
- Grid‐Based Movement & Collision Character movement is restricted by highly deteriorated cells, creating strategic challenges in navigating the environment.
- Data Visualization End‐game charts display how quickly the terrain deteriorated vs. how fast the player’s abilities grew.
Inspirations
- Don’t Starve, RimWorld, and Hyper Light Drifter for 2D aesthetic, procedural terrain ideas, and survival elements.
- The concept of “time reversal” through healing is inspired by games that fuse resource management with real‐time crisis mitigation.
Deterioration & Restoration shows how iterative texture manipulation, user‐generated terrain, and survival mechanics can combine into a compelling 2D experience. The balance between decay and healing—along with two distinct game modes—adds replayability, while the real‐time data visualizations make each session feel unique.