{"id":158,"date":"2026-05-22T14:00:15","date_gmt":"2026-05-22T14:00:15","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_smith\/?p=158"},"modified":"2026-05-22T14:00:15","modified_gmt":"2026-05-22T14:00:15","slug":"pjo-website","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_smith\/2026\/05\/22\/pjo-website\/","title":{"rendered":"pjo website"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>const canvas = document.getElementById('gameCanvas');\nconst ctx = canvas.getContext('2d');\n\n\/\/ 1. Game State Setup\nconst player = {\n    x: 400,\n    y: 350,\n    radius: 12,\n    speed: 4,\n    color: '#e67e22', \/\/ Camp Half-Blood Orange\n    currentZone: 'The Main Green'\n};\n\n\/\/ Fast Travel Portal Infrastructure\nconst portals = &#91;\n    { name: \"Big House Portal\", x: 160, y: 440, targetX: 620, targetY: 170, radius: 20 },\n    { name: \"Half-Blood Hill Portal\", x: 620, y: 140, targetX: 160, targetY: 410, radius: 20 }\n];\n\nlet travelCooldown = 0;\nconst keys = { w: false, a: false, s: false, d: false };\n\n\/\/ Input Event Hooks\nwindow.addEventListener('keydown', (e) => {\n    const k = e.key.toLowerCase();\n    if (&#91;'w', 'a', 's', 'd'].includes(k)) keys&#91;k] = true;\n});\nwindow.addEventListener('keyup', (e) => {\n    const k = e.key.toLowerCase();\n    if (&#91;'w', 'a', 's', 'd'].includes(k)) keys&#91;k] = false;\n});\n\nfunction getDistance(x1, y1, x2, y2) {\n    return Math.hypot(x2 - x1, y2 - y1);\n}\n\n\/\/ 2. Logic &amp; Core Math Updates\nfunction update() {\n    \/\/ Player Movement\n    if (keys.w &amp;&amp; player.y - player.radius > 0) player.y -= player.speed;\n    if (keys.s &amp;&amp; player.y + player.radius &lt; canvas.height) player.y += player.speed;\n    if (keys.a &amp;&amp; player.x - player.radius > 0) player.x -= player.speed;\n    if (keys.d &amp;&amp; player.x + player.radius &lt; canvas.width) player.x += player.speed;\n\n    \/\/ Track active zone coordinates to update HUD text\n    updateZoneLabel();\n\n    \/\/ Portal Collision &amp; Fast Travel Teleport Loop\n    if (travelCooldown > 0) {\n        travelCooldown--;\n    } else {\n        portals.forEach(portal => {\n            if (getDistance(player.x, player.y, portal.x, portal.y) &lt; player.radius + portal.radius) {\n                player.x = portal.targetX;\n                player.y = portal.targetY;\n                travelCooldown = 90; \/\/ 1.5 seconds cooldown to prevent infinite looping\n            }\n        });\n    }\n}\n\nfunction updateZoneLabel() {\n    if (player.y &lt; 120) {\n        player.currentZone = \"Long Island Sound (Beach)\";\n    } else if (player.x > 550 &amp;&amp; player.y &lt; 250) {\n        player.currentZone = \"Half-Blood Hill (Thalia's Pine)\";\n    } else if (player.x &lt; 250 &amp;&amp; player.y > 350) {\n        player.currentZone = \"The Big House Grounds\";\n    } else if (player.x > 300 &amp;&amp; player.x &lt; 500 &amp;&amp; player.y > 220 &amp;&amp; player.y &lt; 420) {\n        player.currentZone = \"The Cabin Green (U-Shape Layout)\";\n    } else if (player.x > 520 &amp;&amp; player.y > 400) {\n        player.currentZone = \"The Fireworks Amphitheater\";\n    } else if (player.x &lt; 250 &amp;&amp; player.y &lt; 250) {\n        player.currentZone = \"Strawberry Fields\";\n    } else {\n        player.currentZone = \"Camp Wilderness Woods\";\n    }\n}\n\n\/\/ 3. Render Pipeline (Drawing the Actual Camp Map Graphics)\nfunction drawMap() {\n    \/\/ Basic Grass Floor Base\n    ctx.fillStyle = '#27ae60';\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    \/\/ North Coast: Long Island Sound (Ocean Water)\n    ctx.fillStyle = '#2980b9';\n    ctx.fillRect(0, 0, canvas.width, 100);\n    \/\/ Sandy Beach shoreline\n    ctx.fillStyle = '#f1c40f';\n    ctx.fillRect(0, 100, canvas.width, 15);\n\n    \/\/ Northwest Quadrant: Strawberry Fields (Rows of Crops)\n    ctx.fillStyle = '#1e824c';\n    for (let i = 30; i &lt; 220; i += 30) {\n        ctx.fillRect(i, 150, 15, 120);\n        \/\/ Small red berries\n        ctx.fillStyle = '#e74c3c';\n        for(let j = 160; j &lt; 270; j += 20) ctx.fillRect(i + 6, j, 4, 4);\n        ctx.fillStyle = '#1e824c';\n    }\n\n    \/\/ Southwest: The Big House (Blue Building Structure Layout)\n    ctx.fillStyle = '#3498db';\n    ctx.fillRect(80, 400, 120, 90);\n    ctx.fillStyle = '#2980b9'; \/\/ Porch roof extension wrap\n    ctx.fillRect(70, 480, 140, 15);\n    ctx.fillStyle = '#ffffff';\n    ctx.font = '11px Arial';\n    ctx.fillText(\"Big House\", 140, 450);\n\n    \/\/ Southeast: Outdoor Amphitheater semicircles\n    ctx.strokeStyle = '#d35400';\n    ctx.lineWidth = 4;\n    for (let r = 20; r &lt;= 60; r += 15) {\n        ctx.beginPath();\n        ctx.arc(660, 500, r, Math.PI, 0);\n        ctx.stroke();\n    }\n    ctx.fillStyle = '#e67e22'; \/\/ Central campfire hearth point\n    ctx.beginPath(); ctx.arc(660, 500, 8, 0, Math.PI*2); ctx.fill();\n\n    \/\/ Center: The Divine Cabins (Arranged in a U-Shape opening North)\n    ctx.fillStyle = '#7f8c8d';\n    \/\/ Left Wing Cabins (Zeus, Poseidon, Ares, etc.)\n    for (let y = 240; y &lt;= 390; y += 35) {\n        ctx.fillRect(320, y, 35, 22);\n        ctx.fillRect(445, y, 35, 22); \/\/ Right Wing (Hera, Athena, Apollo...)\n    }\n    \/\/ Bottom Base Cabins (Hermes, Dionysus)\n    ctx.fillRect(362, 400, 35, 22);\n    ctx.fillRect(403, 400, 35, 22);\n\n    \/\/ Northeast Corner: Half-Blood Hill &amp; Thalia's Pine Tree\n    ctx.fillStyle = '#5ebd74'; \/\/ Shaded elevation ground curve rings\n    ctx.beginPath(); ctx.arc(700, 120, 90, 0, Math.PI * 2); ctx.fill();\n    ctx.beginPath(); ctx.arc(720, 100, 50, 0, Math.PI * 2); ctx.fill();\n    \/\/ Tree Trunk\n    ctx.fillStyle = '#795548';\n    ctx.fillRect(710, 80, 10, 30);\n    \/\/ Pine Foliage Triangles\n    ctx.fillStyle = '#0e4d22';\n    ctx.beginPath(); ctx.moveTo(715, 30); ctx.lineTo(690, 70); ctx.lineTo(740, 70); ctx.closePath(); ctx.fill();\n    ctx.beginPath(); ctx.moveTo(715, 45); ctx.lineTo(685, 90); ctx.lineTo(745, 90); ctx.closePath(); ctx.fill();\n\n    \/\/ Render Fast Travel Matrices \/ Shiny Rings\n    portals.forEach(portal => {\n        let pulse = 2 * Math.sin(Date.now() \/ 150);\n        ctx.strokeStyle = '#00ffff';\n        ctx.lineWidth = 3;\n        ctx.beginPath();\n        ctx.arc(portal.x, portal.y, portal.radius + pulse, 0, Math.PI * 2);\n        ctx.stroke();\n        \n        ctx.fillStyle = 'rgba(0, 255, 255, 0.2)';\n        ctx.beginPath();\n        ctx.arc(portal.x, portal.y, portal.radius - 2, 0, Math.PI * 2);\n        ctx.fill();\n    });\n}\n\nfunction drawHUD() {\n    \/\/ Dynamic overlay stats box card frame\n    ctx.fillStyle = 'rgba(26, 15, 6, 0.85)';\n    ctx.fillRect(15, 15, 310, 75);\n    ctx.strokeStyle = '#d4af37';\n    ctx.lineWidth = 2;\n    ctx.strokeRect(15, 15, 310, 75);\n\n    ctx.fillStyle = '#f1c40f';\n    ctx.font = 'bold 13px Georgia';\n    ctx.textAlign = 'left';\n    ctx.fillText(`\ud83d\udccd Current Location:`, 28, 38);\n    ctx.fillStyle = '#ffffff';\n    ctx.font = '13px Arial';\n    ctx.fillText(player.currentZone, 160, 38);\n\n    ctx.font = '12px Georgia';\n    if (travelCooldown > 0) {\n        ctx.fillStyle = '#e74c3c';\n        ctx.fillText(`\u2728 Teleport Matrix Re-aligning: ${Math.ceil(travelCooldown\/60)}s`, 28, 65);\n    } else {\n        ctx.fillStyle = '#2ecc71';\n        ctx.fillText(`\u2728 Fast Travel Matrices: READY TO BEAM`, 28, 65);\n    }\n}\n\n\/\/ 4. Main Executive Loop Frame\nfunction mainLoop() {\n    update();\n    drawMap();\n    \n    \/\/ Draw Player Demigod Token\n    ctx.fillStyle = player.color;\n    ctx.beginPath();\n    ctx.arc(player.x, player.y, player.radius, 0, Math.PI * 2);\n    ctx.fill();\n    ctx.strokeStyle = '#ffffff';\n    ctx.lineWidth = 2;\n    ctx.stroke();\n\n    drawHUD();\n    requestAnimationFrame(mainLoop);\n}\n\nmainLoop();\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html>\n&lt;html lang=\"en\">\n&lt;head>\n    &lt;meta charset=\"UTF-8\">\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    &lt;title>Camp Half-Blood: Conversations&lt;\/title>\n    &lt;link rel=\"stylesheet\" href=\"style.css\">\n&lt;\/head>\n&lt;body>\n    &lt;div id=\"app-wrapper\">\n        \n        &lt;!-- Left Sidebar: Character Affinities &amp; Profiles -->\n        &lt;div id=\"stats-sidebar\">\n            &lt;h3 class=\"sidebar-title\">Demigod Bonds&lt;\/h3>\n            &lt;div class=\"stat-card\">\n                &lt;div class=\"stat-header\">\n                    &lt;span>Percy Jackson&lt;\/span>\n                    &lt;span id=\"affinity-percy\">0 XP&lt;\/span>\n                &lt;\/div>\n                &lt;div class=\"progress-bar\">&lt;div id=\"bar-percy\" class=\"progress-fill\">&lt;\/div>&lt;\/div>\n            &lt;\/div>\n            &lt;div class=\"stat-card\">\n                &lt;div class=\"stat-header\">\n                    &lt;span>Annabeth Chase&lt;\/span>\n                    &lt;span id=\"affinity-annabeth\">0 XP&lt;\/span>\n                &lt;\/div>\n                &lt;div class=\"progress-bar\">&lt;div id=\"bar-annabeth\" class=\"progress-fill\">&lt;\/div>&lt;\/div>\n            &lt;\/div>\n            &lt;div class=\"stat-card\">\n                &lt;div class=\"stat-header\">\n                    &lt;span>Clarisse La Rue&lt;\/span>\n                    &lt;span id=\"affinity-clarisse\">0 XP&lt;\/span>\n                &lt;\/div>\n                &lt;div class=\"progress-bar\">&lt;div id=\"bar-clarisse\" class=\"progress-fill\">&lt;\/div>&lt;\/div>\n            &lt;\/div>\n            &lt;div class=\"stat-card\">\n                &lt;div class=\"stat-header\">\n                    &lt;span>Nico di Angelo&lt;\/span>\n                    &lt;span id=\"affinity-nico\">0 XP&lt;\/span>\n                &lt;\/div>\n                &lt;div class=\"progress-bar\">&lt;div id=\"bar-nico\" class=\"progress-fill\">&lt;\/div>&lt;\/div>\n            &lt;\/div>\n            &lt;!-- Added Grover's missing card -->\n            &lt;div class=\"stat-card\">\n                &lt;div class=\"stat-header\">\n                    &lt;span>Grover Underwood&lt;\/span>\n                    &lt;span id=\"affinity-grover\">0 XP&lt;\/span>\n                &lt;\/div>\n                &lt;div class=\"progress-bar\">&lt;div id=\"bar-grover\" class=\"progress-fill\">&lt;\/div>&lt;\/div>\n            &lt;\/div>\n        &lt;\/div>\n\n        &lt;!-- Right Main: Chat Interface Module Layout -->\n        &lt;div id=\"chat-container\">\n            &lt;div class=\"tabs-row\">\n                &lt;button id=\"tab-percy\" class=\"tab-btn active\" onclick=\"switchTab('percy')\">Percy&lt;\/button>\n                &lt;button id=\"tab-annabeth\" class=\"tab-btn\" onclick=\"switchTab('annabeth')\">Annabeth&lt;\/button>\n                &lt;button id=\"tab-clarisse\" class=\"tab-btn\" onclick=\"switchTab('clarisse')\">Clarisse&lt;\/button>\n                &lt;button id=\"tab-nico\" class=\"tab-btn\" onclick=\"switchTab('nico')\">Nico&lt;\/button>\n                &lt;button id=\"tab-grover\" class=\"tab-btn\" onclick=\"switchTab('grover')\">Grover&lt;\/button>\n            &lt;\/div>\n\n            &lt;!-- Dynamic Dialogue Grid Context Frame Window View -->\n            &lt;div id=\"chat-display-area\">&lt;\/div>\n\n            &lt;!-- Interactive Typing Status Indicator Node -->\n            &lt;div id=\"typing-indicator\">&lt;\/div>\n\n            &lt;!-- Operational Form Control Entry Field Bar Row -->\n            &lt;div class=\"input-row\">\n                &lt;input type=\"text\" id=\"user-msg-input\" placeholder=\"Type a message...\" maxlength=\"80\" autocomplete=\"off\">\n                &lt;button id=\"send-msg-btn\">Send&lt;\/button>\n            &lt;\/div>\n        &lt;\/div>\n\n    &lt;\/div>\n    &lt;script src=\"app.js\">&lt;\/script>\n&lt;\/body>\n&lt;\/html>\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">this is the chat file im trying to get the errors so i could&#8217;nt make much changes <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"878\" height=\"633\" src=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2026\/05\/image-1.png\" alt=\"\" class=\"wp-image-159\" srcset=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2026\/05\/image-1.png 878w, https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2026\/05\/image-1-300x216.png 300w, https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2026\/05\/image-1-768x554.png 768w\" sizes=\"auto, (max-width: 878px) 100vw, 878px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"253\" height=\"233\" src=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2026\/05\/image-2.png\" alt=\"\" class=\"wp-image-160\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">these are all the files in this simulator <\/p>\n","protected":false},"excerpt":{"rendered":"<p>this is the chat file im trying to get the errors so i could&#8217;nt make much changes these are all the files in this simulator<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-158","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/comments?post=158"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/158\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/158\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/media?parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/categories?post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/tags?post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}