{
  "id": 16811451,
  "title": "I generated every sprite and sound of my mobile game in code. Here's how.",
  "url": "https://urgent.news/2026/10/27/i-generated-every-sprite-and-sound-of-my-mobile-game-in-code-heres-how",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-27T22:57:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/felix-helleckes/i-generated-every-sprite-and-sound-of-my-mobile-game-in-code-heres-how-44n"
  },
  "original_language": "en",
  "account": "Dash & Slash is a one-thumb roguelite mobile game for Android and iPhone, created by a solo developer using Flutter and Flame. The game features a unique neon aesthetic, a compact app size, and customizable assets that can be edited through simple numbers rather than complex image editors. Here's how the developer achieved this:\n\nSprites:\nAll sprites, including glowing effects, sparks, rings, shards, smoke, damage digits, and text (PARRY and CRIT), are drawn from a single 512×512 texture atlas. The atlas is not a PNG file but rather a picture created at startup using Flutter's Canvas. The game records 30 sprites into 64×64 cells within the atlas and converts the result into an image. Each sprite is drawn in white, with colors applied during runtime through a modulate blend. This approach allows for a single glow sprite to transform into various visual elements, such as the cyan dash trail, magenta boss bullet, or orange fire relic. The implementation minimizes frame allocations, ensuring smooth performance even when the game features thousands of particles on screen.\n\nSound:\nThe game's sound effects and music loops were generated using a Python synthesizer script, tools/gen_audio.py. Instead of generating audio at runtime, the script creates all 34 sound effects, jingles, and music loops from oscillators, filtered noise, and a few effects. These sound files are written as mono 16-bit WAVs at 22,050 Hz. The developer uses fixed seeds per file for consistency, allowing for easy tracking of changes through Git. Additionally, the music tracks are seamless loops, each consisting of exactly 16 bars, enabling the game to play the tracks indefinitely without interruption.\n\nRooms:\nThe game's rooms are 13×21 tile grids. The generator initially places small wall \"stamps\" and pits, then mirrors them left to right. A flood fill algorithm is used to check which floor tiles are reachable from the spawn tile. If less than 62% of the room is reachable, the generator attempts to rebuild the room. The generator also includes a condition to ensure that a door is reachable by the flood fill, preventing players from getting trapped in inaccessible rooms. This room generation process ensures a consistent and challenging gameplay experience while avoiding design flaws.",
  "summary": "Dash & Slash is a one-thumb roguelite for Android and iPhone: you pull back to aim, time slows to 20%, you let go and cut through everything on the line. It's a solo project built with Flutter and Flame, and it ships without a single image or sound from an asset pack. That wasn't a purity thing. I'm a QA engineer, not an artist or a sound designer, and I wanted three things: one consistent neon…",
  "key_points": [
    "Dash & Slash features a single 512×512 texture atlas for all sprites",
    "Sound effects and music loops generated via Python script",
    "Rooms are 13×21 tile grids with flood fill algorithm for reachability"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}