Go to file
dilgenfritz f250d015b8 fix: Prevent multiple audio streams and overlapping audio
CRITICAL AUDIO FIXES:

1. DUPLICATE AUDIO PREVENTION:
 Fixed skipTask() triggering both 'mocking' + 'denial' punishment audio
 Added skipAudioPlayed flag to prevent consequence audio when skip audio is playing
 Modified displayCurrentTask() to check flag before playing consequence audio

2. AUDIO OVERLAP ELIMINATION:
 Made audio stopping in playAudio() synchronous instead of calling stopCategory()
 Forcibly stop existing audio immediately: pause() + currentTime=0 + src=''
 Enhanced stopAllImmediate() to use same aggressive stopping method
 Removed fadeOut delays in completeTask() and skipTask() (now immediate stop)

3. TIMING IMPROVEMENTS:
 completeTask() now stops audio immediately (0ms) before playing reward audio
 skipTask() stops task audio immediately (0ms) before punishment audio
 Added 100ms delay before reward audio to ensure previous audio fully stopped

4. TECHNICAL DETAILS:
- Audio elements now get src='' to fully release resources
- Synchronous audio stopping prevents race conditions
- Clear fade timeouts to prevent delayed audio operations
- Aggressive stopping in both individual playAudio() and global stopAllImmediate()

EXPECTED RESULT:
- Only ONE audio stream plays at a time
- No overlapping punishment/task/reward audio
- Clean audio transitions without interruption errors
- Proper audio stopping when games end
2025-10-28 08:12:16 -05:00
audio Restore original game modes and fix missing scenario steps - Added back Timed Challenge and Score Target modes alongside scenario modes - Updated gameModeManager to map new mode names to original engine functionality - Removed interactive tasks from standard/timed/scored modes as requested - Fixed missing scenario continuation steps (slutty_continuation, photo_series_continuation) - Added complete branching paths for dress-up photo scenarios - All 7 game modes now working: Standard, Timed, Scored, and 4 scenario modes - Maintained periodic popup system across all modes - Preserved original time/score configuration UI 2025-10-27 11:51:38 -05:00
images Fix game freeze with no images loaded 2025-09-25 21:03:12 -05:00
scripts feat: Modularize scenario system and fix game mode configuration 2025-10-28 06:41:01 -05:00
src fix: Prevent multiple audio streams and overlapping audio 2025-10-28 08:12:16 -05:00
.gitignore Final interface cleanup and improvements 2025-09-25 20:28:48 -05:00
README-DESKTOP.md rebrand: Transform to 'Edge & Punishment' - The Ultimate Edging Challenge 2025-09-28 22:19:25 -05:00
README.md rebrand: Transform to 'Edge & Punishment' - The Ultimate Edging Challenge 2025-09-28 22:19:25 -05:00
Start-webgame.bat Restore original game modes and fix missing scenario steps - Added back Timed Challenge and Score Target modes alongside scenario modes - Updated gameModeManager to map new mode names to original engine functionality - Removed interactive tasks from standard/timed/scored modes as requested - Fixed missing scenario continuation steps (slutty_continuation, photo_series_continuation) - Added complete branching paths for dress-up photo scenarios - All 7 game modes now working: Standard, Timed, Scored, and 4 scenario modes - Maintained periodic popup system across all modes - Preserved original time/score configuration UI 2025-10-27 11:51:38 -05:00
index.html feat: Add comprehensive photo gallery and management system 2025-10-28 07:49:55 -05:00
package-lock.json Integrate desktop file manager with UI 2025-09-25 20:11:10 -05:00
package.json Refactor file structure with feature-based organization 2025-10-27 14:46:30 -05:00
setup.bat Refactor to desktop application with Electron 2025-09-25 20:07:45 -05:00
setup.sh Refactor to desktop application with Electron 2025-09-25 20:07:45 -05:00
webGame.code-workspace feat: Add dynamic aspect ratio sizing to punishment popups 2025-09-28 21:53:58 -05:00

README.md

Edge & Punishment

How long can you last?

An edging challenge game where skipping tasks floods your screen with consequences. Test your willpower against an unforgiving system that punishes procrastination with visual torment.

Features

🔥 Core Gameplay

  • Edging Challenge System: Push your limits with timed endurance tasks
  • Punishment Protocol: Skip tasks and face flooding consequence popups
  • Dynamic Consequences: 1-40 popup images that can't be closed, sized to image ratios
  • Smart Timing: Adaptive delays and duration controls for maximum impact
  • Willpower Training: Progressive difficulty that builds self-control

💥 Punishment Features

  • Popup Image Flood: Overwhelm your screen with consequence images
  • Aspect Ratio Sizing: Each popup perfectly sized to its image proportions
  • Configurable Torment: Control count (1-40), duration, positioning, and effects
  • Unclosable Design: Popups can't be dismissed - you must endure the timer
  • Visual Annoyance System: Blur backgrounds, fade animations, countdown timers

🎯 Annoyance Management

  • Flash Message System: Encouraging/taunting messages during gameplay
  • Message Customization: 20+ default messages across 4 categories
  • Advanced Scheduling: Frequency controls, event triggers, interval timing
  • Import/Export: Share message collections and settings

