Pygame in a browser tab

Hello. I am making a slime bounce game in Python. I am attempting to make it where the game will open in a new browser tab with Flask, but when I run the code it just shows me the output, not a website. Can anyone help?

Repl link
https://replit.com/@CarsonD-github/slimegame?v=1

1 Like

Hi @MaximumDevMode !
You don’t have a return statement in your code to return anything to the website.
You may want to move it to a pure HTML repl, then use the py-script tag as mentioned here:

Hope this helps!
If this answers your question, you can mark this post as a Solution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.