I do find some performance degradation, but I am able to make the build run at 60fps on my test machines by keeping the resolution small and not drawing areas outside of the map area every frame (you might haved noticed some glitchy artifacts when entities go outside the main playing area).
As for using pygbag, you just need to alter your main loop to use asyncio (see instructions on that url). Feel free to message me if you have trouble getting it working.
← Return to game
Comments
Log in with itch.io to leave a comment.
Hi, How did you manage to convert your Pygame code into WebGL? And was there a performance hit?
Hey, thanks for playing! I use pygbag for converting to web assembly: https://pypi.org/project/pygbag/
I do find some performance degradation, but I am able to make the build run at 60fps on my test machines by keeping the resolution small and not drawing areas outside of the map area every frame (you might haved noticed some glitchy artifacts when entities go outside the main playing area).
As for using pygbag, you just need to alter your main loop to use asyncio (see instructions on that url). Feel free to message me if you have trouble getting it working.
So, it won't run without Asyncio? That's a shame. Maybe it's better to invest in learning a JavaScript framework.
worm