JM /
Juan Martinez

JUAN MARTINEZ · AI ENGINEER

Making worlds.
Building intelligence.

Machine Learning, Deep Learning, Reinforcement Learning, Creative AI (2D, 3D), NLP, Gameplay AI, Data Science & Analytics

13 game reels32 public repositories∞ things to explore
FEATURED / GAMEPLAY AI

Runeboard ↗

A Runeboard campaign in progress: Orthanc and the mountains of Isengard on the hex map, with the leader journal open

Hex-and-card strategy game with layered Utility AI, blackboards, hierarchical task planning, behaviour trees, and an MLP for strategic decisions.

Read the dev diary ↗
GAME DEVELOPMENT ✳ GENERATIVE AI ✳ NLP & DATA SCIENCE ✳ OPEN SOURCE

01 / AI R&D

Qwen-Image 2.1,
4× faster.

Nihonga: my pruned and distilled Qwen-Image 2.1. Two of its 32 blocks removed,
10 steps instead of 40, and it still spells its signs right.
Open weights on Hugging Face, with the full research log.

02 / STUDIO WORK

Three games.
One tiny engine.

My day-to-day work at Agonia: HTML5 games for the FRVR platform.
The repositories are private, so this is the tour.

Possum Archaeologists key art: a possum in a safari hat holds up a rubber duck beside a shovel in an excavated junkyard
AGONIA · HTML5 / WEBGL · RELEASED

Possum Archaeologists

Two possum archaeologists have excavated a junkyard and are entirely convinced they have found priceless ancient relics. It is a rubber duck. It is a broken flip phone. They do not care — every piece of rubbish is solemnly catalogued under its museum name, and a bottle cap becomes the Crown of the Fizz King.

Underneath the joke it is a tile-pile matcher. Only uncovered relics can be tapped, three of a kind clear, and the seven-slot tray never gets any bigger.

  • 77KB of gzipped JavaScript for the entire game — engine, interface and all. No Unity, no three.js, no Phaser: raw WebGL and TypeScript on Bun.
  • One draw call for most frames. Sprites, particles and the whole UI share a single texture atlas and a single batch.
  • A skinned-mesh renderer written from scratch, so the mascot is a real rigged 3D character standing over a 2D board — 334KB for eleven animations, where baked sprite sheets cost 574KB for one.
  • A cheap Android phone is the floor. 60fps target, zero allocations in the frame loop, and a second shading path for GPUs that refuse the fast one.
  • Live from day one: weekly tournaments, a daily leaderboard, cloud saves, remote difficulty tuning and churn funnels.

Almost all of the content is produced by an agentic pipeline. A concept-artist agent sets the visual direction; a technical artist generates sprites and drives image-to-3D character generation and rigging; an audio agent writes the sound effects and voice lines; a marketing agent captures gameplay and builds the store set. Each runs on a least-privilege tool allowlist, each is cost-gated before it may spend a cent, and none of them is allowed to call the work done — a read-only verifier does that.

TYPESCRIPTRAW WEBGLBUNFRVR SDKAGENTIC PIPELINE

Closed source — it lives in a private studio repository, so there is nothing to click. Everything shown here is a capture of the running build, not a render.

Dig sites are generated: shape, depth and relic mix change every run.
Dig sites are generated: shape, depth and relic mix change every run.
Today’s Trench — one date-seeded dig, the same for every player, every day.
Today’s Trench — one date-seeded dig, the same for every player, every day.
Score attack. Combo chains up to x8, runs ranked E through S+.
Score attack. Combo chains up to x8, runs ranked E through S+.
Glowdoku key art: a neon sudoku board under ASCII mountains, one placed digit firing four beams of light across its row and column
AGONIA · HTML5 / WEBGL · RELEASED

Glowdoku

Sudoku, lit up. Every correct number fires beams of light across the board. 1, 4 and 7 share a colour, so do 2, 5, 8 and 3, 6, 9 — hit a number in the same family and it bursts; cross two beams and they resonate.

The rules are pure sudoku. The light is how it feels, and it is also the score: it charges a ladder of bars from DULL to EFFULGENT, each full bar hands something back, and a mistake drains it.

  • 54KB of gzipped JavaScript for the whole game; the six ambient tracks stream in after the first frame.
  • Scenery with no image files. The mountains, pines, river and the toad are glyphs drawn through the same atlas as the digits, moving in time with the music.
  • Eight neon skins, eight typefaces, one texture, so switching skin costs nothing at runtime.
  • Hints that teach: a hint names the sudoku technique instead of just revealing the digit.
  • Built to come back to: a daily puzzle that is the same board for everyone, with streaks; 100 adventure levels, each with a single logical solution; and an E to S+ rank on every win.
TYPESCRIPTRAW WEBGLBUNFRVR SDKASCII ART

Closed source, so there is nothing to click. The screenshots are captures of the running build; the key art was generated from one of those captures.

One placement fires four beams; two land on same-colour numbers and burst.
One placement fires four beams; two land on same-colour numbers and burst.
The daily puzzle, solved: a rainbow wave rolls across the grid to the music.
The daily puzzle, solved: a rainbow wave rolls across the grid to the music.
A rank on every win, scored on time and light.
A rank on every win, scored on time and light.
Catnap title screen: the Catnap logo with a sleeping calico on top, over a sky of floating islands
AGONIA · HTML5 / WEBGL · RELEASED

Catnap

Small cats. Big problems. A tower defense where the towers are cats, and the cats would rather be asleep. Meowses, Cockroatches, a Purrmba robot vacuum and Purrgeons march up the garden path to the house, and a cat that has dozed off only wakes when something walks into its reach.

