Make an endless runner: difficulty, high scores and one-tap play
An endless runner asks one thing of the player, usually tap to jump, and makes it harder every few seconds until they fail. The craft is in how fast it ramps and how fair each obstacle feels. Anticode can build one as a browser game with a saved high score, or you can start from Afterglow Run, a synthwave arcade game in its template gallery.
One input, many decisions
The best runners are designed around a single verb. Jump, switch lanes, flip gravity, or hold to fly and release to fall. One input works on a phone with a thumb, on a laptop with the space bar and on a tablet at a stand, and it makes the first ten seconds self-explanatory. Adding a second input (jump and slide) roughly doubles what a new player has to learn; it's worth it only if obstacles truly need both.
Designing the difficulty curve
Difficulty in a runner usually comes from three dials turned together:
- Speed: the world scrolls faster over time. Increase it in steps or along a curve that flattens out, so it never becomes physically impossible to react.
- Density: the gap between obstacles shrinks, but never below the distance the player needs to land and jump again at the current speed.
- Variety: new obstacle types appear at set distances, so a run has a sense of chapters.
The common mistake is pure randomness. If obstacles are placed at random, sooner or later the game spawns an unclearable pair and the player dies through no fault of their own. Better runners build from short hand-designed patterns (a low block, a gap, a high bar) and choose patterns at random, filtered by the current difficulty. Ask for that explicitly: "obstacles come in patterns, and no pattern is impossible at the current speed".
A good first run lasts long enough to see a second obstacle type, typically well under a minute for a new player. If almost everyone dies on the first obstacle, the opening is too fast.
Feel and feedback
- Screen shake and flash
- A short, small shake on a hit tells the player what happened. Honour reduced-motion settings by swapping it for a colour flash.
- Near-miss reward
- A sound or a score bonus for clearing an obstacle by a hair makes risky play feel deliberate.
- Instant restart
- One tap from game over back into a run. Every second spent on menus between runs loses players.
- Sound
- Generated in code with the browser's audio API: a jump blip, a pickup chime, a low thud on a crash.
Start from Afterglow Run, or from a sentence
Anticode's template gallery includes Afterglow Run, a synthwave arcade game designed and written by Anticode's model. Using a template copies it into your project with no model call and nothing taken from your limits. From there you change it in words: "make the player a paper aeroplane over a city at dawn", "add a double jump after 1,000 metres", "make the first 20 seconds slower".
Or start from scratch with your own theme: "An endless runner where a courier on a bike dodges potholes and opens car doors. Tap to jump. Speed rises every 15 seconds, and parcels give bonus points. High score and the last five runs saved on this device. Pastel colours, chunky shapes." The model writes it as one HTML document with a canvas, plain JavaScript and code-drawn art, since the sandbox doesn't load outside sprites or sounds. You can add your own images to the build if you have a character drawn already.
High scores without a server
The best score, recent runs and settings such as mute save in the player's browser with local storage. That's enough for "beat your own best", which is what keeps most people playing a runner. It isn't enough for a public leaderboard: the app has no network, so there's nowhere to send a score or fetch anyone else's. A leaderboard shown in the game would have to be sample data, and should say so.
If you're running a campaign and want people to submit scores, a short form on the game-over screen can send a name, email and score to you through the app's contact form. You then decide winners yourself, knowing that a score typed into a form can't be verified.
Limits
- No online leaderboards, ghosts of other players or multiplayer races.
- No in-game purchases or ads; the sandbox blocks payments and outside scripts.
- No verified scores for prizes.
For handcrafted levels rather than endless ones, see the platformer game maker. For a short game tied to a marketing campaign, read branded games, and for how templates work, the templates gallery.
Questions people ask
Can I use an endless runner game maker without coding?
With Anticode, yes: you describe the game and ask for changes in sentences. Pro mode shows the code if you want to read it, but you don't need to.
Will it run smoothly on older phones?
Simple shapes and a fixed number of particles keep it light. If it stutters on your phone, ask for fewer effects or a lower canvas resolution on small screens.
Can I put my logo in the game?
Yes. Add the image to the build and say where it goes, such as the title screen or on the runner's shirt.