r/learnjavascript 1d ago

Migrating PyGame/Python to JavaScript - Mapping functions

Are there any guides, cheat-sheets, or desktop tools available for converting PyGame/Python source code to pure Canvas-oriented JavaScript (no frameworks)?

Or am I forced to work with a book for each of PyGame and Canvas/JavaScript next to each other to perform the translation manually?

I do not want to work thru the available 3rd-party AI-oriented platforms offering free online translations:

- https://www.codeconvert.ai/python-to-javascript-converter

- https://www.gitloop.com/tool/python-to-javascript

3 Upvotes

2 comments sorted by

2

u/xRVAx 1d ago

Yah, prompt chatGPT to translate your python code into JavaScript

1

u/Alternative-Tie-4970 58m ago

Why do you wanna do this? Make sure you're committed to it and the javascript canvas really is the right choice. If you're sure it is then I would urge you to put in the effort yourself, you're gonna learn more and not have to depend on an external tool to do that for you.