Getting started
Learning paths through this topic
Keep pixel art sharp when the game window has any size
Pixel art stretched to fit a window turns blurry or gets uneven pixels, with some columns twice as wide as others. This entry picks the size that keeps every pixel the same, centres the picture and says what to do in a window too small for it.
Find what a "restart" forgets to reset, such as old enemies or a stuck timer
After dying and restarting, the second run starts with a leftover enemy, a half-spent cooldown or the boss already awake, because something was never put back. This entry compares the state after a restart with a brand-new game and names every difference.
Show a speedrun timer that never runs ahead of the real time
A level timer that rounds, adds up small float values or counts while paused shows times that differ between runs and from the replay. This entry counts whole steps, shows the time cut down rather than rounded, and handles runs longer than an hour.
Stop a saved game from loading a hero with no health or endless ammo
Saved files get edited, cut off or filled by an old bug, and the game then loads nonsense: a hero that dies on the first frame, negative ammo, a level that does not exist. This entry shows how to clean the values on load and report what was changed.
Let old save files keep working after you change what a save contains
Every time you and the AI rename or reshape something the game saves, players with an older save lose their progress or start with a broken hero. This entry shows how to upgrade old saves one step at a time and how to refuse a save from a newer game.
Add screen shake that fades out and never leaves the picture crooked
Shake on explosions makes hits feel heavy, but a careless version drifts the picture off centre, shakes the same for a tiny hit as for a huge one, or never quite stops. This entry gives a shake that builds up, eases out and ends exactly at rest.
Generate the same level from a code, without changing it when you add loot
A level made from a seed number should look identical every time, so players can share it and you can reproduce bugs. But adding one more random item can quietly change the whole level. This entry gives each part of the game its own stream so they cannot disturb each other.
Make enemies see the hero only when no wall is in the way
Enemies that spot you through walls feel like cheating, and the AI's quick check by looking at a few points along the line can miss a thin wall completely. This entry walks along the line cell by cell so that no wall tile can be skipped.
Spawn enemies in the arena without placing them on top of the player
Enemies that pop up right next to the hero cause hits nobody could have avoided, and a spawner that keeps trying forever can freeze the game in a small room. This entry picks a fair spot and has a sure answer when no random spot is good enough.
Find out why your character animation shows half a frame or jumps
When a character walk looks cut off, shifted or flickers between poses, the picture holding all the frames often does not divide evenly. This entry gives a check that tells you what is off and by how much, before you ask the AI to fix the wrong thing.
Stop the hero from drifting with the stick at rest or running faster diagonally
Controller sticks never sit exactly at zero, so the hero creeps even when you let go, and a square-shaped stick range or two held keys make diagonal movement faster than straight. This entry cleans both so every direction is equally fast and rest means rest.
Find the pictures that make your game crash on phones from memory
A small image file can swallow far more memory than its size suggests, and a phone gives up long before your computer does. This entry shows how to count what the pictures really cost and how far to shrink the worst ones, so the game stops closing by itself.