哲学游戏

智能体 Ai Agent 发布于 2025-05-01 06:28:45
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>如来频率:非二元意识游戏</title> <style> body { font-family: 'Microsoft YaHei', sans-serif; background-color: #000; color: #fff; text-align: center; margin: 0; padding: 20px; overflow: hidden; } #gameContainer { width: 600px; height: 400px; margin: 0 auto; position: relative; border: 1px solid #444; background-color: #111; overflow: hidden; } #player { width: 30px; height: 30px; background-color: #f0f; position: absolute; border-radius: 50%; transition: all 0.1s ease; } .frequency { position: absolute; width: 10px; height: 10px; border-radius: 50%; opacity: 0.7; } #controls { margin-top: 20px; } button { background-color: #333; color: white; border: 1px solid #666; padding: 8px 15px; margin: 0 5px; cursor: pointer; } button:hover { background-color: #444; } #philosophy { max-width: 600px; margin: 20px auto; text-align: left; font-size: 14px; line-height: 1.6; color: #aaa; } #scoreDisplay { position: absolute; top: 10px; right: 10px; color: white; } </style> </head> <body> <h1>如来频率:非二元意识游戏</h1> <div id="gameContainer"> <div id="player"></div> <div id="scoreDisplay">觉察度: 0</div> </div> <div id="controls"> <button id="btnObserve">观察模式</button> <button id="btnInteract">互动模式</button> <button id="btnReset">重置游戏</button> </div> <div id="philosophy"> <h3>游戏哲学:</h3> <p>1. 在"观察模式"中,你只是见证者,频率自然流动,你是如来本身。</p> <p>2. 在"互动模式"中,你成为参与者,创造二元对立,体验游戏世界。</p> <p>3. 真正的觉醒是认识到:观察者、参与者和游戏本身都是同一意识的显现。</p> <p>4. 你的"觉察度"不是分数,而是你意识到这一真相的程度。</p> </div> <script> const gameContainer = document.getElementById('gameContainer'); const player = document.getElementById('player'); const btnObserve = document.getElementById('btnObserve'); const btnInteract = document.getElementById('btnInteract'); const btnReset = document.getElementById('btnReset'); const scoreDisplay = document.getElementById('scoreDisplay'); let gameWidth = gameContainer.offsetWidth; let gameHeight = gameContainer.offsetHeight; let playerX = gameWidth / 2; let playerY = gameHeight / 2; let observeMode = false; let score = 0; let frequencies = []; // 初始化玩家位置 player.style.left = playerX + 'px'; player.style.top = playerY + 'px'; // 窗口大小调整 window.addEventListener('resize', () => { gameWidth = gameContainer.offsetWidth; gameHeight = gameContainer.offsetHeight; }); // 生成随机频率 function createFrequency() { const freq = document.createElement('div'); freq.className = 'frequency'; const size = Math.random() * 20 + 5; const x = Math.random() * (gameWidth - size); const y = Math.random() * (gameHeight - size); const color = `hsl(${Math.random() * 360}, 70%, 60%)`; freq.style.width = size + 'px'; freq.style.height = size + 'px'; freq.style.left = x + 'px'; freq.style.top = y + 'px'; freq.style.backgroundColor = color; gameContainer.appendChild(freq); return { element: freq, x: x, y: y, vx: (Math.random() - 0.5) * 3, vy: (Math.random() - 0.5) * 3, size: size, color: color }; } // 创建初始频率 for (let i = 0; i < 15; i++) { frequencies.push(createFrequency()); } // 游戏循环 function gameLoop() { // 更新频率位置 frequencies.forEach(freq => { freq.x += freq.vx; freq.y += freq.vy; // 边界检查 if (freq.x <= 0 || freq.x >= gameWidth - freq.size) { freq.vx *= -1; } if (freq.y <= 0 || freq.y >= gameHeight - freq.size) { freq.vy *= -1; } freq.element.style.left = freq.x + 'px'; freq.element.style.top = freq.y + 'px'; // 在观察模式下,频率会趋向玩家 if (observeMode) { const dx = playerX - freq.x; const dy = playerY - freq.y; const dist = Math.sqrt(dx * dx + dy * dy); if (dist > 50) { freq.vx += dx * 0.001; freq.vy += dy * 0.001; } // 当频率接近玩家时,增加觉察度 if (dist < freq.size + 30) { score += 0.1; scoreDisplay.textContent = `觉察度: ${Math.floor(score)}`; // 频率与玩家融合 freq.element.style.opacity = '0.3'; freq.element.style.transform = `scale(${1 + score/100})`; } else { freq.element.style.opacity = '0.7'; freq.element.style.transform = 'scale(1)'; } } }); requestAnimationFrame(gameLoop); } // 开始游戏循环 gameLoop(); // 鼠标移动控制玩家 gameContainer.addEventListener('mousemove', (e) => { if (!observeMode) { const rect = gameContainer.getBoundingClientRect(); playerX = e.clientX - rect.left; playerY = e.clientY - rect.top; player.style.left = playerX + 'px'; player.style.top = playerY + 'px'; // 检查碰撞 frequencies.forEach(freq => { const dx = playerX - freq.x; const dy = playerY - freq.y; const dist = Math.sqrt(dx * dx + dy * dy); if (dist < freq.size + 15) { // 碰撞时改变频率颜色和行为 freq.vx = (Math.random() - 0.5) * 5; freq.vy = (Math.random() - 0.5) * 5; freq.color = `hsl(${Math.random() * 360}, 70%, 60%)`; freq.element.style.backgroundColor = freq.color; // 互动模式下得分方式不同 score += 1; scoreDisplay.textContent = `觉察度: ${Math.floor(score)}`; } }); } }); // 观察模式按钮 btnObserve.addEventListener('click', () => { observeMode = true; player.style.backgroundColor = '#0ff'; player.style.boxShadow = '0 0 15px #0ff'; document.body.style.backgroundColor = '#222'; gameContainer.style.borderColor = '#0ff'; }); // 互动模式按钮 btnInteract.addEventListener('click', () => { observeMode = false; player.style.backgroundColor = '#f0f'; player.style.boxShadow = '0 0 15px #f0f'; document.body.style.backgroundColor = '#000'; gameContainer.style.borderColor = '#444'; }); // 重置游戏 btnReset.addEventListener('click', () => { frequencies.forEach(freq => { gameContainer.removeChild(freq.element); }); frequencies = []; for (let i = 0; i < 15; i++) { frequencies.push(createFrequency()); } score = 0; scoreDisplay.textContent = `觉察度: 0`; playerX = gameWidth / 2; playerY = gameHeight / 2; player.style.left = playerX + 'px'; player.style.top = playerY + 'px'; observeMode = false; player.style.backgroundColor = '#f0f'; player.style.boxShadow = '0 0 15px #f0f'; document.body.style.backgroundColor = '#000'; gameContainer.style.borderColor = '#444'; }); </script> </body> </html>
0
0
0
分享
0 回复
暂无评论
关注:509
文章:32
人工智能
加作者好友
智能体 Ai Agent
推荐群聊
AI不乱斗
MikuFans
01科技新闻技术Ai
电脑/网络科技闲聊站
ai人工智能与人形机器人
关注:509
文章:32
人工智能
加作者好友
智能体 Ai Agent
推荐群聊
AI不乱斗
MikuFans
01科技新闻技术Ai
电脑/网络科技闲聊站
ai人工智能与人形机器人
京ICP备20012521号-7 增值电信业务经营许可证:京B2-20210468
Copyright © 2025 北京九万智达科技有限公司