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.5.tar.gz (5.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyboy-1.5.5-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11Windows x86-64

pyboy-1.5.5-cp311-cp311-macosx_10_9_universal2.whl (12.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

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

Uploaded CPython 3.10Windows x86-64

pyboy-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (25.9 MB view details)

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

pyboy-1.5.5-cp310-cp310-macosx_11_0_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

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

Uploaded CPython 3.9Windows x86-64

pyboy-1.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (26.2 MB view details)

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

pyboy-1.5.5-cp39-cp39-macosx_11_0_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

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

Uploaded CPython 3.8Windows x86-64

pyboy-1.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (26.5 MB view details)

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

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

Uploaded CPython 3.8macOS 10.15+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

pyboy-1.5.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: pyboy-1.5.5.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pyboy-1.5.5.tar.gz
Algorithm Hash digest
SHA256 cb2c39a4a58a755e20da3133827ba86b9c5287792dabe7a641609c0e20c55d87
MD5 ddafeb6203988840fbcc3d3eba61bcc0
BLAKE2b-256 3b7415ffe2692fcee51233ef59951cc518b25a90a02fa2f2ef6ca40375f3b695

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.5.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pyboy-1.5.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4ce2b6a68c0aa88061c6dd198391ecffcc0f3133bfce39011458f871d49c027e
MD5 1a82227cb7761193fb3fa3b8956afc0e
BLAKE2b-256 a983fa6067e118a6fa270971a0e04b0fba40bebb30f8232401deab3373dce7d1

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyboy-1.5.5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8130c5b2a5a047c87872c552fae4119fb280cb3217cdb48b18b4709e45d748e7
MD5 ffcbc600ba5b84cbbeea59523cf9c446
BLAKE2b-256 aa538bf127e099a3ebe2e476125510a7c9429cd1f390afdc628fa3a17bc301f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.5-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.2 CPython/3.10.10

File hashes

Hashes for pyboy-1.5.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5a979b0125784e9ec37c9071966ecada440ce1fbc2b8c884f993339724bb2abf
MD5 7c0205708417e51b1e0662951d85ac33
BLAKE2b-256 cd6efbb4276c8a23adc88640a6c86665b3ab6a0320d0f7699e8bf8f1c8d1189a

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-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.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10a34066d3983898739bdbcfd7dbe7b7ec0e34fcaff4a482f3f0025b0e1c76d6
MD5 7d6b02d779143e8dad528aeb49d1ca20
BLAKE2b-256 7320a7d929630dc998baa1d7318f543b0772adddae14af292b1e19f03bae516d

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.5-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3c2651c281efb6aa1a04f7fa6703fd33192f1b8754aa709d58ce26f5ba7a6cf5
MD5 21baf17ada52f7092a9f3b5309e3ae7b
BLAKE2b-256 184ace07aeece9cbd74e8420779df264ad3937b46d5b37c716be1fc427272f38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.5-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.2 CPython/3.9.13

File hashes

Hashes for pyboy-1.5.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 992209f511f8f8b7d8ed8c418b338bab2375cd2f487c5a3bc4ea6b1f17c5c039
MD5 baaac1a257f83636a6557ae31f287420
BLAKE2b-256 a1c84f2de583f298f48620bd2202c0ac0e21cf50ca8a368fe33c6dffd2999aff

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-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.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6611cf97b5506e83042537ed2e86a2be482c14aa489bb173b6ef833bde0f0abb
MD5 54c70022fa4c1d9b8df1c777c22b4244
BLAKE2b-256 d807d617b17ed126d04f4df853e2efcc021192f3f501c754498b3dcd8e1a95f8

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.5.5-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ef2f2a99d62a193f5b0ef5107c5abda2d64775452cc60d077701b89f7c58176f
MD5 d069cbccdbb31a29716503f6c0ec6d24
BLAKE2b-256 d18c188524eacf87dc4c57d3b0e81393ce333d825f25f074467af20a260855ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.5-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.2 CPython/3.8.10

File hashes

Hashes for pyboy-1.5.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c91fb22789244c4950413d108f901e265e0cfd60e5263388ee24f512b66b07fe
MD5 5d88a4a764258aa9ae5e57e7671dfa7d
BLAKE2b-256 34d423f1a6d86eb6e93111ef447ba1835fb30ff48645e565a733707c96095c48

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-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.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b872ffd3b07e18b9bfb4b13b9e4c563ca5718a60eef2a8665c1d0cd8f40ac46a
MD5 1e1990399c0882e98411943b64af9032
BLAKE2b-256 fcc4c0296a749e4dea62784c818d05a67dfe935e163af6e7100d5467d2a02678

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.5-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 489521ca95f01546b2e4397e1d59f0518a243075c3717011e922867d90f58b69
MD5 9a4023eda0b1d4c3460f2e65171e2469
BLAKE2b-256 4c03c54dd11d00cbab6b94c34f30d825456bc129b10fadda1c654f8d101d5c21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.5-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.2 CPython/3.7.9

File hashes

Hashes for pyboy-1.5.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 09313bfbb8b0e63ed4f048f107fd8928d956d610e4bc492bc2dace61def85a66
MD5 3f2e4e9c50ed08978c21242ffb4581ac
BLAKE2b-256 f30f3496f5914eb17cdafe7528eecbaf9aaa670a8e7d70fd296f1e407ed21914

See more details on using hashes here.

File details

Details for the file pyboy-1.5.5-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.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3eab9f3fc24526cb866fa107fa2dddbfeebcb85400a012bf5f2360274ba63505
MD5 01ea3d019d086f9506a8b803e1efe2d3
BLAKE2b-256 4247a4717b0469f4601bbd5ba0a909808ad87d09e639e162a18a19d3ec580ef1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.5-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 67980abbd059702f263da624a2a7294007547d9694220977fe8ed27cf1357b42
MD5 bef2ac5f1115ade71cf480407aaa58cd
BLAKE2b-256 105f723965646b30b0bc58ed43ac9258085d55a81e17a743c2c30cc1722d078a

See more details on using hashes here.

Supported by

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