cd /news/ai-products/generating-levels-in-real-time-with-… · home topics ai-products article
[ARTICLE · art-134860] src=spritefusion.com ↗ pub= topic=ai-products verified=true sentiment=↑ positive

Generating levels in real time with the Jev model

TypeSafe's Jev model generated platformer levels in real time at 319–375 ms latency and an estimated $0.00057 per request, according to a September 15, 2026 test by developer Hugo. The zero-shot classifier, priced at $0.042 per million input tokens with free output tokens, returned structured terrain choices — widths of 2, 3 or 5 blocks, gaps of 0, 1 or 2 blocks, and heights in rows 4–9 — across 5 requests in the demo for an estimated total cost of $0.00286. The test found latency stable over extended play, positioning cheap structured-output models as viable for runtime game generation.

by read3 min views1 publishedSep 20, 2026
Generating levels in real time with the Jev model
Image: source

Hugo -

On September 15, 2026, TypeSafe introduced Jev, a model designed to return structured outputs with low latency and low cost. "Eh but that's just a classifier". Ok; but can it generate a platformer level in real time? Let's see!

Why Jev looks promising for games #

Unlike text-gen. models such as GPT or Fable, Jev is designed to return structured decisions. In short, it's a zero-shot classifier: it gives you picks with probabilities attached rather than raw text.

Now, there are two major bottlenecks to using AI at runtime in games:

  1. Latency. In most cases, you can't afford to wait five minutes for a model to think.
  2. Cost. Some will disagree, but I think current LLM pricing makes them pointless for games. It makes no sense to me to pay for expensive API calls if I talk more to the tavern keeper.

Jev promises to help with both: sub-second responses at $0.042 per million input tokens, with free output tokens. Source

Ok. Let's test the claims by fire.

Preparing a test game #

For this experiment, I wanted a runner game prototype in a neon-night style. Serious things here, we'll use Sprite Fusion for pixel art generation, PhaserJS, and Codex with Astra.

Ninja Runner assets

You

Use the Sprite Fusion API to create a neon-night ninja sprite + animations for a runner game.

Codex

I created the sprites and animations, and added movement and collisions.

Generating levels with Jev #

Feeding the game state & context

First, we take a snapshot of the game state: player position and velocity, current terrain blocks, dash state, etc. We send that in the request to Jev alongside some example terrain layouts.

{"x":158.86,"y":86.87,"vx":2.27,"vy":-2.34,"grounded":false,"dash_ready":true}

Jev request

The task we give Jev is fairly simple: given the current game state, how would you fill the next slice of terrain? We ask about widths, gaps, heights and surface types through several choice questions, all sent in one API call. Here are the options we allow:

Options we allow
  • Surface type
  • Solid roof or one-way ledge
  • Width
  • 2, 3 or 5 blocks
  • Gap before it
  • 0, 1 or 2 blocks
  • Height
  • Rows 4–9
Choices Jev made
The four surfaces from one recorded Jev response. Gap is measured before each surface; row numbers increase downward.
Surface Type Width Gap before Height
--- --- --- --- ---
1 Ledge 2 blocks None Row 5
2 Ledge 3 blocks 1 block Row 6
3 Ledge 5 blocks 2 blocks Row 5
4 Solid roof 2 blocks None Row 4

Terrain built from those choices

My code then places the chosen blocks and gaps.

So, costs and latency ?

  • Requests (in this demo)
  • 5
  • Jev API latency
  • 319–375 ms
  • Est. average cost / request
  • $0.00057
  • Est. cost / demo
  • $0.00286

Well, it's not bad at all. Jev generates the terrain fast enough to keep the runner moving, at a very low cost. It's not sub-100ms latency nor free but interersting enough to pay attention for games.

I've played the demo for longer, and the latency stays stable. Level generation keeps working fine.

Conclusion #

Promising! There are plenty of ways to generate levels using handwritten rules and heuristics, I know. But still, cheaper and faster structured output models opens up a whole range of ideas and experiments for games. I'm gonna share more soon.

Sources and acknowledgments #

── more in #ai-products 4 stories · sorted by recency
── more on @typesafe 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/generating-levels-in…] indexed:0 read:3min 2026-09-20 ·