Skip to main content

No project description provided

Project description

If you have any questions, or just want to chat, join us on Discord.

It is highly recommended to read the report to get a light introduction to Game Boy emulation. But do be aware, that the Python implementation has changed a lot. The report is relevant, eventhough you want to contribute to another emulator, or create your own.

If you've read the report and want more explicit details, have a look at the Pan Docs.

If you are looking to make a bot or AI, you can find all the external components in the PyBoy Documentation. There is also a short example on our Wiki page Scripts, AI and Bots as well as in the examples directory. If more features are needed, or if you find a bug, don't hesitate to make an issue here on GitHub, or post on our Discord channel.


Rewind any game
Beat world records
Train with Reinforcement Learning

Installation

The instructions are simple if you already have a functioning Python environment on your machine.

  1. Install PyBoy using pip install pyboy (add --user if your system asks)
  2. If your system isn't supported by pysdl2-dll, you'll need to install SDL2 from your package manager.

If you need more details, or if you need to compile from source, check out the detailed installation instructions. We support: macOS, Raspberry Pi (Raspbian), Linux (Ubuntu), and Windows 10.

Now you're ready! Either use PyBoy directly from the terminal $ pyboy file.rom or use it in your Python scripts:

from pyboy import PyBoy
pyboy = PyBoy('ROMs/gamerom.gb')
while not pyboy.tick():
    pass
pyboy.stop()

Or using the context manager:

from pyboy import PyBoy
with PyBoy('ROMs/gamerom.gb') as pyboy:
    while not pyboy.tick():
        pass

When the emulator is running, you can easily access PyBoy's API:

from pyboy import WindowEvent

pyboy.send_input(WindowEvent.PRESS_ARROW_DOWN)
pyboy.tick() # Process one frame to let the game register the input
pyboy.send_input(WindowEvent.RELEASE_ARROW_DOWN)

pil_image = pyboy.screen_image()
pil_image.save('screenshot.png')

The Wiki shows how to interface with PyBoy from your own project: Wiki.

Contributors

Thanks to all the people who have contributed to the project!

Original Developers

GitHub Collaborators

Student Projects

  • Rewind Time: Jacob Olsen - JacobO1
  • Link Cable: Jonas Flach-Jensen - thejomas
  • Game Boy Color: Christian Marslev and Jonas Grønborg - CKuke and kaff3

Contribute

Any contribution is appreciated. The currently known problems are tracked in the Issues tab. Feel free to take a swing at any one of them.

For the more major features, there are the following that you can give a try. They are also described in more detail in the project list:

  • Link Cable
  • (Experimental) AI - use the botsupport or game wrappers to train a neural network
  • (Experimental) Game Wrappers - make wrappers for popular games

If you want to implement something which is not on the list, feel free to do so anyway. If you want to merge it into our repo, then just send a pull request and we will have a look at it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyboy-1.5.2.tar.gz (5.6 MB view details)

Uploaded Source

Built Distributions

pyboy-1.5.2-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10Windows x86-64

