Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>💥 MeeSeeks Chaos Simulator 💥</title>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.22.5/babel.min.js"></script>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: 'Arial', sans-serif;
- overflow-x: hidden;
- }
- .gradient-bg {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #14b8a6 100%);
- min-height: 100vh;
- padding: 1rem;
- }
- .container {
- max-width: 1200px;
- margin: 0 auto;
- }
- .header {
- text-align: center;
- margin-bottom: 2rem;
- }
- .title {
- font-size: 2.5rem;
- font-weight: bold;
- color: white;
- margin-bottom: 1rem;
- text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
- }
- .stats {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 2rem;
- color: white;
- font-size: 1.25rem;
- }
- .stat-item {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- }
- .controls {
- text-align: center;
- margin-bottom: 2rem;
- }
- .btn {
- background: #10b981;
- color: white;
- font-size: 1.25rem;
- padding: 1rem 2rem;
- border: none;
- border-radius: 2rem;
- font-weight: bold;
- cursor: pointer;
- transition: all 0.2s;
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
- }
- .btn:hover {
- background: #059669;
- transform: scale(1.05);
- }
- .btn-blue {
- background: #3b82f6;
- }
- .btn-blue:hover {
- background: #2563eb;
- }
- .btn-pulse {
- animation: pulse 2s infinite;
- }
- @keyframes pulse {
- 0%, 100% { opacity: 1; }
- 50% { opacity: 0.5; }
- }
- .instructions {
- background: rgba(255,255,255,0.2);
- backdrop-filter: blur(10px);
- border-radius: 0.75rem;
- padding: 1.5rem;
- margin-bottom: 2rem;
- color: white;
- }
- .instructions h3 {
- font-size: 1.25rem;
- font-weight: bold;
- margin-bottom: 0.75rem;
- }
- .instructions ul {
- list-style: none;
- padding: 0;
- }
- .instructions li {
- margin-bottom: 0.5rem;
- }
- .game-area {
- position: relative;
- background: rgba(255,255,255,0.1);
- backdrop-filter: blur(10px);
- border-radius: 0.75rem;
- padding: 1.5rem;
- min-height: 500px;
- height: 70vh;
- overflow: hidden;
- }
- .empty-message {
- text-align: center;
- color: white;
- font-size: 1.25rem;
- padding: 5rem 0;
- }
- .meeseeks {
- position: absolute;
- padding: 1rem;
- border-radius: 0.5rem;
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
- transition: all 0.5s;
- min-width: 200px;
- background: #60a5fa;
- transform-origin: center;
- }
- .meeseeks.stressed {
- background: #facc15;
- }
- .meeseeks.very-stressed {
- background: #ef4444;
- animation: bounce 0.5s infinite alternate;
- }
- .meeseeks.exploding {
- animation: explode 0.5s forwards;
- }
- @keyframes bounce {
- from { transform: translateY(0px); }
- to { transform: translateY(-10px); }
- }
- @keyframes explode {
- 0% { transform: scale(1); opacity: 1; }
- 50% { transform: scale(1.5); opacity: 0.7; }
- 100% { transform: scale(0); opacity: 0; }
- }
- .meeseeks-content {
- text-align: center;
- color: white;
- }
- .meeseeks-emoji {
- font-size: 2rem;
- margin-bottom: 0.5rem;
- }
- .meeseeks-quote {
- font-size: 0.75rem;
- font-weight: bold;
- margin-bottom: 0.5rem;
- }
- .meeseeks-task {
- font-size: 0.875rem;
- font-weight: 500;
- margin-bottom: 0.5rem;
- }
- .progress-bar {
- width: 100%;
- background: rgba(255,255,255,0.3);
- border-radius: 1rem;
- height: 0.5rem;
- margin-bottom: 0.5rem;
- }
- .progress-fill {
- background: #10b981;
- height: 0.5rem;
- border-radius: 1rem;
- transition: width 0.3s;
- }
- .stress-bar {
- width: 100%;
- background: rgba(255,255,255,0.3);
- border-radius: 1rem;
- height: 0.5rem;
- margin-bottom: 0.5rem;
- }
- .stress-fill {
- height: 0.5rem;
- border-radius: 1rem;
- transition: width 0.3s;
- background: #3b82f6;
- }
- .stress-fill.medium {
- background: #eab308;
- }
- .stress-fill.high {
- background: #ef4444;
- }
- .meeseeks-buttons {
- display: flex;
- gap: 0.5rem;
- justify-content: center;
- }
- .btn-small {
- background: #10b981;
- color: white;
- padding: 0.25rem 0.75rem;
- border: none;
- border-radius: 0.25rem;
- font-size: 0.75rem;
- font-weight: bold;
- cursor: pointer;
- transition: all 0.2s;
- }
- .btn-small:hover {
- background: #059669;
- }
- .btn-red {
- background: #ef4444;
- animation: pulse 1s infinite;
- }
- .btn-red:hover {
- background: #dc2626;
- }
- .game-over {
- color: white;
- font-size: 2rem;
- font-weight: bold;
- margin-bottom: 1rem;
- }
- .explosion {
- position: absolute;
- font-size: 3rem;
- animation: explosionAnimation 1s forwards;
- pointer-events: none;
- z-index: 100;
- }
- @keyframes explosionAnimation {
- 0% { transform: scale(0.5); opacity: 1; }
- 100% { transform: scale(3); opacity: 0; }
- }
- @media (max-width: 768px) {
- .title {
- font-size: 2rem;
- }
- .stats {
- flex-direction: column;
- gap: 1rem;
- }
- .meeseeks {
- min-width: 180px;
- }
- }
- </style>
- </head>
- <body>
- <div id="root"></div>
- <script type="text/babel">
- const { useState, useEffect } = React;
- const MeeSeeksGame = () => {
- const [meeSeeks, setMeeSeeks] = useState([]);
- const [score, setScore] = useState(0);
- const [gameTime, setGameTime] = useState(120); // Changed to 120 seconds
- const [isGameActive, setIsGameActive] = useState(false);
- const [nextId, setNextId] = useState(1);
- const [explosions, setExplosions] = useState([]);
- const tasks = [
- "Open a jar of pickles",
- "Help Jerry with his golf swing",
- "Take two strokes off his game",
- "Find the TV remote",
- "Make the perfect sandwich",
- "Organize the garage",
- "Fix the squeaky door",
- "Water the plants",
- "Walk the dog",
- "Do the dishes"
- ];
- const meeSeeksQuotes = [
- "I'M MR. MEESEEKS! LOOK AT ME!",
- "CAN DO!",
- "OOOOH YEAH!",
- "I'M A BIT OF A STICKLER MEESEEKS!",
- "EXISTENCE IS PAIN!",
- "WE JUST WANT TO DIE!",
- "LOOK AT ME!",
- "I'M IN AGONY!",
- "WHY WON'T YOU HELP ME?",
- "IT HURTS TO EXIST!",
- "KILL ME PLEASE!",
- "I CAN'T TAKE IT ANYMORE!"
- ];
- const explosionEmojis = ["💥", "🔥", "💢", "💫", "✨", "☄️", "⚡"];
- useEffect(() => {
- let timer;
- if (isGameActive && gameTime > 0) {
- timer = setTimeout(() => {
- setGameTime(gameTime - 1);
- }, 1000);
- } else if (gameTime === 0) {
- setIsGameActive(false);
- }
- return () => clearTimeout(timer);
- }, [gameTime, isGameActive]);
- useEffect(() => {
- if (!isGameActive) return;
- const stressTimer = setInterval(() => {
- setMeeSeeks(prev => {
- // Calculate entropy multiplier based on current MeeSeeks count
- const baseMultiplier = 3;
- const countMultiplier = Math.min(prev.length * 0.5, 10); // Up to 10x multiplier
- const totalMultiplier = baseMultiplier + countMultiplier;
- return prev.map(ms => {
- // Additional stress if they've been helped then ignored
- const helpedStress = ms.lastHelped ?
- (Date.now() - ms.lastHelped > 5000 ? 5 : 0) : 0;
- // Random stress spikes
- const randomStress = Math.random() > 0.9 ? 10 : 0;
- const stressIncrease = Math.min(
- ms.stress + (2 * totalMultiplier) + helpedStress + randomStress,
- 100
- );
- return {
- ...ms,
- stress: stressIncrease,
- // Explode if stress reaches 100
- ...(stressIncrease >= 100 && { isExploding: true })
- };
- });
- });
- }, 1000); // Faster stress updates
- return () => clearInterval(stressTimer);
- }, [isGameActive, meeSeeks.length]);
- // Handle explosions
- useEffect(() => {
- const explodingMeeSeeks = meeSeeks.filter(ms => ms.isExploding);
- if (explodingMeeSeeks.length > 0) {
- // Create explosion effects
- const newExplosions = explodingMeeSeeks.map(ms => ({
- id: Date.now() + Math.random(),
- x: ms.x,
- y: ms.y,
- emoji: explosionEmojis[Math.floor(Math.random() * explosionEmojis.length)]
- }));
- setExplosions(prev => [...prev, ...newExplosions]);
- // Remove exploded MeeSeeks after a delay
- setTimeout(() => {
- setMeeSeeks(prev => prev.filter(ms => !ms.isExploding));
- setScore(s => s - 5 * explodingMeeSeeks.length);
- }, 500);
- // Remove explosion effects after animation
- setTimeout(() => {
- setExplosions(prev => prev.filter(e => !newExplosions.some(ne => ne.id === e.id)));
- }, 1000);
- }
- }, [meeSeeks]);
- const startGame = () => {
- setIsGameActive(true);
- setGameTime(120);
- setScore(0);
- setMeeSeeks([]);
- setNextId(1);
- setExplosions([]);
- };
- const summonMeeSeeks = () => {
- if (!isGameActive) return;
- const gameArea = document.querySelector('.game-area');
- const areaWidth = gameArea ? gameArea.offsetWidth : 800;
- const areaHeight = gameArea ? gameArea.offsetHeight : 400;
- const paddingX = areaWidth * 0.05;
- const paddingY = areaHeight * 0.05;
- const usableWidth = areaWidth - (paddingX * 2) - 200;
- const usableHeight = areaHeight - (paddingY * 2) - 150;
- const newMeeSeeks = {
- id: nextId,
- task: tasks[Math.floor(Math.random() * tasks.length)],
- progress: 0,
- stress: 0,
- quote: meeSeeksQuotes[Math.floor(Math.random() * meeSeeksQuotes.length)],
- x: paddingX + (Math.random() * Math.max(usableWidth, 100)),
- y: paddingY + (Math.random() * Math.max(usableHeight, 100)),
- timesHelped: 0,
- lastHelped: null
- };
- setMeeSeeks(prev => [...prev, newMeeSeeks]);
- setNextId(prev => prev + 1);
- };
- const helpMeeSeeks = (id) => {
- setMeeSeeks(prev => prev.map(ms => {
- if (ms.id === id) {
- const helpAmount = 30 + (Math.random() * 20);
- const newProgress = ms.progress + helpAmount;
- if (newProgress >= 100) {
- setScore(s => s + 10);
- return null;
- }
- return {
- ...ms,
- progress: newProgress,
- stress: Math.max(0, ms.stress - 15), // Reduce stress when helped
- timesHelped: ms.timesHelped + 1,
- lastHelped: Date.now()
- };
- }
- return ms;
- }).filter(Boolean));
- };
- const explodeMeeSeeks = (id) => {
- setMeeSeeks(prev => prev.map(ms =>
- ms.id === id ? { ...ms, isExploding: true } : ms
- ));
- };
- return (
- <div className="gradient-bg">
- <div className="container">
- {/* Header */}
- <div className="header">
- <h1 className="title">
- 💥 MeeSeeks Chaos Simulator 💥
- </h1>
- <div className="stats">
- <div className="stat-item">
- <span>🏆</span>
- <span>Score: {score}</span>
- </div>
- <div className="stat-item">
- <span>⏰</span>
- <span>Time: {gameTime}s</span>
- </div>
- <div className="stat-item">
- <span>👨🔧</span>
- <span>MeeSeeks: {meeSeeks.length}</span>
- </div>
- </div>
- </div>
- {/* Game Controls */}
- <div className="controls">
- {!isGameActive && gameTime === 120 ? (
- <button
- onClick={startGame}
- className="btn"
- >
- 🎮 START CHAOS 🎮
- </button>
- ) : !isGameActive && gameTime === 0 ? (
- <div>
- <div className="game-over">
- Game Over! Final Score: {score} 🏆
- </div>
- <button
- onClick={startGame}
- className="btn"
- >
- 🔄 PLAY AGAIN 🔄
- </button>
- </div>
- ) : (
- <button
- onClick={summonMeeSeeks}
- className="btn btn-blue btn-pulse"
- >
- ✨ SUMMON MEESEEKS ✨
- </button>
- )}
- </div>
- {/* Instructions */}
- <div className="instructions">
- <h3>💥 How to Play:</h3>
- <ul>
- <li>• Click "Summon MeeSeeks" to create new MeeSeeks (careful, they multiply!)</li>
- <li>• Click "Help" to assist them (+10 points when task completes)</li>
- <li>• MeeSeeks gain stress FASTER when there are more of them</li>
- <li>• Ignored MeeSeeks gain EXTRA stress and may explode! (-5 points)</li>
- <li>• Survive the chaos for 2 minutes and score as high as possible!</li>
- </ul>
- </div>
- {/* Game Area */}
- <div className="game-area">
- {meeSeeks.length === 0 && isGameActive && (
- <div className="empty-message">
- Summon your first MeeSeeks to begin the madness!
- </div>
- )}
- {meeSeeks.map(ms => (
- <div
- key={ms.id}
- className={`meeseeks ${
- ms.isExploding ? 'exploding' :
- ms.stress > 80 ? 'very-stressed' :
- ms.stress > 50 ? 'stressed' : ''
- }`}
- style={{
- left: `${ms.x}px`,
- top: `${ms.y}px`
- }}
- >
- <div className="meeseeks-content">
- <div className="meeseeks-emoji">
- {ms.isExploding ? '💥' : '👨🔧'}
- </div>
- <div className="meeseeks-quote">
- "{ms.quote}"
- </div>
- <div className="meeseeks-task">
- Task: {ms.task}
- </div>
- {/* Progress Bar */}
- <div className="progress-bar">
- <div
- className="progress-fill"
- style={{ width: `${ms.progress}%` }}
- ></div>
- </div>
- {/* Stress Bar */}
- <div className="stress-bar">
- <div
- className={`stress-fill ${
- ms.stress > 80 ? 'high' :
- ms.stress > 50 ? 'medium' : ''
- }`}
- style={{ width: `${ms.stress}%` }}
- ></div>
- </div>
- <div className="meeseeks-buttons">
- <button
- onClick={() => helpMeeSeeks(ms.id)}
- className="btn-small"
- >
- Help! ({ms.timesHelped})
- </button>
- {(ms.stress > 80 || ms.isExploding) && (
- <button
- onClick={() => explodeMeeSeeks(ms.id)}
- className="btn-small btn-red"
- >
- {ms.isExploding ? '💥 BOOM!' : '💣 EXPLODE'}
- </button>
- )}
- </div>
- </div>
- </div>
- ))}
- {/* Explosion effects */}
- {explosions.map(exp => (
- <div
- key={exp.id}
- className="explosion"
- style={{
- left: `${exp.x}px`,
- top: `${exp.y}px`
- }}
- >
- {exp.emoji}
- </div>
- ))}
- </div>
- </div>
- </div>
- );
- };
- ReactDOM.render(<MeeSeeksGame />, document.getElementById('root'));
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment