Fox Studios logo Fox StudiosGame projects, devlogs and Scratch builds
Devlogs

How We Ported a Scratch Game to Godot in Three Weeks

Our little Scratch platformer hit a wall last summer. It had 14 levels, a few hundred players on the Scratch site, and so many clones on screen that the frame rate dropped to single digits on school laptops.

A laptop showing the Godot editor with a pixel art platformer level next to a printed sheet of colorful Scratch code blocks on a desk

Our little Scratch platformer hit a wall last summer. It had 14 levels, a few hundred players on the Scratch site, and so many clones on screen that the frame rate dropped to single digits on school laptops. Moving the Scratch game to Godot was the obvious fix, and this devlog covers the three weeks it took, including the parts that went badly.

If you are thinking about the same jump, the short version is this: the art and level design moved over easily, the logic needed a full rewrite, and almost every bug came from assumptions Scratch had been making for us without us noticing.

Why we moved the Scratch game to Godot

We did not leave Scratch because it was too simple. We left because the game outgrew three specific limits. Scratch caps clones at 300 per project, and our particle effects plus enemies kept hitting that ceiling. Scratch runs at a fixed 30 frames per second, which made the jump feel floaty compared to the reference games we liked. And we wanted a downloadable build for itch, which Scratch does not produce without third party packagers.

We picked Godot 4.3 because it is free, the editor runs on the same school machines our testers use, and GDScript reads close enough to plain English that our two younger team members could follow it after a week.

Week one, assets and the coordinate trap

Exporting art was the easy part. In Scratch you can right click any costume and export it as SVG or PNG. We had 86 costumes across 11 sprites, and it took one afternoon to pull them all out and drop them into a Godot project folder.

The trap was coordinates. Scratch puts the origin at the center of a 480 by 360 stage, with y going up. Godot puts the origin at the top left of the viewport, with y going down. Every hard coded position in our level data was suddenly wrong, and our first test build had the player spawning upside down off the bottom of the screen.

The fix was a small conversion we ran once over the level data:

  • Godot x equals Scratch x plus 240.
  • Godot y equals 180 minus Scratch y.

We then set the Godot viewport to 960 by 720 with a stretch mode of "viewport" so the pixel art scaled by exactly 2x. Do this conversion in a script, not by hand. We tried by hand for two levels and got four positions wrong.

Week two, rewriting the logic

There is no converter that turns Scratch blocks into GDScript in a way you would want to keep. We printed every sprite's scripts, laid them on a table, and mapped each pattern to its Godot equivalent.

Scratch patternGodot equivalent
When green flag clicked_ready() function
Forever loop_physics_process(delta)
Broadcast and when I receiveSignals, connected in the editor or in code
Create clone of myselfInstantiate a packed scene
Touching colorCollision layers and Area2D
Global variablesAn autoload singleton script

The biggest mental shift was speed. In Scratch, "change x by 10" inside a forever loop means 10 pixels per frame, and since Scratch runs at 30 fps that is 300 pixels per second. In Godot, movement should be multiplied by delta so it stays consistent at any frame rate. Our player moved twice as fast in the first Godot build because the physics tick runs at 60 per second. After converting every speed to pixels per second and doubling for the 2x scale, the movement matched within a few percent.

Collision was the other big rewrite. Our Scratch version used "touching color" for floors, which is clever but fragile. In Godot we rebuilt each level as a TileMapLayer with collision shapes on the tiles, which took longer up front but removed an entire class of bugs where the player clipped through thin platforms.

What broke and what we changed

Three problems cost us the most time.

Clone behavior did not translate

Scratch clones share every script of their parent, including the green flag script, which only runs on the original. In Godot, every instance runs _ready(). Our enemy spawner instanced enemies that each spawned more enemies, and the test build froze in about four seconds. Moving spawning logic into a separate spawner node fixed it.

Timing hidden in wait blocks

Scratch scripts were full of "wait 0.1 seconds" blocks that quietly kept things in sync. Godot does not pause a function that way unless you use await with a timer. We replaced most of them with Timer nodes and a few with tweens, and found two places where the original timing was masking a real bug.

Sound mixing

Scratch plays every sound at full volume with no buses. Our Godot build sounded harsh until we set up three audio buses for music, effects and interface, and pulled effects down by 6 dB.

Why we did not port everything

The common advice for a port is to reach full feature parity before adding anything new. We went the other way and cut on purpose.

Two of our 14 levels existed mainly to show off Scratch tricks, like a pen-drawn rope bridge. Rebuilding them faithfully would have taken most of week three for content players rated lowest in our last survey. We dropped them, used the time to tighten the jump physics, and shipped 12 levels that felt better than the original 14. We wrote more about that kind of choice in our devlog on cutting features from our game. A port is a rare chance to cut things nobody will miss, and parity is a goal for your ego, not your players.

Results after three weeks

The Godot build runs at a steady 60 fps on the same school laptops that struggled with the Scratch version. The download is 31 MB for Windows. Playtesters described the controls as "snappier" in 9 of 12 feedback forms, which was the main thing we wanted.

We kept the Scratch version live with a note pointing to the new build, because a lot of our original players are students who cannot install anything on their machines. If you are still at the Scratch stage, our weekend project on building an endless runner in Scratch is a good place to learn the patterns that will port well later. And for showing your progress during a port, short clips beat long posts, as covered in devlog GIFs and short clips.

Frequently asked questions

Can you convert a Scratch project to Godot automatically?

Not in any useful way. You can export costumes and sounds directly, but the block logic has to be rewritten in GDScript. Mapping each Scratch pattern to its Godot equivalent before you start makes the rewrite much faster.

Is Godot good for beginners coming from Scratch?

Yes, for most people who already understand loops, variables and events from Scratch. GDScript is readable, and the node system feels similar to sprites with their own scripts. Expect a slow first week while you learn scenes, signals and delta time.

How long does it take to port a Scratch game to Godot?

It depends on size, but a small game with a dozen levels took our team of three about three weeks of evenings and weekends. Assets take a day or two. Most of the time goes into rewriting logic and fixing timing and collision bugs.

RD
Reyansh Dole

Reyansh started making small games as a teenager and now writes the devlogs and tutorials here, focused on how beginners actually ship a first project.

More posts by Reyansh

More in Devlogs

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto