Pygbag Index Template #87
-
Pygbag Index TemplateI want to start of by saying that I really appreciate the Pygbag team as done. I recently build a simple game in pygame and used Pygbag to distribute it using Github Pages. I am very happy with the tool and worked well after a little bit of struggling and couple visits to the docs. I am sorry if these question can be easily found in the docs. Questions:
Links: Thank you so much for making a wonderful tool. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi , thanks for the praise :)
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the response. I have tested that flags/args proposed, and they lead to the desired behavior. On the matter of using the custom default.tmpl file for custom index.html page generation. Major concerns with custom tmpl file
Suggestion (What are your thoughts?)
I may be misunderstanding your suggestion, if not just something to consider. |
Beta Was this translation helpful? Give feedback.
-
Templates don't use pygbag but builtins modules of python runtime that are unlikely to change ( they are in C, come from Panda3D and map emscripten API ), sure there are facilities in pythonrc.py for using them but you could put everything in the template instead : it's just more work for low level things that are unlikely to change before v1. But indeed the goal of pygbag is to allow running cross platform games on web almost "out of the box" , so using html/js injection - is easy - but probably toxic for game portability on long term. For making web-only games there are probably better alternatives in javascript/wasm world. So i would not advise to use injection when it can be avoided. |
Beta Was this translation helpful? Give feedback.
Hi , thanks for the praise :)
--ume_block 0
option on command lineplatform.window.onbeforeunload
at runtime or by prepending--can_close 1
on command line