kitao / pyxel

A retro game engine for Python
MIT License
15.35k stars 847 forks source link

Possible to use url Param or a value from local storage in the game code #549

Open saitanay opened 4 months ago

saitanay commented 4 months ago

I have built a small game. Able to render it on the web using the web launcher

Unable to figure out if there is a way I can access an url Param or a cookie or a local storage value in game python code via pyodide.

Any such example code?

Thanks in advance.

kitao commented 1 month ago

There's no such API in Pyxel for now. But the Web version of Pyxel runs on PyO3, so you may use some way with PyO3. Please check PyO3's document.