<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: larinius</title>
    <description>The latest articles on DEV Community by larinius (@smallcabbage).</description>
    <link>https://dev.to/smallcabbage</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F943890%2F9c428b3f-c732-46bd-a062-9f35b70d5fc1.jpg</url>
      <title>DEV Community: larinius</title>
      <link>https://dev.to/smallcabbage</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smallcabbage"/>
    <language>en</language>
    <item>
      <title>I'm building a text based, online TUI-RPG in Rust</title>
      <dc:creator>larinius</dc:creator>
      <pubDate>Thu, 04 Sep 2025 16:55:21 +0000</pubDate>
      <link>https://dev.to/smallcabbage/im-building-a-text-based-online-tui-rpg-in-rust-4mdc</link>
      <guid>https://dev.to/smallcabbage/im-building-a-text-based-online-tui-rpg-in-rust-4mdc</guid>
      <description>&lt;p&gt;For the past while, I've been diving deep into a passion project: a classic, client-server, text-based RPG that runs entirely in the terminal (a TUI). It's built in Rust, using QUIC for fast and secure networking.&lt;/p&gt;

&lt;p&gt;We've just finished implementing a bunch of core features that are really starting to make it feel like a living game, and I wanted to share a recap of what's under the hood!&lt;/p&gt;

&lt;h3&gt;
  
  
  Here's a quick rundown of the features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fully Data-Driven World:&lt;/strong&gt; Every single thing—items, NPCs, skills, quests, and even branching conversations—is loaded from simple JSON files. This makes creating new content incredibly fast and opens the door for future modding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Robust FSM-based Dialog System:&lt;/strong&gt; Conversations aren't just linear text. The system is a true finite state machine where player choices can trigger:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Skill &amp;amp; Attribute Checks:&lt;/strong&gt; (e.g., &lt;code&gt;[Strength Check: 15] Intimidate the guard.&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Transactions:&lt;/strong&gt; Pay an NPC, bribe a guard, or buy an item directly in dialogue.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Branching Narratives:&lt;/strong&gt; The conversation flows based on the success or failure of your actions.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Centralized "Effect Applicator" &amp;amp; System Narrator:&lt;/strong&gt; This is the architectural core. Any action in the game (eating an apple, choosing a dialog option, equipping a sword) generates a list of "Game Effects." A single, central system processes these effects, which means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;It handles all state changes:&lt;/strong&gt; Modifying stats, adding/removing items, changing money, equipping gear.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;It auto-generates clear player feedback.&lt;/strong&gt; This creates a "System Narrator" that tells you exactly what happened in a clean, consistent format, just like in classic RPGs:

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;You feel more energetic. [+2 Endurance added]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;Dull Knife [-1 Atk] removed from inventory.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;10 coins removed from your purse.&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic ASCII/Braille Art Rendering:&lt;/strong&gt; This is my favorite feature. The game can take any image file (for NPC portraits, area maps, or the world map) and render it as high-quality Braille art directly in the terminal. The world map even supports &lt;strong&gt;panning and zooming&lt;/strong&gt;!&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw3k1j0ky16t3snf4sb8p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw3k1j0ky16t3snf4sb8p.jpg" alt=" " width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Intelligent Client-Side UI:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Smart Command Parser:&lt;/strong&gt; Uses fuzzy matching to correct typos and understands a wide range of aliases (&lt;code&gt;l&lt;/code&gt; for &lt;code&gt;look&lt;/code&gt;, &lt;code&gt;inv&lt;/code&gt; for &lt;code&gt;inventory&lt;/code&gt;, etc.).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Context-Aware Actions:&lt;/strong&gt; The &lt;code&gt;use&lt;/code&gt; and &lt;code&gt;unequip&lt;/code&gt; commands are tied to the UI. You just navigate your inventory with the arrow keys, type &lt;code&gt;use&lt;/code&gt;, and the game knows exactly which item you mean.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Full Equipment &amp;amp; Stat System:&lt;/strong&gt; Players can equip/unequip items into specific slots (&lt;code&gt;Weapon&lt;/code&gt;, &lt;code&gt;Armor&lt;/code&gt;). Stats update in real-time, and equipped items are clearly marked in the UI. Stats like Endurance can even be "overcharged" above their maximum.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live World Ticker:&lt;/strong&gt; The game world has its own clock. NPCs will eventually move, and timed events (like traveling between locations) are handled with progress bars, making the world feel persistent.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;It's been a massive learning experience, especially getting the client-server architecture right and ensuring the game state is always consistent. The focus has been on building a solid, scalable foundation before piling on tons of content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Building a multiplayer TUI-RPG in Rust with a data-driven world, a proper FSM dialog system with skill checks, and dynamic maps that are rendered from images as ASCII art in the terminal.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
