Recently, I’ve uncovered my Pygamer and decided I wanted to be a masochist, so I’m experimenting on getting quite possibly the worst coded game I’ve ever made on it: Minercat 2: Attack of the Space Kangaroos. The issue is that exporting the game is LITERALLY IMPOSSIBLE. On an export attempt, I was told that the game is “166948 bytes” over the limit, and this is AFTER I spent 2 hours shifting through the mess optimizing it a little bit.
So, my options are either to dive into the trenches for literal weeks in hopes that I MIGHT be able to get it under the limit, or find a way around it. If anyone knows a way to bypass the limit, let me know!
And, if for some god-forsaken reason you want to witness this unholy chimera of “code,” here’s the link. It takes an average of 30 seconds for Makecode Arcade to load the code, so be warned.
Again, if this was a fantasy monster it would be an amalgamation of every single creature in existence, please heed my warning. If you’re dead-set on diving into the belly of the beast, then I am not responsible for anything that may happen.
(I’m not really working with Makecode anymore, so I probably won’t be familiar with a lot of arcade-exclusive stuff, please be patient i am learning lua and python at the same time)
If you have selected the PyGamer in the download options, the limit is the actual memory limit of the PyGamer. If you could somehow bypass this, the file literally wouldn’t fit on the hardware. Some ways of saving space are by avoiding saving full screen images and large tilemaps. It is quite rare to get enough code to fill the device, it is almost always the images, tilemaps, and other assets causing the issues. Looking at your assets I can see at least 13 full screen images. I deleted the ones that I could find and we’re down to just over 100k bytes over the limit. That’s just a few full screen images causing over 60k bytes!
Useless images like this one:
Removing that single image decreased our counter by 10k bytes!
Now, it does take away from the game when you can’t have your story screens, but that’s a sacrifice you’ll have to make to get this monster to run on hardware!
I also made every duplicate image asset into a single copy of the asset. I missed a few, but it’s down to 88k bytes left so that’s pretty good.
The rest is gonna have to be your job. Here is my version of your project:
There are still quite a few duplicated assets, but those don’t really change much as they are mostly small animations. You’ll probably need to find more areas of the game to cut.
indeed 9 times out of 10, when the project won’t fit on hardware it’s because there’s too many large images. try to replace full screen images with sprites where possible