Photo by Addy Osmani on Unsplash
Hi!大家好,今天來教大家如何玩壞Google Chrome小恐龍,這款Chrome離線小恐龍跑酷遊戲,一般是在開啟Chrome瀏覽器並在離線狀態下可以玩到的遊戲,其實也是可以在連線狀態下玩的,只要開啟Chrome瀏覽器輸入以下網址:
chrome://dino
就可以在連線狀態下玩Chrome小恐龍,意不意外開不開心,接下來再來教大家如何讓可愛的小恐龍不畏懼仙人掌迎面而來的恐懼,直接無敵穿透,請先按下F12,點選”主控台”:
Runner.instance_.gameOver = function(){};
輸入完畢按下Enter,在繼續遊戲後就會發現我們可愛的小恐龍已經呈現無敵狀態,什麼你說無敵後覺得小恐龍移動的速度太慢了,來來來同樣點選”主控台”並輸入以下程式碼,保證讓小恐龍跑的跟飛的一樣快:
Runner.instance_.setSpeed(20)
括號內的數字越大小恐龍跑的越快,瞬間成為恐龍界的閃電俠,話說看著小恐龍一直往仙人掌撞也滿可憐的,讓我們寫段程式碼讓他看到仙人掌會自動往上跳,按下F12,點選”主控台”輸入以下程式碼:
function keyDown(e){Podium={};var n=document.createEvent("KeyboardEvent");Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keydown",!0,!0,document.defaultView,e,e,"","",!1,""):n.initKeyEvent("keydown",!0,!0,document.defaultView,!1,!1,!1,!1,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)}function keyUp(e){Podium={};var n=document.createEvent("KeyboardEvent");Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keyup",!0,!0,document.defaultView,e,e,"","",!1,""):n.initKeyEvent("keyup",!0,!0,document.defaultView,!1,!1,!1,!1,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)}setInterval(function(){Runner.instance_.horizon.obstacles.length>0&&(Runner.instance_.horizon.obstacles[0].xPos<20*Runner.instance_.currentSpeed-Runner.instance_.horizon.obstacles[0].width/2&&Runner.instance_.horizon.obstacles[0].yPos>75&&(keyUp(40),keyDown(38)),Runner.instance_.horizon.obstacles[0].xPos<20*Runner.instance_.currentSpeed-Runner.instance_.horizon.obstacles[0].width/2&&Runner.instance_.horizon.obstacles[0].yPos<=75&&keyDown(40))},5);
輸入完畢按下Enter,再繼續遊戲發現我們小恐龍不在直直往前衝,看到仙人掌終於懂的往上跳,突然有種吾家有女初長成的感悟,終於不在需要依靠父母。。。的雙手,自己也懂的遇到障礙要躲開了。
這時候有人說小恐龍玩膩了,可以將角色換成瑪利歐嗎?當然沒問題,接下來就教大家如何將小恐龍改成瑪利歐,首先我們需要將小恐龍的素材圖片抓下來修改,分別將下面兩段碼複製下來開新網頁並複製到網址上按下Enter:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABNEAAABkBAMAAABayruYAAAAJFBMVEUAAADa2tr/////9/e6urpTU1O5ubn39/f///9ZWVlfX1/z8/O/OctmAAAACXRSTlMA//////////ZO3iNwAAALPElEQVR4AezdwY6bShMF4GP6krX9Bqgk9kiI/SzyAAir9lnlFfL6N26OWhXckDae9mClj/L7L1czMMbfbYDMOCgpKSkpwelyRmIEd6mEhTQpDabvu1C7vsf2ALM6cLlctquVtq2YDwC1jrfHEVDV8fagvln7p7XOlUKVi9SKWrncY5GQnN0DhLuZ1HZJa7WZPemU0GCc6hUMBtVue4BZHeD3v1caTn9KIyiPSimIvjw8SqtDVaQlvKrT2e91JEVUsEilOtGTNkkNUglWnFLX1oDrWSwGSOZ8V91CRczFDnBkWVEaKG0WBISZDPOTeeD2MIZK/Sz4YESUkbxdRhlkTXTrJ74d+aQ1bFRPSRvYjUuLmLOKmNjIch3/fQesGygrHW/SyO2WWzWmSyvSHjpVE1WJSWsIqwJk0agmSmsb39gnzbGKSaOXyJTGKmFSA6vvv/Nh3NQaDpyjPWaCp22mt0+ahkj+LlTzU4tu3Ujjrt4nrZoIq20qlT8brW/4k7S5sQGq73ZJO+M5aawjc5pHRmmYLxMozY/64llp8oAeeaQrMWkir5EGnSPLg8aZ6O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AAKDQdCh3H5Q+7xb4P+wHZ2tQAAAA7Vkzi/j7KUfuLwPGORqK+BbbqrqTuU9JMqVuzexUOQAAoOA/EuqhCXm/z/IYtAEAAK+fR7mNK/bpY3Qf9o0BAMDescO4CwAAgOnYYfzJ8ysBAADQDhhYub4JjQEAAKDpXwgVKGwAAIA6pkV/iXhy+epVS0TUc7Y6JzUjBQAAwHTM9U0MLwEAAOAvb8W65YWQFN5fO8dWAAAArOlX8VgSmtX1uvDYv3elAAAAOOjitZB3Ba8TAgAAoI5paeGDI/VDz4S0qDfOiaJzjXPS9LacX9Aj504AAGA65uM2BgAAAO/HWk/vx7i7LRpZWl3JipxuPJard46lnjOlaqYCOVcAAADTseiDn3Q6to4BAAD4eEhVKdYvbZ+ctPe2NOXW+Y+pRg4AANiTPzvXohQ80BIAAGA71wZL/XHlfM6EVMW0ATkAAOD4OrY0heT1nq8Ytagu57uYaWNpk20MAACAgy5CXnw3AAAA+MpN+F4OtYqcGGZElZPGcAwAANxaG5WsUCGiaFGj214sHEvaGAAAuLU2u69+WbEg9CkihqUuVuQkbQwAANyZj3pUi683Qp2o21iXUy0qpYw2BgAAbsunTnFdVOtzXPHWtrEP/ZKt3kCWekh9CAAA4Dr8WY8KSfJ+UbxsY0Wv876J+Ts5aYzGAADA7RT769suh7YuiienX0SV08/HZHUZYzZ2DwAAUMeKQrZoqMgJySVFP2KrC9modHnIpc+/eh8CAAC4Fi+24v8Rk2WsL3bR/+e8ePwBAAC4PFOpTRSoI3P+0x+/VWpybRNaTpfTpFO9HwAAsI2rtGjCgTm/BQAAcB+mW2vy7bOfk+U0STrZzwUAAOY1ATgnAADTMfrmcracLuEs7wcAADAdAwAAuLD/AQPLUxmjjeldAAAAAElFTkSuQmCC
就會出現小恐龍所使用到的圖片素材:
將滑鼠游標移到圖片內按下滑鼠右鍵選另存圖檔,兩張一大一小都抓下來,以下來說明素材各區段使用在小恐龍遊戲的解說:
了解到各圖片區段的功用後,再來就是尋找瑪利歐兄弟的素材,這時來介紹懷舊素材網址The Spriters Resource,在網站上蒐集了數量不斐的懷舊遊戲圖形素材,可以用在個人學術研究與非商業用途上,請由下方網址進入:
https://www.spriters-resource.com/
進入後可以很輕易的找到瑪利歐兄弟的相關素材,將想要替換的圖片載下來使用習慣的繪圖軟體開啟,並替換掉原本小恐龍內的圖形如下:
- SuperMarioBros1x.png (1233 x 100)
- SuperMarioBros2x.png(2446 x 194)
載下來的兩張小恐龍素材圖片都需要替換,修改完畢後請將圖形分別存成SuperMarioBros1x.png(小圖)與SuperMarioBros2x.png(大圖),然後將這兩張圖上傳到您常用的網頁空間,筆者是使用Pinterest圖片空間,網址如下:
https://www.pinterest.com/
上傳圖片後就可以查到圖片網址:
https://i.pinimg.com/originals/d8/b5/39/d8b539d8d52aaa8f1a714b87de9ca088.png
https://i.pinimg.com/originals/48/1b/3b/481b3bed6539da351d1d8af7642f9b6f.png
再來將小恐龍遊戲圖片位置指向我們空間內的圖片位置就可以,請按下F12,點選”主控台”並輸入以下程式碼:
document.getElementById("offline-resources-1x").src = "https://i.pinimg.com/originals/d8/b5/39/d8b539d8d52aaa8f1a714b87de9ca088.png";
document.getElementById("offline-resources-2x").src = "https://i.pinimg.com/originals/48/1b/3b/481b3bed6539da351d1d8af7642f9b6f.png";
輸入完畢按下Enter,再繼續遊戲後就會發現小恐龍遊戲瞬間變成瑪利歐兄弟跑酷遊戲,如果想要換成別款懷舊遊戲只要依照以上修改方法,就可以玩到不同類型的懷舊跑酷遊戲,以下是修改其他款懷舊遊戲的程式碼,有興趣的同好也可以玩玩看。
document.getElementById("offline-resources-1x").src = "https://i.pinimg.com/originals/a2/9a/0c/a29a0c0021dcf4907ebd95bd4b9453fd.png";
document.getElementById("offline-resources-2x").src = "https://i.pinimg.com/originals/84/5c/f7/845cf7109a23f2431196a6cdf9f336af.png";
document.getElementById("offline-resources-1x").src = "https://i.pinimg.com/originals/ff/f6/b6/fff6b697dfea8fe032811549671c1cab.png";
document.getElementById("offline-resources-2x").src = "https://i.pinimg.com/originals/a0/87/89/a087891bd09f3dac04cb447b755c7e8f.png";
學會這些技巧後,期待有更多同好可以魔改其他遊戲,並分享出來,期待您的作品,以上是本次的分享,希望大家會喜歡,我們下次見。
參考資料: