{"id":2701,"date":"2026-04-28T21:24:22","date_gmt":"2026-04-28T21:24:22","guid":{"rendered":"https:\/\/www.nmp.unirc.it\/?page_id=2701"},"modified":"2026-04-28T21:46:21","modified_gmt":"2026-04-28T21:46:21","slug":"dino-endless-runner","status":"publish","type":"page","link":"https:\/\/www.nmp.unirc.it\/?page_id=2701","title":{"rendered":"NMP2026 Runner"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"it\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <title>NMP 2026 Runner<\/title>\n\n  <style>\n    * {\n      box-sizing: border-box;\n      margin: 0;\n      padding: 0;\n    }\n\n    body {\n      min-height: 100vh;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      font-family: Arial, sans-serif;\n      background: #f4f4f4;\n      color: #222;\n      padding: 20px;\n    }\n\n    .game-wrapper {\n      width: 100%;\n      max-width: 760px;\n      text-align: center;\n    }\n\n    h1 {\n      margin-bottom: 12px;\n      font-size: 28px;\n    }\n\n    .game-info {\n      display: flex;\n      justify-content: space-between;\n      margin-bottom: 10px;\n      font-size: 18px;\n      font-weight: bold;\n    }\n\n    #game {\n      position: relative;\n      width: 100%;\n      height: 260px;\n      overflow: hidden;\n      border: 3px solid #222;\n      border-radius: 14px;\n      background: linear-gradient(#ffffff, #e9f5ff);\n      cursor: pointer;\n      touch-action: manipulation;\n    }\n\n    #ground {\n      position: absolute;\n      left: 0;\n      bottom: 34px;\n      width: 100%;\n      height: 4px;\n      background: #222;\n    }\n\n    #dino {\n      position: absolute;\n      left: 55px;\n      bottom: 38px;\n      width: 42px;\n      height: 48px;\n      border-radius: 8px;\n      background: #2f78b7;\n      color: white;\n      font-weight: bold;\n      font-family: Arial, sans-serif;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      justify-content: center;\n      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);\n      z-index: 2;\n    }\n\n    #dino .main {\n      font-size: 12px;\n      line-height: 1;\n    }\n\n    #dino .year {\n      font-size: 7px;\n      line-height: 1;\n      margin-top: 2px;\n      letter-spacing: 1px;\n    }\n\n    #obstacle {\n      position: absolute;\n      left: 800px;\n      bottom: 38px;\n      width: 28px;\n      height: 46px;\n      border-radius: 6px 6px 0 0;\n      background: #238636;\n    }\n\n    #obstacle::before,\n    #obstacle::after {\n      content: \"\";\n      position: absolute;\n      width: 10px;\n      height: 22px;\n      background: #238636;\n      border-radius: 5px;\n    }\n\n    #obstacle::before {\n      left: -8px;\n      top: 12px;\n    }\n\n    #obstacle::after {\n      right: -8px;\n      top: 20px;\n    }\n\n    #message {\n      position: absolute;\n      inset: 0;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      flex-direction: column;\n      gap: 8px;\n      background: rgba(255, 255, 255, 0.72);\n      font-weight: bold;\n      font-size: 22px;\n      text-align: center;\n      z-index: 5;\n      padding: 20px;\n    }\n\n    #message small {\n      font-size: 14px;\n      font-weight: normal;\n    }\n\n    .hidden {\n      display: none !important;\n    }\n\n    .hint {\n      margin-top: 12px;\n      font-size: 14px;\n      color: #555;\n    }\n\n    @media (max-width: 520px) {\n      #game {\n        height: 220px;\n      }\n\n      h1 {\n        font-size: 22px;\n      }\n\n      .game-info {\n        font-size: 16px;\n      }\n    }\n  <\/style>\n<\/head>\n\n<body>\n  <div class=\"game-wrapper\">\n    <h1>NMP 2026 Runner<\/h1>\n\n    <div class=\"game-info\">\n      <div>Punteggio: <span id=\"score\">0<\/span><\/div>\n      <div>Record: <span id=\"bestScore\">0<\/span><\/div>\n    <\/div>\n\n    <div id=\"game\" aria-label=\"NMP 2026 Runner game area\">\n      <div id=\"dino\">\n        <span class=\"main\">NMP<\/span>\n        <span class=\"year\">2026<\/span>\n      <\/div>\n\n      <div id=\"obstacle\"><\/div>\n      <div id=\"ground\"><\/div>\n\n      <div id=\"message\">\n        Premi Spazio o tocca per iniziare\n        <small>Salta i cactus e fai pi\u00f9 punti possibile<\/small>\n      <\/div>\n    <\/div>\n\n    <p class=\"hint\">Desktop: Spazio\/Freccia Su. Mobile: tocca lo schermo.<\/p>\n  <\/div>\n\n  <script>\n    const game = document.getElementById(\"game\");\n    const dino = document.getElementById(\"dino\");\n    const obstacle = document.getElementById(\"obstacle\");\n    const scoreEl = document.getElementById(\"score\");\n    const bestScoreEl = document.getElementById(\"bestScore\");\n    const message = document.getElementById(\"message\");\n\n    let isPlaying = false;\n    let isGameOver = false;\n    let isJumping = false;\n\n    let dinoBottom = 38;\n    let velocityY = 0;\n    let gravity = 0.6;\n    let jumpPower = 20;\n\n    let obstacleX = 760;\n    let obstacleSpeed = 3.2;\n\n    let score = 0;\n    let bestScore = Number(localStorage.getItem(\"dinoBestScore\")) || 0;\n    let animationId;\n\n    bestScoreEl.textContent = bestScore;\n\n    function getGameWidth() {\n      return game.clientWidth;\n    }\n\n    function resetGame() {\n      isPlaying = true;\n      isGameOver = false;\n      isJumping = false;\n\n      dinoBottom = 38;\n      velocityY = 0;\n\n      \/\/ Il primo cactus arriva abbastanza presto, senza attesa infinita\n      obstacleX = getGameWidth() + 60;\n      obstacleSpeed = 3.2;\n\n      score = 0;\n      scoreEl.textContent = score;\n\n      dino.style.bottom = dinoBottom + \"px\";\n      obstacle.style.left = obstacleX + \"px\";\n\n      message.classList.add(\"hidden\");\n\n      cancelAnimationFrame(animationId);\n      animationId = requestAnimationFrame(gameLoop);\n    }\n\n    function jump() {\n      if (!isPlaying || isGameOver) {\n        resetGame();\n        return;\n      }\n\n      if (!isJumping) {\n        isJumping = true;\n        velocityY = jumpPower;\n      }\n    }\n\n    function checkCollision() {\n      const dinoRect = dino.getBoundingClientRect();\n      const obstacleRect = obstacle.getBoundingClientRect();\n\n      return !(\n        dinoRect.right < obstacleRect.left ||\n        dinoRect.left > obstacleRect.right ||\n        dinoRect.bottom < obstacleRect.top ||\n        dinoRect.top > obstacleRect.bottom\n      );\n    }\n\n    function endGame() {\n      isPlaying = false;\n      isGameOver = true;\n      cancelAnimationFrame(animationId);\n\n      if (score > bestScore) {\n        bestScore = score;\n        localStorage.setItem(\"dinoBestScore\", bestScore);\n        bestScoreEl.textContent = bestScore;\n      }\n\n      message.innerHTML = `\n        Game Over\n        <small>Punteggio: ${score} \u2014 premi Spazio o tocca per riprovare<\/small>\n      `;\n      message.classList.remove(\"hidden\");\n    }\n\n    function gameLoop() {\n      if (!isPlaying) return;\n\n      \/\/ Salto\n      dinoBottom += velocityY;\n      velocityY -= gravity;\n\n      if (dinoBottom <= 38) {\n        dinoBottom = 38;\n        velocityY = 0;\n        isJumping = false;\n      }\n\n      dino.style.bottom = dinoBottom + \"px\";\n\n      \/\/ Movimento cactus\n      obstacleX -= obstacleSpeed;\n\n      if (obstacleX < -60) {\n        score++;\n        scoreEl.textContent = score;\n\n        \/\/ Velocit\u00e0 progressiva: cresce poco alla volta, non a scatti\n        obstacleSpeed = Math.min(8, 3.2 + score * 0.08);\n\n        \/\/ Distanza progressiva: all'inizio pi\u00f9 comoda, poi pi\u00f9 dinamica\n        const minDistance = Math.max(90, 260 - score * 4);\n        const randomDistance = Math.random() * 180;\n        obstacleX = getGameWidth() + minDistance + randomDistance;\n      }\n\n      obstacle.style.left = obstacleX + \"px\";\n\n      if (checkCollision()) {\n        endGame();\n        return;\n      }\n\n      animationId = requestAnimationFrame(gameLoop);\n    }\n\n    document.addEventListener(\"keydown\", function (event) {\n      if (event.code === \"Space\" || event.code === \"ArrowUp\") {\n        event.preventDefault();\n        jump();\n      }\n    });\n\n    game.addEventListener(\"click\", jump);\n\n    game.addEventListener(\"touchstart\", function (event) {\n      event.preventDefault();\n      jump();\n    });\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>NMP 2026 Runner NMP 2026 Runner Punteggio: 0 Record: 0 NMP 2026 Premi Spazio o tocca per iniziare Salta i cactus e fai pi\u00f9 punti possibile Desktop: Spazio\/Freccia Su. Mobile: tocca lo schermo.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2701","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>NMP2026 Runner - NMP2026<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nmp.unirc.it\/?page_id=2701\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NMP2026 Runner - NMP2026\" \/>\n<meta property=\"og:description\" content=\"NMP 2026 Runner NMP 2026 Runner Punteggio: 0 Record: 0 NMP 2026 Premi Spazio o tocca per iniziare Salta i cactus e fai pi\u00f9 punti possibile Desktop: Spazio\/Freccia Su. Mobile: tocca lo schermo.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.nmp.unirc.it\/?page_id=2701\" \/>\n<meta property=\"og:site_name\" content=\"NMP2026\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-28T21:46:21+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/?page_id=2701\",\"url\":\"https:\\\/\\\/www.nmp.unirc.it\\\/?page_id=2701\",\"name\":\"NMP2026 Runner - NMP2026\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#website\"},\"datePublished\":\"2026-04-28T21:24:22+00:00\",\"dateModified\":\"2026-04-28T21:46:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/?page_id=2701#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.nmp.unirc.it\\\/?page_id=2701\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/?page_id=2701#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.nmp.unirc.it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NMP2026 Runner\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#website\",\"url\":\"https:\\\/\\\/www.nmp.unirc.it\\\/\",\"name\":\"NMP2026\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.nmp.unirc.it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#organization\",\"name\":\"NMP2026\",\"url\":\"https:\\\/\\\/www.nmp.unirc.it\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.nmp.unirc.it\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/cropped-cropped-Immagine1-removebg-preview.png\",\"contentUrl\":\"https:\\\/\\\/www.nmp.unirc.it\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/cropped-cropped-Immagine1-removebg-preview.png\",\"width\":570,\"height\":438,\"caption\":\"NMP2026\"},\"image\":{\"@id\":\"https:\\\/\\\/www.nmp.unirc.it\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NMP2026 Runner - NMP2026","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nmp.unirc.it\/?page_id=2701","og_locale":"en_US","og_type":"article","og_title":"NMP2026 Runner - NMP2026","og_description":"NMP 2026 Runner NMP 2026 Runner Punteggio: 0 Record: 0 NMP 2026 Premi Spazio o tocca per iniziare Salta i cactus e fai pi\u00f9 punti possibile Desktop: Spazio\/Freccia Su. Mobile: tocca lo schermo.","og_url":"https:\/\/www.nmp.unirc.it\/?page_id=2701","og_site_name":"NMP2026","article_modified_time":"2026-04-28T21:46:21+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.nmp.unirc.it\/?page_id=2701","url":"https:\/\/www.nmp.unirc.it\/?page_id=2701","name":"NMP2026 Runner - NMP2026","isPartOf":{"@id":"https:\/\/www.nmp.unirc.it\/#website"},"datePublished":"2026-04-28T21:24:22+00:00","dateModified":"2026-04-28T21:46:21+00:00","breadcrumb":{"@id":"https:\/\/www.nmp.unirc.it\/?page_id=2701#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nmp.unirc.it\/?page_id=2701"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.nmp.unirc.it\/?page_id=2701#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.nmp.unirc.it\/"},{"@type":"ListItem","position":2,"name":"NMP2026 Runner"}]},{"@type":"WebSite","@id":"https:\/\/www.nmp.unirc.it\/#website","url":"https:\/\/www.nmp.unirc.it\/","name":"NMP2026","description":"","publisher":{"@id":"https:\/\/www.nmp.unirc.it\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nmp.unirc.it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.nmp.unirc.it\/#organization","name":"NMP2026","url":"https:\/\/www.nmp.unirc.it\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nmp.unirc.it\/#\/schema\/logo\/image\/","url":"https:\/\/www.nmp.unirc.it\/wp-content\/uploads\/2023\/10\/cropped-cropped-Immagine1-removebg-preview.png","contentUrl":"https:\/\/www.nmp.unirc.it\/wp-content\/uploads\/2023\/10\/cropped-cropped-Immagine1-removebg-preview.png","width":570,"height":438,"caption":"NMP2026"},"image":{"@id":"https:\/\/www.nmp.unirc.it\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/pages\/2701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2701"}],"version-history":[{"count":5,"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/pages\/2701\/revisions"}],"predecessor-version":[{"id":2714,"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=\/wp\/v2\/pages\/2701\/revisions\/2714"}],"wp:attachment":[{"href":"https:\/\/www.nmp.unirc.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}