The most annoying thing that can happen in a Scratch lesson: a child has spent ages building a game, and the Scratch project wonât save. âProject could not save.â sits at the top of the screen, and âTry Againâ doesnât help. Usually the connection is to blame. It has always been like this, so in lessons we have a simple routine.
First aid: the file first, everything else later
Donât reload the page until the project is on your computer. After a reload, Scratch may open the last version from the server, and anything that never made it there is gone.
- Save a copy to your computer. In the File menu, choose Save to your computer. The âDownloadâ button right in the error message does the same thing. The browser saves an
.sb3file, and the whole game is inside it: sprites, scripts, costumes and sounds. - Reload the page. If Scratch shows that youâve been signed out, sign in again.
- Load the file back. In the File menu, choose âLoad from your computerâ and pick the
.sb3you just saved. If Scratch asks âReplace contents of the current project?â, say yes. - Keep working. To check, click âFile â Save nowâ. If you see âProject saved.â, youâre fine.
Sometimes the server still wonât take the project after all that. Then we just keep working and save the file to the computer again every so often. At least everything is in the .sb3, and the game can go back into the editor later.
Why a Scratch project wonât save
The Scratch Wiki gives three reasons for the âProject could not saveâ message:
- youâve been signed out;
- the computer lost its internet connection;
- the project is too large.
It also suggests checking them in order and trying to save again after each step: first the internet, then, in a new tab, whether youâre signed in to the right account, and only then look for heavy files.
In my lessons the usual story is the second one on that list: something with the connection, and the .sb3 routine fixes it. If the game still wonât save after a reload and with working internet, itâs time to look at size.
When a Scratch project is too large
There is no overall limit on file size. The limits apply to parts of the project. According to the Project File Size page on the Scratch Wiki, in Scratch 3.0:
- each individual asset (costume, backdrop, sound) must be under 10 MB;
- the
project.jsonfile inside the.sb3, which holds the scripts, variables, lists and names, must be under 5 MB.
Almost all the weight comes from images and sounds; scripts take up very little. In childrenâs projects the heaviest things are usually photos pasted in as backdrops and long sounds, especially music that plays through the whole game.
Slimming it down inside Scratch
Tips from the Scratch Wiki:
- delete sounds, costumes, backdrops and sprites you donât use;
- trim long music or replace it with a shorter loop (to shrink heavy WAV/MP3 files right in the browser, you can run them through OGCruncher);
- draw simple shapes in vector mode instead of bitmap (though converting an existing bitmap costume to vector doesnât make it smaller);
- shorten very long names of variables, lists and sprites, and long comments, because they bloat
project.json.
If the project still wonât save online after that, the Wiki suggests working on it in the Scratch offline editor, which opens the same .sb3.
Checking it in the pyScratch Inspector
Finding the one file that weighs 8 MB by hand is hard: Scratch doesnât show the size of costumes and sounds in megabytes. Next to a costume you only see its size in pixels, next to a sound its length in seconds. Thatâs why I added an Inspector (.sb3) tab to my free tool pyScratch. Open an .sb3 there, and the Inspector shows:
- counters: sprites, backdrops, costumes, sounds, variables and lists (global and local), total blocks and orphan scripts with no hat block;
- the size of
project.jsonas a bar against the 5 MB limit; - a table of all costumes and sounds from heaviest to lightest, flagged âLarge (>500 KB)â and âOver 10 MB!â.
There are two buttons as well. âRemove Unused Assetsâ deletes files from the archive that the project doesnât reference. âCompress Large PNG/JPG (>960px or >500 KB)â scales large bitmap images down to 960 pixels on the longer side and recompresses them. A large PNG without transparency becomes a JPG in the process. Then save the result with âFile â Save .sb3â and load it into Scratch.
pyScratch is in test mode right now, so keep the original .sb3 separately and check the compressed project in Scratch before you carry on working with it. The file is processed in your browser and isnât uploaded anywhere. I wrote more about the tool itself in the post about pyScratch and writing Scratch in Python.
The habit that saves the work
Saving to the Scratch server is convenient, but I donât recommend relying on it alone. When the server lets you down, the local copy is what saves you.
Kids donât pick this habit up on their own. My students almost never keep a local .sb3 copy unless someone reminds them, and that goes for every child I teach. I have to remind them every time, and not only in Scratch: Unity projects, Python scripts and Blender files get left unsaved in exactly the same way. It is a mass problem.
So use âFile â Save to your computerâ at the end of every session, and in a big project halfway through as well. If your child works alone, the reminder is a job for the adult nearby. Such an .sb3 usually doesnât weigh much, and on a bad day it keeps everything the child managed to build.
If your child does a lot in Scratch and wants to move on, from a first game to their own projects, come to one-to-one Scratch lessons. And if a game wonât save right now because of its size, open it in pyScratch and look at the asset table: the heaviest file will be the first row.