How Coin Collection Mechanics Work in Arcade Games
A technical but readable look at how collection is implemented, and why pickup radius and pattern spacing decide whether a game feels good.
The pickup test
At its simplest, collection is a distance check. Each collectible has a position and a radius; the player has a position and a collection radius. If the distance between the two centres is less than the sum of the radii, the pickup registers. In code this is a squared-distance comparison, avoiding a square root for a test that runs hundreds of times per frame.
The interesting part is what radius the player gets. Using the player's visual size produces a game that feels stingy: coins you clearly touched do not register because your sprite's corner missed by a few pixels. Making the collection circle noticeably larger than the body solves this, and the difference between a radius of twenty pixels and one of twenty-eight is the difference between a game that feels frustrating and one that feels generous.
This is the single most consequential number in a coin collection game, and it is invisible. Players never see the circle. They experience it as the game being fair or not.
What a collectible knows about itself
A collectible in a well-built system is a small bundle of properties rather than a special case in the game code. The properties that matter are its point value, how much it contributes to a combo streak, whether magnet effects can act on it, its pickup radius, and how it moves.
Separating value from combo weight is worth doing. A gem might be worth ten times a coin in points but only twice as much toward a streak, which stops one high-value pickup carrying a combo on its own. A deliberately worthless decoy can have zero value and a negative combo weight, so catching one actively breaks the streak.
Movement is a property rather than a type. The same coin can be static, bobbing, swinging horizontally, orbiting a point or drifting with a velocity. Treating motion as a property means one collectible implementation covers a coin on a platform, a coin riding a conveyor belt and a coin orbiting inside a ring formation.
How magnets actually work
A magnet power-up is not a larger pickup radius. If it were, coins would simply vanish when you got near them, which reads as a bug rather than a power. Instead, a magnet moves collectibles toward the player.
Each frame, every magnetisable collectible within the magnet radius is moved a fraction of the way toward the player. The force is scaled by proximity - stronger when close, weaker at the edge - so coins accelerate as they approach. The visual result is the flowing convergence that makes the effect legible, and the coins are still collected by the normal pickup test rather than by a special case.
Two details make it feel right. First, the collectible's motion anchor must be updated as it is pulled, or a bobbing coin will snap back toward its original position. Second, drawing a faint glow around a coin under magnetic influence tells the player which pickups are being affected, which matters when some are not.
That exclusion is deliberate. On this site, treasure chests and decoy pickups are never magnetisable. Excluding the highest-value item means the route to it always matters, and excluding the decoy means a magnet can never sabotage you.
Spawn patterns as geometry
Coins are rarely placed one at a time. They come in patterns, and the useful way to build patterns is to separate geometry from spawning. A pattern function takes a count and a spacing and returns a list of offsets; a spawner takes those offsets, adds a world position and a collectible type, and creates the objects.
The benefit is reuse. The same arc generator serves a runner, where the arc traces a jump, and a trajectory game, where it traces a launch. The same ring generator serves a flight game and a puzzle layout. Adding a new pattern means adding one small function, not touching the spawning code.
The patterns that recur across the genre are a straight line, an upward arc, a zig-zag, a wave, a ring, a grid block, a diagonal and a stair step. Each corresponds to a movement the player makes: running flat, jumping, weaving, flying a curve, circling, sweeping a room, falling, climbing. That correspondence is the point. A pattern that does not match any movement the player can make is a pattern they will miss.
Spacing and the collectability rule
A pattern is only good if it can actually be swept. The working rule is that spacing between consecutive collectibles must be less than the distance the player covers in the combo window, or the pattern will break the streak it is supposed to sustain.
That gives a concrete constraint. If a game's combo window is two seconds and the player travels at three hundred pixels per second, consecutive coins in a line must be closer than six hundred pixels apart - and in practice much closer, since the player is not travelling in a straight line toward each one. Typical spacing on this site is forty to fifty pixels, a comfortable margin under the limit.
The same logic applies vertically. An arc that peaks higher than the player's jump is not an arc, it is a tease. Computing the real jump height from the physics and capping the arc below it means the pattern is always completable.
Key takeaways
- Collection is a circle-overlap test, and making the player's circle larger than their body is the most important feel decision in the genre.
- Every collectible carries a few properties: value, combo weight, whether a magnet can pull it, and how it moves.
- Magnets move collectibles toward the player rather than extending the player's reach, which is why they look different from a larger pickup radius.
- Spawn patterns are geometry generators kept separate from spawning, which lets a runner and a maze share one pattern library.
- Excluding high-value pickups from magnet effects is a deliberate choice that preserves risk.
Frequently asked questions
Why do coins get collected when I did not quite touch them?
The collection radius is deliberately larger than the character's visible body. It is a fairness allowance that makes near misses count, and it is standard practice in the genre.
Why will the magnet not pull treasure chests?
High-value pickups are excluded on purpose so the route to them still matters. If a magnet could take them, the risk that makes treasure interesting would disappear.
Are coin patterns random?
The choice of pattern often is, but the pattern itself is not. Each is a defined geometry with spacing constrained to what the player can physically sweep.
Do these coins have any real value?
No. They are virtual objects in a scoring system, with no monetary value and no existence outside the game.
A note on terminology. Everything described as a coin, gem or treasure in this article is a virtual in-game collectible used for scoring. Nothing here relates to real-world currency, numismatics, collecting physical coins, or any form of financial value.