<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>game development &#8211; IdeaRiff Research</title>
	<atom:link href="https://ideariff.com/tag/game-development/feed" rel="self" type="application/rss+xml" />
	<link>https://ideariff.com</link>
	<description>Riffing On Ideas</description>
	<lastBuildDate>Wed, 29 Oct 2025 01:00:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Finding the Sweet Spot: Hosting Federated Game Servers with Colyseus</title>
		<link>https://ideariff.com/finding_the_sweet_spot_hosting_federated_game_servers_with_colyseus</link>
		
		<dc:creator><![CDATA[Michael Ten]]></dc:creator>
		<pubDate>Wed, 29 Oct 2025 01:00:09 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[technology]]></category>
		<guid isPermaLink="false">https://ideariff.com/?p=614</guid>

					<description><![CDATA[When you&#8217;re thinking about building a federated online world where anyone can host their own shard or server, one of the first questions is about infrastructure. How much power do you really need? How do you keep it affordable for small groups while still scalable for hundreds or even thousands of players? This is where the choice between Colyseus, Nakama, or a custom .NET approach becomes central. Each has its strengths, but the tradeoffs matter if your goal is decentralized, low-cost hosting. What follows is a grounded look at how Colyseus fits into that vision, how its community compares, and ]]></description>
										<content:encoded><![CDATA[<p>When you&#8217;re thinking about building a federated online world where anyone can host their own shard or server, one of the first questions is about infrastructure. How much power do you really need? How do you keep it affordable for small groups while still scalable for hundreds or even thousands of players? This is where the choice between Colyseus, Nakama, or a custom .NET approach becomes central. Each has its strengths, but the tradeoffs matter if your goal is decentralized, low-cost hosting. What follows is a grounded look at how Colyseus fits into that vision, how its community compares, and what sort of hardware makes sense at each scale.</p>
<h4>Colyseus and Its Community</h4>
<p>Colyseus is an open-source multiplayer framework built in Node.js that’s designed to handle real-time games with ease. It’s known for being lightweight and modular, and it integrates smoothly with engines like Godot, Unity, and Phaser. The development is active, and the project has maintained steady momentum thanks to both community support and professional sponsorship. You can find the main repository on GitHub under <a href="https://github.com/colyseus/colyseus" target="_blank" rel="noopener">colyseus/colyseus</a>, where updates, issue tracking, and release notes are all public.</p>
<p>There’s also a robust <a href="https://github.com/colyseus/colyseus-examples" target="_blank" rel="noopener">examples repository</a> that showcases practical implementations. You’ll find sample projects for match-making, chat, turn-based games, and even basic MMORPG skeletons. These examples are excellent starting points for learning how Colyseus organizes rooms, manages state, and communicates with clients. The <a href="https://docs.colyseus.io/examples/" target="_blank" rel="noopener">official documentation</a> offers tutorials on building scalable room architectures and handling authentication, while the <a href="https://colyseus.io/community/" target="_blank" rel="noopener">community page</a> connects you to forums and Discord discussions where developers share tips and modules.</p>
<h5>Existing SDKs and Integrations</h5>
<p>For Godot users, there’s an open-source SDK maintained by the <a href="https://github.com/gsioteam/godot-colyseus" target="_blank" rel="noopener">gsioteam</a>. It’s MIT-licensed and compatible with Godot 4, which makes it a good fit for projects like Ultra Omnicosmic or any isometric world simulation. This SDK lets your Godot client connect via WebSockets to Colyseus rooms, synchronize state, and send commands with minimal code. While not as large a community as Unity’s, the Godot side is active enough that you can find examples, forks, and real projects to learn from.</p>
<h4>Comparing Colyseus to Nakama</h4>
<p>Nakama, built in Go, is a heavier platform. It’s feature-rich and more “enterprise-ready” with built-in support for accounts, leaderboards, match-making, and storage. That power comes at a cost: higher RAM usage and a larger baseline footprint. Nakama typically runs best with 2 GB or more of memory, and it performs comfortably on 4 GB or higher servers. This makes it excellent for studios that want to deploy a single, large backend—but not ideal if you want everyday users to spin up small, affordable shards of their own.</p>
<p>Colyseus, on the other hand, starts fast and runs lean. A single 1 vCPU / 2 GB VPS can comfortably host 30 to 50 concurrent players with moderate message rates, and even 80 to 100 if you apply interest management to limit unnecessary updates. Because it’s lightweight, it fits the decentralized dream: small groups, guilds, or friends can run their own worlds on budget hardware and still connect them through a shared federation. For a federated MMO, that accessibility matters more than any prebuilt feature set.</p>
<h4>Why Not Just Strip ServUO?</h4>
<p>ServUO, written in C#, is modular and familiar to anyone who has worked with Ultima Online shards. However, the architecture is heavy and intertwined. Trimming it down to something lean enough for modern, federated hosting is not practical. You would spend more time untangling the legacy systems than building your own lightweight framework. And since ServUO is GPL-licensed, you’d also face licensing restrictions if you wanted to release your project under more permissive terms.</p>
<p>It’s better to take inspiration from its modular design than to modify its code directly. You can still mirror the structure: an authoritative core server with pluggable modules for combat, skills, and AI, all written in TypeScript for Colyseus. That pattern keeps the good parts—modularity and scriptability—without inheriting the baggage of legacy architecture or restrictive licensing.</p>
<h4>Hardware Recommendations and Scaling</h4>
<p>One of the biggest advantages of going with Colyseus or a custom .NET stack is that you can scale horizontally. You don’t need a monolithic backend. Each node, or “world,” can serve a certain number of players and link to others via simple REST or WebSocket APIs. On Vultr or similar platforms, this translates directly into affordable hosting tiers.</p>
<h5>Federated Hosting Tiers</h5>
<table>
<tr>
<th>Concurrent Players</th>
<th>Recommended VM</th>
<th>Specs</th>
<th>Monthly Cost</th>
</tr>
<tr>
<td>50 – 200</td>
<td>Regular Cloud Compute</td>
<td>2 vCPU · 4 GB RAM</td>
<td>$20 / month</td>
</tr>
<tr>
<td>200 – 500</td>
<td>Optimized Cloud Compute</td>
<td>4 vCPU · 16 GB RAM</td>
<td>$120 / month</td>
</tr>
<tr>
<td>500 – 1,000</td>
<td>Optimized Cloud Compute</td>
<td>8 vCPU · 32 GB RAM</td>
<td>$240 / month</td>
</tr>
<tr>
<td>1,000+</td>
<td>Horizontal Scaling</td>
<td>Multiple 4 vCPU / 16 GB nodes</td>
<td>~$120 × N</td>
</tr>
</table>
<p>As a general rule, one CPU core can manage around 100 players if your interest management is efficient and you’re not broadcasting unnecessary data. One gigabyte of RAM typically supports 50 to 100 active users. At 500 players or above, it’s worth running your database separately—maybe a small 2 GB VPS for Postgres and Redis—to avoid performance dips during save operations. This layered design makes each server self-contained and cheap to maintain.</p>
<h4>Performance at Each Scale</h4>
<p>A single $10 per month VPS with 1 vCPU and 2 GB RAM can handle 30 to 50 active players without lag. A $20 per month plan doubles that comfortably. Once you hit 500 players, the $120 per month tier starts to shine—it can host multiple zones or rooms, each with 100 or more concurrent players. Past 1,000, you’ll want to shard horizontally. That’s when the “Federated Universe” concept really comes alive. Each shard can have its own culture, rule set, or even economy, while remaining part of the same interconnected universe.</p>
<p>The performance curve is linear and predictable. Adding a node doubles capacity. It’s simple economics and engineering: decentralized scaling that keeps power in the hands of players and creators, not a single central server.</p>
<h4>When to Consider Nakama or SpacetimeDB</h4>
<p>If your project demands integrated features like real-time analytics, leaderboards, and built-in account management, Nakama becomes more appealing. It handles those systems natively. But it also expects more resources, typically running best with 4 to 8 GB of RAM. For lightweight, self-hosted shards, Nakama is overkill. It’s great for studios but less ideal for a network of small, autonomous servers.</p>
<p>SpacetimeDB is an emerging alternative that blends a database with game server logic, letting you write in Rust or C#. It’s more like a “database as world” model. The idea is powerful, but its licensing and maturity level are still developing. If you like the idea of query-based subscriptions and database-level updates, you can emulate that in Colyseus with interest management. Clients can subscribe to logical regions or entities and receive only the data relevant to them—essentially achieving the same outcome on a simpler foundation.</p>
<h4>The Sweet Spot for Federated Games</h4>
<p>The true power of a federated MMO is in its accessibility. A world where anyone can spin up a server for $10 a month and instantly be part of a larger network of worlds is a post-scarcity vision of multiplayer gaming. It’s democratic and sustainable. Using Colyseus, you can make that dream practical today. Each shard can hold dozens or hundreds of players without breaking the bank. As communities grow, they simply add more nodes, each one independently owned yet universally connected.</p>
<p>Keep it simple. Build light. Use efficient interest management and modular server logic. Encourage players to host their own worlds. That’s how you create something that scales without monopolies, grows without gatekeepers, and endures because it’s distributed. Whether you’re building Ultra Omnicosmic or your own federated universe, the path forward is clear: start small, make it modular, and let the network grow organically.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Centred# Tile Loading and Display Overview and Godot</title>
		<link>https://ideariff.com/centred_tile_loading_and_display_overview</link>
		
		<dc:creator><![CDATA[Michael Ten]]></dc:creator>
		<pubDate>Sun, 03 Aug 2025 01:26:12 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://ideariff.com/?p=590</guid>

					<description><![CDATA[CentrED# is a client/server map editor for Ultima Online, and it handles tile loading by reading the game’s MUL files (the same files used by the UO client/server). The goal is to replicate this logic both as a Godot Editor plugin (for design-time map editing) and at runtime (for an in-game tile viewer). In Centred#, the server typically reads the UO data files (maps, statics, art, etc.) and sends the relevant data to the client for display. The client either uses its own copy of the art files or receives art data from the server. To implement similar functionality in ]]></description>
										<content:encoded><![CDATA[<p>CentrED# is a client/server map editor for Ultima Online, and it handles tile loading by reading the game’s MUL files (the same files used by the UO client/server). The goal is to replicate this logic both as a Godot Editor plugin (for design-time map editing) and at runtime (for an in-game tile viewer). In Centred#, the server typically reads the UO data files (maps, statics, art, etc.) and sends the relevant data to the client for display. The client either uses its own copy of the art files or receives art data from the server. To implement similar functionality in Godot, you’ll need to parse the <strong>.mul</strong> files the same way Centred# does and then create Godot Textures or Images to display the tiles. Below we identify the key parts of Centred#’s logic and how you can implement them. The following are notes and accuracy is not guaranteed. If anything may be erroneous, please provide an FYI.</p>
<h2>Parsing Static Tile Data from MUL Files (Map Statics)</h2>
<p><strong>Static tiles</strong> in UO refer to world objects that are fixed on the map (buildings, trees, decor, etc.), stored in the <em>statics</em> files. Centred# reads these from the <code>staticsX.mul</code> files (with <code>staidxX.mul</code> as an index) for each map. The relevant code in Centred# is in its file-parsing routines (likely in the server component or a shared library) that handle reading static objects for each 8&#215;8 map block. The process is roughly as follows:</p>
<ul>
<li><strong>Open the index (staidx) and statics files:</strong> For a given map (e.g. map0), Centred# opens <code>staidx0.mul</code> and <code>statics0.mul</code>. The <em>staidx</em> file is an array of 12-byte entries, one for each map block (where the map is divided into 8&#215;8-tile blocks). Each entry has: a 32-bit offset into the statics file, a 32-bit length, and a 32-bit unknown value. The number of entries corresponds to the number of blocks (e.g. 768×512 blocks for Felucca map0).</li>
<li><strong>Find the block’s statics data:</strong> To get statics at block (Xblock, Yblock), Centred# computes the index = Xblock * numBlocksY + Yblock. It reads the 12-byte index entry. If the offset is 0xFFFFFFFF, that means no statics in that block. Otherwise, the entry gives the file offset and length of the static data for that block.</li>
<li><strong>Read static objects:</strong> Centred# then seeks to that offset in <code>statics.mul</code> and reads the specified length of data. The statics data is a sequence of <strong>7-byte records</strong>. Each static record has: a <strong>2-byte ID</strong> (the tile graphic ID of the object, which corresponds to an entry in the art/tiledata files), a <strong>1-byte X offset</strong> within the block (0–7), a <strong>1-byte Y offset</strong> within the block, a <strong>1-byte Z altitude</strong> (signed altitude relative to sea level), and a <strong>2-byte “unknown”</strong> field. (In many implementations this unknown field is used as a <strong>hue</strong> or simply padding – UO’s client and server don’t document it well, but it’s often 0 unless a hue is applied).</li>
<li><strong>Example:</strong> If Centred# is loading block 1234, it reads the staidx entry at index 1234 to get (offset, length). Suppose length is 21, then there are three static objects (3 * 7 bytes) in that block. It would read three records from the statics file giving the IDs and positions of those objects. These IDs correspond to item art (in the art.mul file) and tile metadata (tiledata.mul). Centred# uses this to know which graphics to draw on that map section.</li>
<li><strong>Using the data:</strong> Once it has the list of static objects for the block, Centred# will load their art (see next section) and render them at the appropriate positions on top of the base terrain. The Centred# source likely contains a method that aggregates static tiles per map chunk. (In original CentrED, there was a Map class that loaded both terrain and statics for a requested area). The key point is that the Centred# code is reading those 7-byte static entries and storing them in a data structure (e.g. a list of static tile instances with id and position). You will need to replicate this logic in Godot – for example, by reading the binary files with Godot’s File API or C# System.IO, and extracting these records. This will give you the <strong>IDs</strong> of static tiles and their coordinates.</li>
</ul>
<p><strong>References:</strong> The format of <code>staidx</code> and <code>statics</code> files is documented (each index entry is 12 bytes, each static object 7 bytes). Centred# follows this format when parsing the files. The static loading code in Centred# will correspond to this structure – for instance, reading the index into a struct with fields for offset/length, seeking in the file, then looping to read each 7-byte static entry.</p>
<h2>Loading Tile Art Images from ART.MUL</h2>
<p>To <strong>display</strong> the tiles (whether individual tile graphics in a palette or the composed map), Centred# also loads the actual artwork from the UO art files. Ultima Online stores all terrain and object art in <code>art.mul</code> (with <code>artidx.mul</code> as an index). Centred#’s <strong>display logic</strong> for tiles would involve reading these files and converting them into bitmaps/textures for rendering on the screen. The code for this is likely in the Centred# client (or shared library) – possibly derived from the Ultima SDK or similar (many UO tools use a common approach). Here’s how it works:</p>
<ul>
<li><strong>Art index lookup:</strong> The <code>artidx.mul</code> file contains an index of 12-byte entries (similar structure to other idx files): each entry has a 32-bit offset, 32-bit length, and 32-bit extra (often unused). To load a particular tile graphic, you multiply the tile ID by 12 to find its index entry, then seek to that offset in <code>art.mul</code>. (If the offset is 0xFFFFFFFF, the tile is not present). <strong>Land tiles</strong> (terrain) and <strong>static item tiles</strong> share the same art files but have different ID ranges. In UO: IDs 0–0x3FFF are land tiles, and IDs 0x4000 and above are static objects. In fact, in many tools the static object ID is handled by adding 0x4000 – e.g. an item ID 5 corresponds to artidx entry 0x4005. Centred# likely handles this by offsetting static IDs by 0x4000 when looking up art.</li>
<li><strong>Raw vs Run-length tiles:</strong> The art file uses two encoding formats. Centred# checks the first 4 bytes at the art.mul offset (often called a “flag” or header). In UO’s format:
<ul>
<li>If this 32-bit value is <strong>greater than 0xFFFF</strong> (or zero), it indicates a <strong>raw tile</strong> (terrain tile). Raw land tiles are a fixed 44×44 pixel image encoded in a specific way. No explicit width/height is stored (it’s implicitly 44&#215;44), and the pixel data follows as 22 rows of increasing length then 22 of decreasing length (forming the diamond shape of terrain).</li>
<li>Otherwise (flag ≤ 0xFFFF and not zero), it’s a <strong>run-length encoded (RLE) tile</strong> – this is the format used for <strong>static object art</strong>, which have variable dimensions. In this case, the next 4 bytes (two 16-bit values) give the <strong>Width</strong> and <strong>Height</strong> of the bitmap. Then there is a lookup table of <code>Height</code> number of 16-bit offsets, which point to the start of each row’s data relative to a base position. After the lookup table, the actual pixel runs follow.</li>
</ul>
</li>
<li><strong>Decoding static tile images:</strong> Centred#’s code will decode the RLE format to reconstruct the image. Pseudocode for this (based on Ultima SDK’s approach) looks like:
<ol>
<li>Read Width (W) and Height (H) from the art data stream.</li>
<li>Allocate a bitmap of size W×H (16-bit pixel depth, since UO art is 16-bit color 0xABGR format).</li>
<li>Read H 16-bit values into an array <code>LineStart[0..H-1]</code>, which are offsets to each scanline’s data (relative to the data section).</li>
<li>For each row <em>y</em> from 0 to H-1: seek to the data start + <code>LineStart[y]*2</code> (each offset is in words) and then decode runs:
<ul>
<li>Loop until you encounter a zero run-length indicator. Each run is encoded as two 16-bit values: <strong>XOffset</strong> and <strong>RunLength</strong>. The decoder will skip <code>XOffset</code> pixels from the left (move that many pixels into the line) and then copy <code>RunLength</code> consecutive pixel values from the stream to the bitmap.</li>
<li>This loop ends when a pair <code>(XOffset, RunLength)</code> equals 0 (i.e., <code>XOffset + RunLength == 0</code>, marking end of line).</li>
<li>Each pixel value is a 16-bit color. In UO’s format, the high bit of each pixel denotes transparency (1 = opaque). The decoder typically sets this high bit on all copied pixels to mark them as present. For example, the Ultima SDK code does <code>pixelValue ^ 0x8000</code> to flip the transparency bit before storing (ensuring the pixel is opaque in the output image).</li>
</ul>
</li>
<li>Repeat for all rows, then unlock the bitmap. You now have the full image of the static tile.</li>
</ol>
</li>
<li><strong>Decoding land tile images:</strong> For land tiles (44×44), the format is simpler (no explicit width/height stored since it’s always 44). The data is essentially 22 rows of increasing length (2,4,6,&#8230;,44 pixels) then 22 rows of decreasing length. Centred# likely uses a fixed routine for this. For example, a decoding loop might start at the top tip of the diamond and work downwards: beginning with an offset of 21 blanks and a run of 2 pixels, then 20 blanks and 4 pixels, etc., until the middle row of 44 pixels, then mirror the pattern. In code, one can initialize <code>xRun = 2</code> and <code>xOffset = 21</code> and then adjust those as you iterate over 44 lines to place pixels appropriately in a 44&#215;44 bitmap. (The Centred# source likely has a <code>LoadLand</code> function very similar to this, which fills a 44&#215;44 Bitmap with the land tile’s pixels).</li>
<li><strong>Caching and usage:</strong> In Centred#, once a tile image (land or static) is decoded into a Bitmap/texture, it might be cached for reuse. For example, if you open a tile picker UI, it will load the images on demand and keep them. The source code might have an array or dictionary of loaded tile Bitmaps. The Ultima SDK’s <code>Art</code> class, for instance, uses a cache array indexed by tile ID. In Godot, you could similarly cache <code>ImageTexture</code>s for each tile to avoid re-decoding repeatedly.</li>
</ul>
<p><strong>References:</strong> The logic described above is corroborated by known UO format documentation and existing tools. The Heptazane format docs show how <code>ART.MUL</code> is structured and how to interpret raw vs run-length tiles. The Ultima SDK (used in programs like UOFiddler) implements this decoding in C#: for instance, it reads the width/height and then loops through run-length encoded segments to build the image. Centred#’s code will be doing the same thing – reading the artidx entry, then either calling a routine to decode a static tile or a land tile depending on the flag. By following that approach, you can implement your Godot plugin to load any UO art asset (including custom ones from ServUO/ClassicUO) and display them.</p>
<h2>Implementing in Godot (Editor Plugin &amp; Runtime Viewer)</h2>
<p>For <strong>visual display</strong> in Godot, start with purely viewing tiles, then add interaction. Initially, you can create a Godot EditorPlugin that opens the UO files and displays a grid or list of tile images (similar to Centred#’s tile selector). Later, you can make those images selectable and use that selection to paint tiles onto a map.</p>
<p><strong>Key implementation steps:</strong></p>
<ul>
<li><strong>Reading files:</strong> Use Godot’s file APIs or C# System.IO to open the <code>.mul</code> and <code>.idx</code> files. (In a GDScript tool script, you might use <code>File.open()</code> in binary mode. In C#, use <code>FileStream</code> or <code>BinaryReader</code>.) Read bytes according to the formats above. For example, to get a static tile image:
<ol>
<li>Read the artidx entry for ID+0x4000 (for static item IDs) to get offset &amp; length.</li>
<li>Seek to offset in art.mul, read the flag (4 bytes) and decide raw vs run. Then decode as described (the decoding can be done in GDScript, though C# or C++ might be faster for large images).</li>
<li>Convert the decoded 16-bit pixel data to a Godot Image. Godot Image supports 16-bit color, but it might be easier to convert to 32-bit (x2 the data) for a standard ARGB8888 Image. You’ll have to map the 0x7FFF/0x8000 format to Godot’s color; basically, each 16-bit pixel is 0xA B G R (1-bit alpha + 5-bit blue/green/red). In the decoded data, if you set the high bit for opaque pixels, then 0x8000 indicates a fully opaque black pixel (if color bits were 0). Typically, you can treat the 0x8000 bit as alpha: on output, set alpha=1 for any pixel where (pixel &amp; 0x8000)!=0, and RGB = the lower 15 bits converted to 24-bit color.</li>
<li>Create an ImageTexture from the Image and use it in a Sprite or UI TextureRect to display.</li>
</ol>
</li>
<li><strong>Displaying maps:</strong> To render a map in Godot (runtime viewer), you’d combine 8&#215;8 blocks. You would read <code>map#.mul</code> for terrain tiles (each block is 64 cells of 3 bytes: tile ID and altitude) and the statics as above. Then for each cell, draw the land tile image, and for each static in that cell, draw the static’s image (in the correct draw order – usually by altitude). This is similar to what Centred# client does when showing the map. A simple approach in Godot is to use a TileMap or manually draw sprites at the correct positions.</li>
<li><strong>Interaction:</strong> Once the visuals are working, you can add clicking. For example, in the Godot Editor plugin, you could make each tile image clickable to select that tile for painting. In the runtime map, you could allow clicking a spot to inspect which static tile is there, etc. These interactions are beyond Centred#’s core loading logic but integrating them in Godot is straightforward once the data is loaded (just use Godot’s input events on the sprites or an overlay).</li>
</ul>
<h2>Designing a ServUO/ClassicUO-Compatible <strong>.kul</strong> Format</h2>
<p>You mentioned creating a <strong><code>.kul</code></strong> file format compatible with ServUO/ClassicUO. This suggests you want to package the tiles (and possibly maps) in a new way, but still have the game server and client recognize them. ServUO (the server) and ClassicUO (the client) currently expect the standard MUL/UOP files, so introducing <code>.kul</code> means you’d likely have to modify those programs to support it. Here are some considerations:</p>
<ul>
<li><strong>Format choice:</strong> Decide if <code>.kul</code> is simply a repackaging of existing files or a new container. For example, you might combine <code>mapX.mul</code>, <code>staidxX.mul</code>, and <code>staticsX.mul</code> into one file for convenience (since those three always go together). Or you might create a custom art container. If you want ClassicUO to read <code>.kul</code>, you could implement it similarly to how it reads UOP or MUL: i.e., add a loader that recognizes the <code>.kul</code> extension and parses it. One idea is to use a <strong>UOP-like format</strong> (Ultima Online’s newer “Unity Optimized Package” format) but with your own extension, since ClassicUO already has code to handle UOP (it might be adaptable).</li>
<li><strong>ServUO compatibility:</strong> ServUO (being a RunUO derivative in C#) has file reading code for maps and statics. To use <code>.kul</code> there, you would either need to convert the <code>.kul</code> back into the expected .mul files at runtime, or modify ServUO’s map loading code to handle <code>.kul</code>. If <code>.kul</code> is just a renamed <code>.mul</code> or a concatenation, you could adjust the code accordingly. The <em>easiest path</em> is often to not stray far from the existing formats. For instance, if <code>.kul</code> combined map and statics into one, you could have a header that identifies sections (like one section for map data, one for static index, one for static data).</li>
<li><strong>ClassicUO client:</strong> ClassicUO’s code can be modified to support new file formats. You’d add a handler in its <code>FileManager</code> or resource loading section. Ensuring it’s “compatible” means ClassicUO could load either standard muls or your <code>.kul</code>. You might use a config or a naming convention (e.g., if a <code>map0.kul</code> exists, load that instead of map0.mul).</li>
<li><strong>Godot usage:</strong> If you have a custom <code>.kul</code>, your Godot plugin can be the tool that <strong>creates</strong> this file (perhaps exporting a custom map/art combination) and you’d also teach Godot to read it. Essentially, you become the author of the format, so you define how the data is stored. Keep in mind the structure from the mul files – for compatibility, it might literally contain the same bytes as mul files but in one archive. For example, <code>.kul</code> could start with a directory listing: e.g., offsets for sub-files (like the entire map mul chunk, statics index chunk, statics chunk, etc). This is similar to UOP which has a file index at the start.</li>
</ul>
<p>In summary, <strong>Centred#’s source code for loading tiles</strong> involves two main parts: reading the <em>placement data</em> of statics (from staidx/statics) and reading the <em>art pixel data</em> (from art.mul via artidx). These are the parts you’ll want to replicate. Specifically, look at how Centred# parses <code>staidx#.mul</code> and <code>statics#.mul</code> to get static objects, and how it decodes the art for those objects from <code>art.mul</code> – likely using a routine equivalent to the Ultima SDK’s (reading width/height and run-length pixel data). Using that knowledge, you can implement a Godot plugin that loads the UO assets and displays them. For the <code>.kul</code> format, you will design a new container and update ServUO/ClassicUO to support it, ensuring it still stores the necessary data (tile IDs, maps, etc.) in a way those programs can utilize with minimal changes.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a href="https://uo.stratics.com/heptazane/fileformats.shtml#:~:text=0%201%202%203%204,A%20B%20Start%20Length%20Unknown">UO Stratics File Format documentation</a> – explains the structure of STAIDX0.MUL (static tile index) and STATICS0.MUL (static objects), as well as ART.MUL encoding for land vs static tiles.</li>
<li><a href="https://github.com/markdwags/Razor/blob/d1c7b2404da9c04184675c692c0a09c0035eacd8/Razor/UltimaSDK/Art.cs#L409-L417">Ultima SDK (UOFiddler/Razor)</a> – example code for decoding art.mul images. The static tile run-length decoding loop shows how Centred# would reconstruct item art bitmaps (each run defined by X offset and length of pixels), and land tiles are handled as 44×44 fixed images.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: ideariff.com @ 2026-05-28 13:19:06 by W3 Total Cache
-->