Features
- Full Pinball Gameplay: Authentic Space Cadet pinball
- Keyboard Controls: Flipper controls and ball launch
- Score Tracking: Points and high scores
- Missions: Complete missions for bonus points
- Sound Effects: Original pinball sounds
- Device Detection: Blocks on mobile and small screens
Component Structure
Location:src/WinXP/apps/Pinball/index.jsx
Configuration
Fromapps/index.jsx:
Device Detection
Pinball blocks on mobile devices and screens smaller than 600x470:Detection Functions
Keyboard Controls
- Z: Left flipper
- /: Right flipper
- Space: Launch ball
- X: Nudge left
- Period (.): Nudge right
- Up Arrow: Nudge up
- F2: New game
- F3: Pause
- F4: Options
- F8: Demo mode
Focus Overlay
To prevent the iframe from capturing all input when the window is not focused:- Clicking on the window to focus it
- Dragging the window when not focused
- Resizing (though pinball is not resizable)
Styling
Game Features
Missions
Space Cadet includes various missions:- Science Missions: Complete scientific objectives
- Cadet Missions: Training exercises
- Training Missions: Basic skill challenges
- Special Missions: Bonus missions for high scores
Scoring Elements
- Bumpers: 500-1000 points
- Launch Ramp: Variable points based on speed
- Target Lanes: 1000-5000 points
- Spinners: 100 points per spin
- Bonus Multipliers: 2x, 3x, 5x, 10x
- Extra Balls: Awarded for high scores
Special Features
- Hyperspace: Teleport ball to different location
- Multiball: Multiple balls in play
- Jackpot: High-value targets
- Fuel Lights: Complete to activate features
- Mission Targets: Hit specific targets for missions
98.js.org Integration
The game is hosted on 98.js.org, which provides:- WebAssembly-compiled pinball engine
- Accurate physics simulation
- Original graphics and sounds
- Saved high scores (in browser storage)
Limitations
- Internet Required: Loads from external URL
- No Customization: Cannot modify game settings from Web XP
- Single Instance: Only one pinball game at a time
- Not Resizable: Fixed window size for optimal gameplay
- Desktop Only: Requires keyboard controls
Error Handling
If the game fails to load:Usage Example
Performance
- Game runs in separate iframe context
- WebAssembly provides near-native performance
- No impact on main Web XP thread
- Memory managed by browser iframe isolation
Accessibility
- Keyboard-only controls (no mouse required)
- High contrast ball and table elements
- Audio cues for game events
- Clear visual feedback for hits and targets
Alternative Hosting
To host the game locally:- Download the pinball files from 98.js.org
- Host them on your server
- Update the iframe source:
- Offline gameplay
- Faster loading
- No external dependencies
- Full control over game files
