Cómo hicimos el Duelo de Reflejos
Cae una pelota; el primero en tocarla se la lleva. Suena simple, pero que la IA se sienta justa —y no aburrida ni imposible— fue el verdadero trabajo.
How we built the Reflex Duel
A ball falls; whoever taps it first keeps the point. Sounds simple, but making the AI feel fair — not boring, not impossible — was the real work.
El problema de un tiempo de reacción fijo
La primera versión le daba a la IA un tiempo de reacción al azar dentro de un solo rango: siempre entre medio segundo y casi un segundo. Se sentía... plana. Después de un par de rondas, el patrón se volvía predecible: la IA nunca era una amenaza real, solo un cronómetro con el que competías.
The problem with a fixed reaction time
The first version gave the AI a random reaction time within a single range: always somewhere between half a second and almost a full second. It felt... flat. After a couple of rounds, the pattern became predictable: the AI was never a real threat, just a stopwatch you were racing.
La IA "francotiradora"
La solución no fue subirle la dificultad general, sino agregarle varianza: casi un tercio de las rondas, la IA reacciona muchísimo más rápido de lo normal —casi arriba de la caída—, sin ningún aviso visual. El resto de las rondas, sigue en su rango normal, perfectamente superable.
The "sniper" AI
The fix wasn't raising the overall difficulty, but adding variance: on almost a third of rounds, the AI reacts far faster than usual — almost right at the top of the fall — with no visual warning. The rest of the time, it stays in its normal range, perfectly beatable.
const delay = Math.random() < 0.28
? randomBetween(140, 320) // francotirador: reacciona casi al instante
: randomBetween(500, 950); // ronda normal: alcanzable
El resultado se siente muy distinto a "subir la dificultad": la mayoría de las rondas las puedes ganar limpio, pero nunca sabes cuál va a ser la ronda rápida. Esa incertidumbre es lo que mantiene la atención, no la velocidad promedio.
The result feels very different from "raising the difficulty": most rounds you can win clean, but you never know which one will be the fast one. That uncertainty is what holds attention, not the average speed.
Ajustar la zona de toque
El radio visual de la pelota y el radio que realmente cuenta como "toque válido" son dos números distintos a propósito. Si son iguales, cualquier imprecisión —un dedo grueso, un clic con medio pixel de más— cuenta como fallo, y el juego se siente injusto e impreciso, no difícil.
Le dimos a la zona de toque casi el doble del radio visual de la pelota. Sigue viéndose como una pelota chica, pero perdona la imprecisión normal de tocar algo que se mueve.
Tuning the tap zone
The ball's visual radius and the radius that actually counts as a "valid tap" are two different numbers on purpose. If they match, any imprecision — a thick finger, a click half a pixel off — counts as a miss, and the game feels unfair and imprecise, not hard.
We gave the tap zone almost double the ball's visual radius. It still looks like a small ball, but it forgives the normal imprecision of tapping something that's moving.
¿Necesitas una mecánica de juego a medida, con una IA que se sienta bien? Hablemos.
Cotizar un proyectoNeed a custom game mechanic, with an AI that feels right? Let's talk.
Get a quote