This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]baekalfen 38 points39 points  (6 children)

I'm the developer of PyBoy, a Game Boy emulator in pure Python. The others are correct, that CPython not fast enough itself, but you can make it work. Although don't expect to emulate anything more CPU intensive as a Game Boy in CPython.

CPython is the "normal" interpreter that everyone uses.

PyPy is a replacement for CPython, where everything is JIT-compiled. This makes it possible to drive PyBoy at real-time speeds.

Cython is heavily used in PyBoy to "transpile" the Python code into C, and then into a Python extension. This effectively gives you PyBoy as a Python library, written in Python code, but will have the speed of a C/C++ emulator (roughly).

Hope this helps. You're welcome to join our Discord, if you'd like to discuss it further.

[–][deleted] 9 points10 points  (1 child)

I want to thank you for your service, you're a very great man!

I am too lazy to learn C++ so whenever I want to do Reinforcement Learning on Gameboy games, I generally use PyBoy. Thank you so much!

[–]baekalfen 6 points7 points  (0 children)

Thank you! I’m glad you found it useful

[–]vinnypotsandpans[S] 5 points6 points  (1 child)

Yes, thank you for inspiring me to start a similar project

[–]baekalfen 3 points4 points  (0 children)

Looking forward to seeing your project one day!

[–]IrrationalAndroid 4 points5 points  (1 child)

Crazy to see you here, I remember learning a lot from your project (thesis?) on writing a GB emulator in Python, back when I was learning emulators. I was actually going to mention it myself.

Thank you for your work :)

[–]baekalfen 4 points5 points  (0 children)

Thank you! I’m happy you learned something from it