🎨 Customization

  • Theme System: Multiple visual themes (midnight, ocean, forest, etc.)
  • Background Music: 4 music tracks with loop/shuffle controls
  • Volume Control: Adjustable audio settings
  • NSFW Image Management: Upload and manage custom task/consequence images
  • Size Controls: Configure popup dimensions and viewport usage
  • Positioning Options: Random, cascade, grid, or centered popup layouts

🖼️ Advanced Image System

  • Categorized Images: Separate adult task and consequence image pools
  • High-Quality Processing: 1600x1200 resolution with 95% JPEG quality
  • Smart Compression: Automatic resizing for optimal storage
  • Batch Operations: Upload multiple images, select/delete in bulk
  • Storage Management: 50 image limit with quota monitoring
  • Format Support: JPG, PNG, WebP image formats up to 20MB

🛠️ Technical Features

  • Local Storage: All data stored locally in browser
  • Responsive Design: Works on desktop and mobile
  • Cross-Browser Compatible: Modern browser support
  • No Backend Required: Pure client-side application

Getting Started

Quick Start

  1. Open index.html in a modern web browser
  2. Choose your theme and begin the challenge
  3. Upload custom adult images through the Image Management screen
  4. Configure punishment settings in Annoyance Management

For Electron App

# Install dependencies
npm install

# Run the application
npm start

Local Development

# Clone the repository
git clone [repository-url]
cd webGame

# Serve locally (recommended)
python -m http.server 8000
# OR
npx serve .

# Open browser to http://localhost:8000

File Structure

webGame/
├── index.html                  # Main game interface
├── game.js                    # Core game logic and punishment system
├── gameData.js               # Game data and configuration
├── flashMessageManager.js   # Flash message system
├── popupImageManager.js     # Punishment popup system
├── styles.css               # All styling and themes
├── main.js                  # Electron main process
├── preload.js              # Electron preload script
├── package.json            # App configuration and dependencies
├── images/
│   ├── tasks/              # Default adult task images
│   ├── consequences/       # Default consequence images
│   └── cached/             # User-uploaded processed images
├── audio/                  # Background music files
└── README.md              # This file

Image Management

Upload Process

  1. Navigate to Image Management screen
  2. Switch between "Task Images" and "Consequence Images" tabs
  3. Click "Upload Images" to select files
  4. Images are automatically processed and optimized

Storage System

  • Quality: High-quality compression (1600x1200, 95% JPEG quality)
  • Limits: 50 total images to prevent storage issues
  • Categories: Separate pools for tasks vs consequences
  • Formats: Supports JPG, PNG, WebP up to 20MB each

Management Features

  • Enable/Disable: Control which images appear in game
  • Bulk Operations: Select all, delete multiple images
  • Storage Info: Monitor usage and get cleanup suggestions

Game Controls

Mouse Controls

  • Click buttons for all game actions
  • Navigate punishment/annoyance management screens
  • Configure popup settings and test functionality

Keyboard Shortcuts

  • Enter: Complete current task
  • Ctrl: Skip current task (triggers punishment)
  • Shift+Ctrl: Mercy skip (if available)
  • Space/P: Pause/resume challenge
  • M: Toggle background music
  • H: Show help
  • Escape: Close dialogs/go back

Punishment System

Popup Configuration

  • Count: 1-40 images (fixed, random 1-10, or custom range)
  • Duration: 3-30 seconds (fixed, random 5-15s, or custom range)
  • Positioning: Random, cascade, grid, or centered layouts
  • Size: Auto-sized to image aspect ratios with configurable limits
  • Effects: Fade animations, background blur, countdown timers

Visual Impact

  • Unclosable: Popups cannot be dismissed manually
  • Screen Flooding: Up to 40 consequence images simultaneously
  • Perfect Sizing: Each popup sized to match its image proportions
  • Smart Spacing: Collision detection prevents visual chaos

Development History

Recent Updates (v1.4)

  • Implemented categorized image system (Task/Consequence separation)
  • Enhanced image processing with higher quality compression
  • Added storage quota management and limits
  • Fixed tab switching and individual image selection
  • Improved error handling and user feedback
  • Added batch upload and management features

Technical Architecture

  • DataManager Class: Centralized localStorage management
  • TaskChallengeGame Class: Main game logic and state management
  • Image Processing: Canvas-based compression and optimization
  • Event System: Comprehensive keyboard and mouse event handling
  • Theme System: CSS-based visual customization

Browser Compatibility

  • Chrome/Chromium (recommended)
  • Firefox
  • Safari
  • Edge
  • ⚠️ IE11+ (limited support)

Contributing

Development Setup

  1. Clone repository
  2. Use local server for testing (file:// protocol has limitations)
  3. Test across different browsers
  4. Follow existing code structure and commenting style

Code Organization

  • game.js: Main game logic, image management, data persistence
  • styles.css: All styling including themes and responsive design
  • index.html: Clean semantic HTML structure

Version History

  • v1.0: Initial implementation with basic game mechanics
  • v1.1: Added theme system and music controls
  • v1.2: Implemented image upload and management
  • v1.3: Enhanced image processing and categorization
  • v1.4: Added storage management and quota limits (current)

License

[Add your preferred license here]