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.4.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.4-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

pyboy-1.5.4-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.4-cp310-cp310-macosx_11_0_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

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

Uploaded CPython 3.9Windows x86-64

pyboy-1.5.4-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.4-cp39-cp39-macosx_11_0_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8macOS 10.15+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

pyboy-1.5.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: pyboy-1.5.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5a2d7a6fbb3c81b989dca7912dd335842a2486c9e308bc194675fc22eaec062e
MD5 493e62c0e7951c3cd8fa9508281811c5
BLAKE2b-256 b2c98c42859ffbfa6dcbbbf2a20bab99007d197ad4038caaa93dc2c8d1099981

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.4-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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 48168160efb95ec739a751ba55dda61db85c4a45a124f530b79d06e8de760423
MD5 eeca6171af38e211f4efad0bc8363dee
BLAKE2b-256 e8112b1eff8c8947fefbd4ff190e5a47c31c7118c5ae52e5f4759d262b6803b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 69025e2bbbc0e5ad72eb71de46605456a677c100af95d7ca1840af05a55624dc
MD5 7a176052533ade38616256210d0cf01b
BLAKE2b-256 08737b45254e42a894858ee074949b625cd83dc52e85fa472383e8c11d39b16b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.4-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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bc0b5b7413f7d0a54b8567b2d8a57558bcee28308c922b61a0290518f64154c5
MD5 5b9de72868fb1bceb7eb6c7d3d96333b
BLAKE2b-256 3f1a8016494e1b21df96545291260e701dfce25bba4fd02d8b66800f90f22931

See more details on using hashes here.

File details

Details for the file pyboy-1.5.4-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.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 996e3b3104a4203008fb23afa9b6f2f6190f2b5b036a786a059b8c2a6ae0ac53
MD5 408f28ada186c4d4606b69710b9502e7
BLAKE2b-256 e82d3c59833a40a794854c9d5263d7c70764ccc193773158190eaed79a298ffb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.4-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 cc07c6c7507179f15ba4de506be8812b8a4796dbed3a420a5e20aad48c604140
MD5 6e61485b139408a55df1b11c0769f5de
BLAKE2b-256 22b8f6408a341f96bc68328cc5958699c3bcd16c4d9b41f6cbf6938755c44c6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.4-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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7922977412642fddd28f5c6d136a7e11b6c4eacf0c562fefc2bf6536e936b4a3
MD5 039555790ff100ad0ef9025418102da8
BLAKE2b-256 e1e68e732a3a14fcc1771772238f55ca295e7a4354d016255f43e305a2b1302d

See more details on using hashes here.

File details

Details for the file pyboy-1.5.4-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.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0cb00ad19fea5b0d4e80566b4c0bfba236854d5b07a61173e9e34a67725e3268
MD5 59c1e04d7788c043cc59291a10d483ef
BLAKE2b-256 294b3ab2a060cabc869e8946c29b402f890518a6c47c5d73683bccd64b116325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.4-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 bf2ebbe8cd20def5c519fda7f55c2502a178fc6ae1c40f3d2e2ff1809e7c3cb5
MD5 2deae50cf49a3e9cc668b6f9d2da3916
BLAKE2b-256 ca9fde0b82f05a6d2d1178c0ca0f77335ab42c6fd2ad3992af1c7de404326ea1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.4-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.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bdafe59a4cefa1880b0d477f04e8196af333474ba7f3702bf2e52a3d441d75ab
MD5 6bb7053f197ef79650e12bd49b0e170c
BLAKE2b-256 101fb42d9cdd746c007e419155ab4e88389a29c90cddcb7980f5b6f3076a79b3

See more details on using hashes here.

File details

Details for the file pyboy-1.5.4-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.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a98f637ced3842dd0565113032d485097c76743c5da7e849fad7087b3b0b1036
MD5 2960a100171638fd93ac86b88314242e
BLAKE2b-256 c62cc0dbd26db964c56a420a144db2a50f536eeac8c216d7f7bb2f328c81f3bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.4-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6fb3c91d365ccab362abd12114cc0e8c3c0a67410cd5b07af5ec352e6d159746
MD5 b62b8986671e4e35ae62a90026d7babf
BLAKE2b-256 98d6bbb5e7890c2b47cb6ef1a4a04f855e3f125fccfe8366532a23ec453941e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.5.4-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.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 bff6ec1912b350c3c31460ae7bc538f893f77aab8ce7b2483f9926ea38159b21
MD5 673402a2a772cdc57159afc6347484c2
BLAKE2b-256 6967130c7e47bd73f5fd747deaf0992d62494fd3b9c59d5f926fd9715a9d2a4b

See more details on using hashes here.

File details

Details for the file pyboy-1.5.4-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.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ad60f0a6ebcf367fc443038c57f0869df4e40261482a148d7e73025142437f1f
MD5 d56efeb767a036a65be568e349ea019b
BLAKE2b-256 01ed6d7b5d84a4f5f4af3beb1d13318336955132de9df5d063de109737b67ee5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.5.4-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0d0e482a0eee2b757fc738863795ee0206c8ed2aefae9747dd47034dcec7e51a
MD5 29235abdabaddd3a2fca645529212b56
BLAKE2b-256 79eed6742137f74293b48080fe9282d9a1e75555f84f55f5de1a804ed4af8716

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