Urgent.News

What's breaking now, across thousands of outlets.

Tech

I generated every sprite and sound of my mobile game in code. Here's how.

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…

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:

Sprites:

All 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.

Sound:

The 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.

Rooms:

The 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to Build a Voice-Over Tool for YouTube Videos

Why Voice‑Over Automation Matters for YouTube If you’ve ever tried to produce a YouTube video, you’ll know that the most time‑consuming part isn’t shooting footage or writing the script—it’s the…

GhostShell: the terminal remembers the bug, and it does not press the keys

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built GhostShell is a terminal companion for the bug you already met.

  • GhostShell remembers bugs to prevent loss of error information
  • Tool runs locally, keeping data on disk, no data transmitted
  • Users approve commands before execution, adds security layer

How to Choose an Affordable Logging API for Small Projects — Three Silent-Run Tests

Short answer: Choose an affordable logging API for small projects by testing whether it can reconstruct a silent scheduled import, then match retention and search depth to that job.

  • Test logging API with skipped run, empty successful run, and failed parse
  • Emit four events: importstarted, importcompleted, importempty, importfailed
  • Retention windows of fourteen days may suffice for small projects

More from Tuesday 27 October →