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.3.tar.gz (5.6 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.3-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11Windows x86-64

pyboy-1.5.3-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.3-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10Windows x86-64

pyboy-1.5.3-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.3-cp310-cp310-macosx_10_15_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

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

Uploaded CPython 3.9Windows x86-64

pyboy-1.5.3-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.3-cp39-cp39-macosx_10_15_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

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

Uploaded CPython 3.8Windows x86-64

pyboy-1.5.3-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.3-cp38-cp38-macosx_10_15_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

pyboy-1.5.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for pyboy-1.5.3.tar.gz
Algorithm Hash digest
SHA256 a74fb3b540f02764aa6a42886e74f4bb0a0cd27928e919e134b9e88a01fdb658
MD5 2f16028d232a6d08263de89780a37e40
BLAKE2b-256 c856e252e225636cb894d75982d6ba612f2366f57b0286ab2e0a4c140413e7cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.3-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.1 CPython/3.11.0

File hashes

Hashes for pyboy-1.5.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 466819d7d9f91ef36d212dcf8706c647654abbe48840e7a44080f3763d0f64fb
MD5 ae9bb80757bca3bab6398f8cdd05ae89
BLAKE2b-256 d5dbfeed8d2045451fd53139577683081be4117b579fca30fc1fd77eddfcedce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 26d1ad3ae0cc535c9ea56aad6af23d2c8c4e9f4e8f14a8508c20d6e4613e38bf
MD5 8f9631f7eebecd3cf7e5bb4271cc75d2
BLAKE2b-256 f29def8dd8b58dcfa71c188ade7c29ddf28903fcbebbece6c35baf1cb8842032

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.3-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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bff4ab2e90c16aaff8100a70849fea81bf69d92685b5d897c2024b49a0d7c395
MD5 ac1ab71c9cb31eafc18271dc94c0906d
BLAKE2b-256 f3e0348d5315f2d220926d88ab9902efc528695716a49e98bc146460c9579533

See more details on using hashes here.

File details

Details for the file pyboy-1.5.3-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.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42de6b3d86b1d0abb0a3e136b3010fe667a1776227e71f6312d9b2e78eff98ba
MD5 79f7575b3e59e1b2debcf31b8e4ad94f
BLAKE2b-256 fb4052d58a31016b2fe88af402106b85b22be9413fb2da1f17fe3f41740db87f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.3-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ec377d36490dcfbbd73236eec31192574c8138a6c49897ce346fede0ed7702e8
MD5 96e3f15b3f67963e9241e1f7a6b14ea9
BLAKE2b-256 3d2851cdcfab889d933bdf78a7c6f6937276c6ef4b179dbfd0dacc3a1aa998ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.3-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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ca9433fb9b27598a5ec17f463ef822b38d07eb252df68948e7b6dbdc9b65cd3c
MD5 79184f2638d7310aecda7dc4a0e5120f
BLAKE2b-256 d112d6b0cef1243740e99753e51ede9bbe9dbff6c759b7cb710f8e8bcbd45d32

See more details on using hashes here.

File details

Details for the file pyboy-1.5.3-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.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 837381bebb077b731372beb57cad4fcbc5d9bcab26255ad4fc340435ce226b07
MD5 e7067e187319e7b77771fa2ffc31d639
BLAKE2b-256 b1846dcaa9b0f44db6b4bd82b146e67c2588b912adf7314341eaa4244423fe37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.3-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f0989d1588bf1f17e776b5a96cda659ce0499e20d526a465c3731bc3e7a1721c
MD5 bf30cf471b1cb0fecebefb5482fe9576
BLAKE2b-256 e4d019456c60fa4348a14fc71e7c4a6a44665a85f6310db595a386a6bd1a5d7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.3-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.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fd55c9913160b0fb8cf912297f165df93896c5cd07270c9e5dfcc046520e3811
MD5 bd0b9bb79024b2a47125004ab026b7f3
BLAKE2b-256 41f29ea4847171ddbbeb57eefeb9270105f13f9df63c2d9a0e3ffca3d11bb69f

See more details on using hashes here.

File details

Details for the file pyboy-1.5.3-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.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a00e8a51683c9f808532e04c0314d828a1891435a0b5b1dc5ba9ed303e62ea63
MD5 cfe16aa08a8b0cbf92bf282e7b1ea69e
BLAKE2b-256 dda794aafa59cfb6c01b08af2eb7235af318a529d28af72033c2765913adf9a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.3-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d003d3509936a9d603531768a9512edf2c9c08615d888ff006302270720948c7
MD5 82083bd40c7a63d4fd2cddfda7edcd78
BLAKE2b-256 fdda7ec73f7efb3fcc879f8db0ea60967623d6659dbcb3dadf1ed884419d82ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.3-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.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f2247bc4399f5cebfee4e1e1af7796bfb4b7310d0c93f2948e7a9b26241145b7
MD5 cd0a229c8f02b3b66d13f6debcb957d1
BLAKE2b-256 8e91f20e95e12634ee00fa8e4ad52c869529d03ee85d0dd2e4ca307ee87b1f6c

See more details on using hashes here.

File details

Details for the file pyboy-1.5.3-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.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7c06e2dd7bcbbfb37e0cc7fcd16f6b1bdb7f9042911bc9742cb800945e582622
MD5 4eeefa79ffc46d78ef32ace775f59793
BLAKE2b-256 2b34330804275549f745ff9da53751fb084320aeeb1abdbcd94431d3494cb8c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.3-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 402b68887e4bbf7c37f969e6443c2878d29947298ba2bb2e75111fb2e86ef602
MD5 39ec418474318a6ed98faef1ce1b63a0
BLAKE2b-256 1b92478cd62b53a5d98e7b6a5f4df328770ef97b10d0e1d5db758be087c24a71

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