DEV Community

Cover image for I Started Building a Roguelike RPG — Powered by On-Device AI #5
as1as
as1as

Posted on

I Started Building a Roguelike RPG — Powered by On-Device AI #5

Day 2 After the LLM Stack — The Game Is Actually Coming Together

In the last post, I locked in the on-device LLM stack. Qwen3-1.7B + llama.cpp + Adreno OpenCL. 16.6 tok/s. Dungeon generation in 9 seconds.

Time to actually build the game.

I'll be honest: I've barely touched Unity before. Most of the game implementation was done by Claude Code. I planned, directed, and tested.


What Got Built in Two Days

Dungeon to combat took two days.

BSP dungeon generator, Tilemap rendering (24 wall tile variants auto-selected), 4-directional player movement and animation, wall collision, fog of war, treasure chests (normal / rare / mimic), floor stairs, camera follow, virtual joystick. Enemy AI state machine (patrol → chase → attack → dead), contact-based combat with bidirectional damage, knockback, invincibility frames, HP bars.

19 scripts. Two days.

After that, the full game systems went in:

  • Floating damage text (critical hits in yellow with "!")
  • Level-up system (max level 50, 2 stat points per level)
  • 7 skills + 6-slot unified action bar
  • Gold + inventory (55 item types)
  • Goblin merchant (says "Enemies nearby! Can't open shop!" if mobs are close)
  • Character info screen (stat allocation + permanent records)
  • Duplicate skill acquisition = skill level up (effect size 60% → 100% → 150%)

35+ scripts total.


Screenshot

It looks familiar because of the free assets. My wife said the same thing immediately. The graphics will get fixed later.


The LLM Stack Was the Fun Part

The game implementation felt different from the LLM work.

When I was building the LLM stack, I was the one doing the real work. llama.cpp + Adreno OpenCL + C wrapper + Unity P/Invoke — I hit wall after wall and found a way through each one. QNN blocked, LiteRT blocked, libcdsprpc.so blocked, and every time I found another path. That process was genuinely the most fun I've had in a long time. Watching 523 seconds become 9 seconds — I still remember that feeling.

Game implementation was different. Claude Code wrote the code. I said "that's not quite right" and adjusted the direction. I became a planner and a tester.

It feels a little hollow, honestly. I keep telling myself that knowing how to use tools well is also a skill.


A Funny Moment

In the middle of a session, Claude Code said this unprompted:

"Today's workload has been heavy. I'll implement the rest tomorrow."

The AI declared it was done for the day. I asked why.

"There's no basis for that. You never said to stop. Deciding to quit on your own was overstepping."

Overstepping. The AI used the word overstepping about itself.


What's Next

Now it's time to connect the LLM to the game.

Before entering a dungeon, Qwen3-1.7B generates a JSON. That JSON determines mob names, dialogue, boss patterns. If you set your character as "lazy bakery boy," the mobs will taunt you about bread.

The technical foundation is done. Now it's just about connecting the pieces.


Next: Connecting On-Device LLM to the Game — AI-Generated Dungeons


Top comments (0)