đ° New article from Wololo.net
Optimizing a 2D Godot Game for the Nintendo Switch. My first-hand experience
Ever tried squeezing a PCâborn Godot card game onto a Switch and watched it crawl at 1âŻFPS? That was my reality until I started treating the console like a picky roommateâclean up, cache what you can, and stop asking it to do everything every frame.
First off, I slashed the base resolution from 1080p to 720p. It sounds trivial, but that alone nudged the framerate up by 7â10âŻFPS. Next came a cacheâoverhaul: repeated string lookups and cardâcopying were eating cycles like nobodyâs business, so I stored results once and reused them, scoring a 95âŻ% hit rate.
I also stopped stuffing every invisible card into the scene tree. Unused nodes were still being ticked, so I pulled them out and kept references in plain variablesâinstant CPU relief. Finally, I migrated most logic out of `_process()` to signals or oneâoff calls; if something truly needs perâframe updates, itâs now as lean as possible.
TL;DR: lower resolution, cache aggressively, prune the node tree, and keep `_process()` to a minimum. With those âlowâhanging fruits,â my Switch build jumped from a sluggish crawl to a respectable 20â25âŻFPS, proving even modest 2D titles can run smoothly on portable hardware when you tidy up the code.
