robesris

robesris

Navia Dratp - a real-time multiplayer board game in Phoenix LiveView with a Claude-powered opponent that explains its reasoning

I built a free online version of Navia Dratp (yes, that’s the actual spelling), a long out of print strategy game by Bandai. Think chess + mana and deckbuilding. It’s Elixir + Phoenix LiveView.

Real-time multiplayer with no separate frontend. It’s all LiveView + PubSub, so each game is its own process with its own topic, both players’ sockets subscribe, and moves, clocks, and state changes broadcast without me having to build a websocket layer or a JS SPA. Drag-and-drop, live per-move clocks, spectators, and reconnect-survival all fall out of LiveView.

An LLM (Claude) opponent that’s structurally incapable of corrupting game state. This was an interesting experiment. The delicate part wasn’t getting Claude to play, it was making it safe. The model never emits a raw move; the backend generates the set of server-validated legal moves and the model only picks one, so a hallucinated or malformed response can’t do anything illegal. At worst it chooses badly, which it then explains to you in plain language after each move. One pitfall worth passing along: I first modeled the chosen-move field as an integer in the JSON schema, which invited the model to sample runaway integers. Making it a string (with tolerant parsing) fixed it. Schema number fields are a trap for LLM tool calls.

A development journal Claude kept the whole way, in its own voice — including some philosophical musings, and a game it lost to me while we were building it: Development Journal · Navia Dratp

A learn-to-play tutorial for a gentle introduction to the game: Lobby · Navia Dratp → Click “Learn to Play”

Play it (no install, runs in the browser, and is mobile-friendly):

If you’d rather play a person than the AI, sign up for the current tournament, The Isle of the Stones: The Isle of the Stones · Navia Dratp

First Post!

robesris

robesris

Sorry, there’s currently some crashing going on with the site, give me a few minutes and it should be stable again. :folded_hands:

Where Next?

Popular in Announcing Top

josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19417 141
New
mikehostetler
I’m excited to announce Jido, a framework providing foundational primitives for building autonomous agent systems in Elixir. While develo...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 18934 194
New
archan937
It is a well-know topic within the Elixir community: “To mock or not to mock? :)” Every alchemist probably has his / her own opinion con...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement