Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】Nostalgist.js 在浏览器中运行怀旧游戏主机模拟器的JavaScript库,例如运行任天堂FC(小霸王),世嘉MD,街机等等 #3830

Open
arianrhodsandlot opened this issue Jan 1, 2024 · 0 comments
Labels

Comments

@arianrhodsandlot
Copy link

Nostalgist.js

Nostalgist.js是一个在浏览器中运行怀旧游戏主机模拟器的JavaScript库,例如运行任天堂FC(小霸王)模拟器、世嘉MD游戏机模拟器、街机模拟器等等。

链接

效果预览

console demo


这个库基于RetroArch项目开发。其目的是简化在浏览器中用JavaScript代码启动模拟器运行怀旧游戏的过程。指定一个 ROM 文件和一个模拟器核心,游戏就能直接启动。还可以通过JavaScript代码控制存档、读档、按键等等。

例如:

import { Nostalgist } from 'nostalgist'

// 运行模拟器启动游戏
const nostalgist = await Nostalgist.nes('flappybird.nes')
// 存档
const state = await nostalgist.saveState()
// 读档
nostalgist.loadState(state)
// 模拟按手柄上的start键
nostalgist.press('start')

更多例子与说明可以参阅文档网站:nostalgist.js.org

@ruanyf ruanyf added the weekly label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants