{"id":3339,"date":"2020-11-04T13:31:32","date_gmt":"2020-11-04T12:31:32","guid":{"rendered":"https:\/\/blog.tomayac.com\/2020\/11\/04\/play-the-chrome-dino-game-on-your-nintendo-switch\/"},"modified":"2020-11-04T13:31:32","modified_gmt":"2020-11-04T12:31:32","slug":"play-the-chrome-dino-game-on-your-nintendo-switch","status":"publish","type":"post","link":"https:\/\/tomayac.com\/wordpress\/2020\/11\/04\/play-the-chrome-dino-game-on-your-nintendo-switch\/","title":{"rendered":"Play the Chrome dino game on your Nintendo Switch"},"content":{"rendered":"\n\t\t\t<p>I have landed an article over on <a href=\"https:\/\/web.dev\/\">web.dev<\/a>\nthat <a href=\"https:\/\/web.dev\/gamepad\/\">talks about the Gamepad API<\/a>.\nOne piece of information from this article that our editorial board was not comfortable\nwith having in there was instructions on how to play the Chrome dino game on a Nintendo Switch.\nSo, here you go with the steps right here on my private blog instead.<\/p>\n<figure>\n  <img src=\"https:\/\/blog.tomayac.com\/images\/nintendo-switch.jpg\" width=\"800\" height=\"240\" alt=\"The hands of a person playing the Chrome dino game on a Nintendo Switch.\">\n  <figcaption>\n    Press any of the Nintendo Switch's buttons to play!\n  <\/figcaption>\n<\/figure>\n<p>The Nintendo Switch contains a\n<a href=\"https:\/\/switchbrew.org\/wiki\/Internet_Browser#WifiWebAuthApplet\">hidden browser<\/a>,\nwhich serves for logging in to Wi-Fi networks behind a captive portal.\nThe browser is pretty barebones and does not have a URL bar,\nbut, once you have navigated to a page, it is fully usable.\nWhen doing a connection test in system settings, the Switch will detect that the captive portal\nis present and display an error for it when the response for\n<a href=\"http:\/\/conntest.nintendowifi.net\/\">http:\/\/conntest.nintendowifi.net\/<\/a>\ndoes not include the <code>X-Organization: Nintendo<\/code> HTTP header.\nI can make creative use of this by pointing the Switch to a DNS server\nthat simulates a captive portal that then redirects to a search engine.<\/p>\n<ol>\n<li>Go to <strong>System Settings<\/strong> and then <strong>Internet Settings<\/strong> and\nfind the Wi-Fi network that your Switch is connected to. Tap <strong>Change Settings<\/strong>.<\/li>\n<li>Find the section with the <strong>DNS Settings<\/strong> and add\n<a href=\"http:\/\/45.55.142.122\/\">45.55.142.122<\/a> as a new <strong>Primary DNS<\/strong>.\nNote that this DNS server is <em>not operated by me<\/em>\nbut a <a href=\"https:\/\/www.switchbru.com\/dns\/\">third-party<\/a>, so proceed at your own risk.<\/li>\n<li><strong>Save<\/strong> the settings and then tap <strong>Connect to This Network<\/strong>.<\/li>\n<li>The Switch will tell you that <strong>Registration is required to use this network<\/strong>. Tap <strong>Next<\/strong>.<\/li>\n<li>On the page that opens, make your way to <strong>Google<\/strong>.<\/li>\n<li>Search for <strong>&quot;chrome dino tomayac&quot;<\/strong>. This should lead you to\n<a href=\"https:\/\/github.com\/tomayac\/chrome-dino-gamepad\">https:\/\/github.com\/tomayac\/chrome-dino-gamepad<\/a>.<\/li>\n<li>On the right-hand side in the <strong>About<\/strong> section, find the link to\n<a href=\"https:\/\/tomayac.github.io\/chrome-dino-gamepad\/\">https:\/\/tomayac.github.io\/chrome-dino-gamepad\/<\/a>.\nEnjoy!<\/li>\n<li>\ud83d\udea8 For regular Switch online services to work again,\nturn your DNS settings back to <strong>Automatic<\/strong>.\nConveniently, the Switch remembers previous manual DNS settings,\nso you can easily toggle between <strong>Automatic<\/strong> and <strong>Manual<\/strong>.<\/li>\n<\/ol>\n<p>For the <a href=\"https:\/\/tomayac.github.io\/chrome-dino-gamepad\/\">Chrome dino gamepad<\/a> demo to work,\nI have ripped out the Chrome dino game from the core Chromium project\n(updating an <a href=\"https:\/\/github.com\/arnellebalane\/trex-runner\">earlier effort<\/a> by\n<a href=\"https:\/\/arnellebalane.com\/\">Arnelle Ballane<\/a>),\nplaced it on a standalone site, extended the existing gamepad API implementation by adding ducking\nand vibration effects, created a full screen mode,\nand <a href=\"https:\/\/github.com\/mehulsatardekar\">Mehul Satardekar<\/a>\ncontributed a dark mode implementation.\nHappy gaming!<\/p>\n<p>You can also play\n<a href=\"https:\/\/tomayac.github.io\/chrome-dino-gamepad\/\">Chrome dino<\/a>\nwith your gamepad on this very site.\nThe source code is available\n<a href=\"https:\/\/github.com\/tomayac\/chrome-dino-gamepad\">on GitHub<\/a>.\nCheck out the gamepad polling implementation in\n<a href=\"https:\/\/github.com\/tomayac\/chrome-dino-gamepad\/blob\/885eb6134805345bf31eeb9971830adeb84747ab\/trex-runner.js#L529-L571\"><code>trex-runner.js<\/code><\/a>\nand note how it is emulating key presses.<\/p>\n<div style=\"height: 420px; width: 100%;\">\n  <iframe src=\"https:\/\/tomayac.github.io\/chrome-dino-gamepad\/\" title=\"Chrome dino gamepad\" allow=\"gamepad; fullscreen\" style=\"height: 100%; width: 100%; border: 0;\">\n  <\/iframe>\n<\/div>\n\n\t\t\t<p>\n\t\t\t\t<img alt=\"Thomas Steiner\" width=\"32\" height=\"32\" src=\"https:\/\/blog.tomayac.com\/feed.php?dl=https%3A%2F%2Fblog.tomayac.com%2F2020%2F11%2F04%2Fplay-the-chrome-dino-game-on-your-nintendo-switch%2F&dp=%2F2020%2F11%2F04%2Fplay-the-chrome-dino-game-on-your-nintendo-switch%2F&dt=Play%20the%20Chrome%20dino%20game%20on%20your%20Nintendo%20Switch\" alt=\"\">\n\t\t\t\t<br\/>This post appeared first on <a href=\"https:\/\/blog.tomayac.com\/2020\/11\/04\/play-the-chrome-dino-game-on-your-nintendo-switch\/\">https:\/\/blog.tomayac.com\/2020\/11\/04\/play-the-chrome-dino-game-on-your-nintendo-switch\/<\/a>.\n\t\t\t<\/p>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\t\t\tI have landed an article over on web.dev<br \/>\nthat talks about the Gamepad API.<br \/>\nOne piece of information from this article that our editorial board was not comfortable<br \/>\nwith having in there was instructions on how to play the Chrome dino game on a Ninten&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"intlwemo_wallet_address":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-3339","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3339"}],"version-history":[{"count":4,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3339\/revisions"}],"predecessor-version":[{"id":3404,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3339\/revisions\/3404"}],"wp:attachment":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}