sword

PyBoy - 用Python编写的Game Boy模拟器
简介一个基于 Python 的 Game Boy 模拟器:PyBoy ,作者是哥本哈根大学一名学生 Mads Yn...
扫描右侧二维码阅读全文
24
2020/04

PyBoy - 用Python编写的Game Boy模拟器

简介

一个基于 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
Last modification:April 25th, 2020 at 09:32 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment

One comment

  1. wukei   ( Windows 10 x64 Edition Windows 10 x64 Edition / Google Chrome 122.0.0.0 Google Chrome 122.0.0.0 )

    不得不说666