Every cat sits on its own furniture — a Box cat ambushes from a cardboard box, a Tree cat swats from a cat tree, a Lamp cat throws sparks from a lamp post — and each one upgrades through four tiers.

  • 49KB of gzipped JavaScript for the game; the painted art streams in per level, downloaded only when that level unlocks.
  • 18 cats, 12 pests, seven damage types. Physical, fire, electric, poison, frost, water and bleed build up statuses; pigeons fly, so only cats that hit the air can reach them, and a cardboard mimic stays hidden until a cat’s range reveals it.
  • 18 levels on floating garden islands, authored in a level editor that ships inside the game.
  • Animated from generated sprite sheets. Each 16-frame sheet is anchored to an approved first frame with a registration dot in every cell, then cleaned and stabilized in software so the cat never drifts in its cell.
TYPESCRIPTRAW WEBGLBUNFRVR SDKTOWER DEFENSE

Closed source, so there is nothing to click. Every image here is a capture of the running build, not a render.

The Orchard, round 3: a lamp cat’s sparks, a fishbowl splash and bees from the hive.
The Orchard, round 3: a lamp cat’s sparks, a fishbowl splash and bees from the hive.
Tap a cat to upgrade, boost or sell it; its reach is drawn on the tiles.
Tap a cat to upgrade, boost or sell it; its reach is drawn on the tiles.
Front Yard, the first level, before the first wave.
Front Yard, the first level, before the first wave.

03 / IN MOTION

A little less talk.
A little more play.

A collection of gameplay moments.
Press play to explore each game, or open a GIF.

02

Possum Archaeologists

Studio project · real capture

GIF ↗
03

Glowdoku

Studio project · real capture

GIF ↗
04

Catnap

Studio project · real capture

GIF ↗
06

Bubble Dragons

Gameplay reel

GIF ↗
07

California Rush

Gameplay reel

GIF ↗
08

Bomb ’n Bloom

Gameplay reel

GIF ↗
11

Lantern Splash

Gameplay reel

GIF ↗
12

Rainbow Over Fuji

Gameplay reel

GIF ↗
13

Remember Moscow

Gameplay reel

GIF ↗

04 / APPLIED AI

Creative AI.
Methods & tools.

Image adaptation, controlled generation,
and retrieval-based NPC dialogue.

05 / THE SOURCE

Built. Shared.
Always learning.

Every public repository, organized by focus.
Forks are collected separately.

Games & worlds

04

AI & creative tools

11
Python↗

concept-art-generator

Concept Art Generator: an elderly wanderer mage draft awaits human approval before the transparent 2K final is unlocked

Generates concept art from isolated style references using GPT Image or a trained LoRA. Requires human approval before exporting transparent 2K finals.

Python↗

qwen-image-lora-studio

Qwen-Image LoRA Explorer: prompt box, LoRA gallery, custom LoRA path, speed/quality mode and the generated image panel

Trains private Qwen-Image LoRA adapters on captioned artwork, then serves image generation through Gradio and an asynchronous API. Supports background removal and upscaling.

Python↗

FLUX-1-dev

Flux LoRA Studio: two LoRA slots with scale sliders, a custom LoRA field, the LoRA Explorer gallery and the generated image panel

Gradio workbench for FLUX.1-dev inference and LoRA training on image-caption pairs, with quantization and multi-GPU training options.

Python↗

mindcraft

Galadriel answers “What do you think of the Rings of Power?” in character, powered by 4-bit quantized Zephyr 7B, ChromaDB and vLLM

Python library for NPC dialogue using LLMs, retrieved world lore, short- and long-term memory, personality, mood, and motivations. Supports streamed inference with vLLM.

Jupyter Notebook↗

toxicity_es_transformers_shap

Highlighted text tokens align with signed SHAP attribution bars around a neutral baseline; bars are conceptual, not benchmark results.

Toxic-news classification with XLM-RoBERTa and Hugging Face Trainer, Optuna tuning, and SHAP explanations of model predictions.

Python↗

documentqa_back

Document chunks populate a vector index; a question retrieves context for a source-grounded answer.

Document question-answering backend built with FastAPI, LangChain, OpenAI, and Chroma vector storage. Includes user authentication and Docker deployment.

TypeScript↗

documentqa_front

A compact client interface separates document selection from question entry and returned answers.

React and Vite frontend for the document question-answering application, paired with the Document QA backend.

TypeScript↗

TeaNLP-front

An editor palette and node canvas illustrate the Angular frontend for composing NLP graph workflows.

Angular frontend for TeaNLP: a graph-based interface for transforming, extracting, and analyzing text.

Python↗

sparknlp-huggingface-gradio

A disease mention is highlighted in biomedical text above the tokenizer, embedding, and named-entity stages.

Demonstrates a Spark NLP named-entity recognition pipeline using a model from Hugging Face, with a Gradio interface and biomedical training data.

Python↗

TeaNLP

A sample sentence carries part-of-speech tags and grammatical links, illustrating structured NLP annotations.

NLP graph project for transforming, extracting, and analyzing text; the documentation includes part-of-speech tag references.

Notes↗

anonymizer

Neural recognition identifies names and dates while regex detects an email; the output masks those text spans.

Combines Flair neural entity recognition with regular expressions to anonymize text extracted from PDFs, including names, dates, and Spanish identifiers.

Data & open source

04

Learning & notes

05

Forks & explorations

08
Portrait of Juan Martinez

A BIT ABOUT ME

Games meet language.
Curiosity does the rest.

AI Engineer: Machine Learning, Deep Learning, Reinforcement Learning, Creative AI (2D, 3D), NLP, Gameplay AI, Data Science & Analytics

Find me on LinkedIn ↗