PyBoy - 用Python编写的Game Boy模拟器
source link: https://sword.studio/229.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
sword
PyBoy - 用Python编写的Game Boy模拟器2020/04
PyBoy - 用Python编写的Game Boy模拟器
- Author: sword
- 发布时间:April 24, 2020
- 5366 views
- No comments
- 779 字数
- Categories: 开源资讯 分享
本文最后更新于2020年04月25日, 已超过379天没有更新。 如果文章内容或图片资源失效,请留言反馈,我会及时处理,谢谢!
一个基于 Python 的 Game Boy 模拟器:PyBoy ,作者是哥本哈根大学一名学生 Mads Ynddal 这款模拟器可用来创建 AI 或机器人,让它基于强化学习实现自动打游戏通关等骚操作,像超级马里奥、口袋妖怪等耳熟能详的游戏都可以在上面完美运行。
项目地址:https://github.com/Baekalfen/PyBoy
1、安装SDL2
Ubuntu: sudo apt install libsdl2-dev
Fedora: sudo dnf install SDL2-devel
macOS: brew install sdl2
2、安装PyBoy
pip install pyboy
3、使用
打开命令行终端,输入pyboy file.rom
即可
4、如果要在python里面使用,参考以下示例代码
from pyboy import PyBoy
pyboy = PyBoy('ROMs/gamerom.gb')
while not pyboy.tick():
pass
站点名称:Sword's Blog 杂货屋
本文链接:https://sword.studio/229.html
本博客所有文章除特别声明外,均采用知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
您可以自由的转载和修改,但请务必注明文章来源并且不可用于商业目的
Leave a Comment Cancel reply
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK