今天,要给大家介绍一款摸鱼神器,把 VS Code 变身小霸王游戏机!
1、下载安装
直接访问下列链接:
https://marketplace.visualstudio.com/items?itemName=gamedilong.anes
或者在VS Code插件市场搜索“小霸王”,然后安装即可。
2、开始摸鱼
在安装好“小霸王”插件后,在左侧活动栏可以看到一个小霸王游戏机的图标,点击就能显示出小霸王的游戏列表。在 Remote 列表中,就可以把游戏下载到本地了!

在 Local 列表中,单击选择你想玩的游戏,开始自由飞翔吧!
(友情提示:玩的时候,记得打开一些代码文件,方便快速切换,摸鱼不被发现!)

除了默认已经下载的超级马里奥,还有大量游戏等你玩!满满的童年回忆啊!
坦克大战

马戏团

魂斗罗外传

超时空要塞

淘金者

双截龙

1942

上面的这些游戏,你都玩过了吗?
3、实现原理
那么,你也许会有疑问了,这么棒的插件是如何做到的呢?
想必大家都知道,VS Code 是基于 Electron 开发的。虽然 VS Code 插件并没有 DOM access 的能力,但在编辑区域,VS Code 开放了 Web View API。通过基于 JavaScript 的 NES 游戏模拟器(https://github.com/bfirsh/jsnes),就可以把小霸王游戏运行在 VS Code 编辑区域的 Web View 中啦!
插件原作者也提供了游戏资源的 ROM 仓库:https://github.com/gamedilong/anes-repository,大家有其它好的游戏,也可以多多推荐。
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/5558.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
打赏

微信支付宝扫一扫,打赏作者吧~
休息一下~~