pyboy-1.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (25.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyboy-1.5.2-cp310-cp310-macosx_10_15_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

pyboy-1.5.2-cp39-cp39-win_amd64.whl (9.3 MB view details)

Uploaded CPython 3.9Windows x86-64

pyboy-1.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (26.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyboy-1.5.2-cp39-cp39-macosx_10_15_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

pyboy-1.5.2-cp38-cp38-win_amd64.whl (9.3 MB view details)

Uploaded CPython 3.8Windows x86-64

pyboy-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (26.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyboy-1.5.2-cp38-cp38-macosx_10_15_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

pyboy-1.5.2-cp37-cp37m-win_amd64.whl (9.2 MB view details)

Uploaded CPython 3.7mWindows x86-64

pyboy-1.5.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (24.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyboy-1.5.2-cp37-cp37m-macosx_10_15_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

Details for the file pyboy-1.5.2.tar.gz.

File metadata

  • Download URL: pyboy-1.5.2.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyboy-1.5.2.tar.gz
Algorithm Hash digest
SHA256 f8e00ebf525a2cce0aba04863cc558a566982e90a3afe065d84972279c45a018
MD5 1e9b925d4250a8f05c80fdb3fc8a64fe
BLAKE2b-256 ef827c3c9f9bd916b4453793a15ffc938bdc829e5d6bd34454ba6061c728e57a

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.5.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pyboy-1.5.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ab9543725f151c86dafd4d09b9d4d2f6b96c712f6310ca381e1881791923221e
MD5 bcecd5580eaae0dadf47f142153c6598
BLAKE2b-256 a3e1dea5aa6edbe772100f1f5d4c71f44ed4ca11cc6c831b4efae613c1fecb57

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3df174d8eabe84299461f3b617b2a4b253c20cfd0298b8f5e6114fa3b56d5421
MD5 a9618a07af86b2c477f5996cac303dad
BLAKE2b-256 0fa0843fc5bfb2b6daa798ca4bb728be5433468fa675a24191f80d0f9b847145

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5e1239c4a9b1c6d6555bf4501d2e5394e321599b139445a679a72cf06aada58b
MD5 f8ace39ccf2534e5ad7a8787ab669bee
BLAKE2b-256 eebcf84de23b73b4b8a899ff206b3e63d9a6b60aba0131ca12eea27cb9a87b93

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.5.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyboy-1.5.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c4e9ebf66c8fe2067c3552d231765ec478505dbdc25e7c623660c89147fc772c
MD5 0609b0b52a8bbcd532fce413cdf1ec29
BLAKE2b-256 171badd7442a391952023a8df28f2e8cbd0792e370151b2f7a4f48db2ab46e1c

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 66859e3ebc04044b851327e8cd6b888de44e81d4b79c5d6c1f605f898e5cf1ab
MD5 9217d4044bdec8c6b5bb1bdc03547227
BLAKE2b-256 730707c460757383cb70ea6f0ceb41764b0ad5ac96c9e14d35c41889fa539b7f

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e5a6eccc3dba1c86b6252f13e3095475c8a2fe909e0681ecb8fe65ac0ff55c5b
MD5 351d8470315ab666635dfa0ad38a2567
BLAKE2b-256 6a9f19ba5e10f2e214c32830a8d749875e4fcf7f3438b3c424fb86b5cc41bc73

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.5.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyboy-1.5.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b9ab5ef495db283af059a8d6bfc4b2ca34834c4d27d69e316e07dab6e72183d3
MD5 b759b42755d0a6798976ce459b9434f8
BLAKE2b-256 80fbd22de7771aeb3916bd416258ea4a9b04db18936c4bfb89a1c1c2c5009147

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 63ce57aa4117c15e6827fd5518ed900bc5d7048c17efb52dc0311599a18fcaba
MD5 2b47884c76fbdac27e657cfa501a067a
BLAKE2b-256 86abaa02f806b374ccdee4aef0adeed97133bfddf6ecae8899a65a4f55776464

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 46c57a784c3814151e7b69f339881ebe065a9d65a7d664634a0bd1f2d65da71f
MD5 0f219980cddfe24c0b8d5cf0d3b2201e
BLAKE2b-256 320718990d805f9a0c5b2d24b2feb82e90cd3bc3108adb72dd1d51a0a0c09f31

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.5.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 9.2 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for pyboy-1.5.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 bd71460274700c4adf17e0526744396b9864f7b2f43e9ec1af0142cc2bfa3939
MD5 e6224ba5df76be321b2f30662f45e6da
BLAKE2b-256 636c220fa6e5010937267a8534cd86741d5a72cb753b45e83db4f6e67e0fbfb1

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9675eedb331a9a8006110c3ffb9e16ae07b0c3ef15cceb4ee782b62fb006941
MD5 27ce7122b10a9cb391d4b580d4bc8f15
BLAKE2b-256 6689abb5422aa145192461d440609aacb608d1ed1571f04fbbfa8e1491e26074

See more details on using hashes here.

File details

Details for the file pyboy-1.5.2-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4624022e52f6d2b401c5f9df40678137cc8025d462ec735edcfb6d6235d638bb
MD5 e6e7a505b4934ce11abe8bc1c1b560e5
BLAKE2b-256 6ffc27023a35f8aa517c24b50d2b89d7a6917a43dc14295a4950efe63741da7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page