Error: File to Large when downloading a game file as an F4 .uf2

Hi All,
My 6th-grade students have made games for an upcoming live arcade event that we are hosting at school next week. I have successfully downloaded most of the student games as (F4 STM32F4xx .uf2) files for the handheld hardware we have and (.elf) files for the Raspberry Pi’s.
There is one game that I keep getting an error when I try to download it as either an (.elf )or, as a (F4 STM32F4xx .uf2), or (MeowBit .uf2) file. It says that the file is too large by 308280 bytes.

Game Link:

It is similar in the amount of code to all the other student games that have worked with no issues. Any suggestions? I would appreciate your help.




What a cool looking game! I notice that this game has several images, animations, tilemaps, and full-size backgrounds. These take up a lot more space than the code, and is likely to be the culprit.

If you want to check for sure, have the student make a copy of their code (or edit this here) and try removing all but one level and all but one animation. See if that loads. If it does, it’s likely due to all of the art. If it still doesn’t load, we can narrow in on what else might be the culprit.

Please post either result so we know how it went!



One thing in particular that is taking up a significant amount of space are the vignette animations - they have a few dozen frames all at 160x120, which take up a lot of space (around 10kb per image at minimum, plus a bit more as we keep around compressed copies so the project can load back into the editor). I think they should be able to use to achieve the same effect (with some fiddling it might actually end up better than the animation, as they can make it so it smoothly grows / shrinks at runtime).

I have a separate idea for a website side change that might also reduce the size for a bit, but will need to work on it a bit / test it first :slight_smile:


That is… probably one of the best games I have ever seen on MakeCode.


Unfortunately the lowest I can get it to go without removing much looks like it’s about 81kb over meowbit max size by trimming empty space from some assets as well as getting rid of some assets that appeared unused (the final boss might be a bit wonky / need fixing as it got trimmed down; can use some fixes similar to what I did for the home screen character to fix their positioning. Also thia got rid of the vignette as mentioned above, ideally it could be replaced with a lantern effect):

(I think one or so more ~background sized images getting taken out would be enough for boards with a little more compile size, e.g. pybadge and pygamer)

To get it any lower I think you’d need to trim a few levels and maybe a few frames of the large images / animations :frowning:

The other fixes I was thinking of don’t appear to move the needle much either – in theory they’d be good to get in but they’d only improve things in cases where we’re nearly over the limit it appears, as it’s already just getting rid of all the attached files when there’s no space. There might be some things we can do to trim the size of the code in our game package as well, but that’s typically pretty hard to assess / takes time.

1 Like

my games are always to big to export

1 Like