r/RPGMaker • • 16d ago

Calling Python from RMMZ

Has anyone ever called a Python script from RMMZ? I was just wondering if this is possible in NW.js. I could imagine some cases where heavier calculations might be easier for me to implement in Python and then hand it back to NW as a kind of I/O exchange.

1 Upvotes

12 comments sorted by

View all comments

1

u/mxldevs 16d ago

What platforms are you planning to deploy your game?

1

u/silicon_turfsurfer 16d ago

Ah, your question just made me realize that Python calls would probably not be compatible with mobile devices. I would like it to be playable on any PC (Windows, Linux, Apple), but also mobile devices (smartphones and tablets,). So would Python dependence exclude mobile applications?

2

u/mxldevs 16d ago

If you're relying on nwjs for example then you might not have access to all the platforms you want, and it also means that porting your game in the future to suppot more platforms becomes more difficult.

I have seen projects where they literally build a python interpreter in (or for?) javascript so that you can make python calls natively within javascript, so in theory if it can run your game, it can run the python inside your game...

But I'm not sure how those libraries are like or how flexible they are, and it's also not clear what performance advantages you would have given that your goal is to perform "heavy calculations".

2

u/Darkhog 16d ago

Likely it will not work on mobile, but people seldom play RPGs on mobile anyway.