<?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>Forem: Roman Shapiro</title>
    <description>The latest articles on Forem by Roman Shapiro (@rds1983).</description>
    <link>https://forem.com/rds1983</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%2F3946944%2F0e1d27a2-b872-40de-8f34-b35033390741.jpeg</url>
      <title>Forem: Roman Shapiro</title>
      <link>https://forem.com/rds1983</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rds1983"/>
    <language>en</language>
    <item>
      <title>Content Pipeline in MonoGame: Why I Don't Use It</title>
      <dc:creator>Roman Shapiro</dc:creator>
      <pubDate>Tue, 26 May 2026 02:42:17 +0000</pubDate>
      <link>https://forem.com/rds1983/content-pipeline-in-monogame-why-i-dont-use-it-4f8n</link>
      <guid>https://forem.com/rds1983/content-pipeline-in-monogame-why-i-dont-use-it-4f8n</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Content Pipeline&lt;/strong&gt; is the official way to handle assets in MonoGame. However, there has long been a significant group of developers in the community who dislike it and prefer to load assets in their "raw" form. This approach is especially popular in the FNA community (another XNA 4 implementation) — almost everyone there uses it.&lt;/p&gt;

&lt;p&gt;I’ve also been part of this "party" for a long time, and in this article I’ll explain why.&lt;/p&gt;

&lt;p&gt;First, let’s go over the real advantages of the Content Pipeline, then its main drawback, and finally — what practical alternatives exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of the Content Pipeline
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Loading Speed
&lt;/h3&gt;

&lt;p&gt;Assets processed through the Content Pipeline are saved in an optimized binary format (&lt;code&gt;.xnb&lt;/code&gt;). They have already undergone all necessary transformations (for example, premultiplied alpha for textures), so they load very quickly.&lt;/p&gt;

&lt;p&gt;However, for most indie projects, this advantage is greatly overrated. On modern hardware, even large sets of assets load almost instantly — with or without processing.&lt;/p&gt;

&lt;p&gt;Moreover, if you need maximum speed, you can simply pre-convert textures to modern formats (DDS, KTX, Basis Universal) using ImageMagick or other tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Asset Protection
&lt;/h3&gt;

&lt;p&gt;Some developers consider it important to make assets harder to steal. In this regard, XNB files are indeed slightly better than regular PNG or WAV files.&lt;/p&gt;

&lt;p&gt;But let’s be honest: with minimal programming skills, extracting assets from &lt;code&gt;.xnb&lt;/code&gt; is quite easy.&lt;/p&gt;

&lt;p&gt;Furthermore, strong asset protection has a downside — the more you "protect" them, the harder it becomes for players to create mods.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Platform Optimization
&lt;/h3&gt;

&lt;p&gt;The Content Pipeline automatically selects the optimal compression format for the target platform (e.g., DXT, PVRTC, ETC, etc. for images). This point is genuinely useful, and it’s hard to argue against it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Main Disadvantage
&lt;/h2&gt;

&lt;p&gt;Despite all the advantages, the built-in capabilities of the Content Pipeline are usually insufficient even for simple games. For example, it has no built-in support for texture atlases.&lt;/p&gt;

&lt;p&gt;Hence most likely you'll have to add support for a new asset type. And to do so you'll have to create a full pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Importer&lt;/strong&gt; — loads the asset into an internal object&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Processor&lt;/strong&gt; — processes it (premultiply, compression, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writer&lt;/strong&gt; — saves it to &lt;code&gt;.xnb&lt;/code&gt; format&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reader&lt;/strong&gt; — loads it from &lt;code&gt;.xnb&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because of this, the amount of code and overall complexity increases dramatically. When loading assets in raw form, steps 3 and 4 are simply unnecessary. Less code means fewer bugs, easier maintenance, and faster development.&lt;/p&gt;

&lt;p&gt;Separately, it’s worth mentioning debugging your own pipelines — it used to be a real quest (at least it was several years ago when I tried it).&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives
&lt;/h2&gt;

&lt;p&gt;Fortunately, MonoGame allows you to load assets without the Content Pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Texture2D.FromStream()&lt;/code&gt; — for images&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SoundEffect.FromStream()&lt;/code&gt; — for sounds&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Effect&lt;/code&gt; — has a construcotr that accepts a shader compiled via &lt;a href="https://docs.monogame.net/articles/getting_started/tools/mgfxc.html" rel="noopener noreferrer"&gt;mgfxc&lt;/a&gt; (&lt;a href="https://learn.microsoft.com/en-us/windows/win32/direct3dtools/fxc" rel="noopener noreferrer"&gt;fxc&lt;/a&gt; for FNA)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SpriteFont&lt;/code&gt; — has a constructor that accepts a texture atlas and glyph data. In FNA, this constructor is available via reflection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on this, it’s easy to write your own asset loader.&lt;/p&gt;

&lt;p&gt;Over the years, I’ve also written and actively maintain several libraries specifically for this approach:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Library&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/rds1983/XNAssets" rel="noopener noreferrer"&gt;XNAssets&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Universal alternative to the Content Pipeline. Loads textures, sounds, SpriteFonts, and effects from raw files. Easily extensible.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/rds1983/SpriteFontPlus" rel="noopener noreferrer"&gt;SpriteFontPlus&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Creates SpriteFont of the required size and character set from TTF files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/FontStashSharp/FontStashSharp" rel="noopener noreferrer"&gt;FontStashSharp&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Library for rendering text with dynamic atlas, rich text, HarfBuzz, styles, and much more.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/rds1983/DigitalRiseModel" rel="noopener noreferrer"&gt;DigitalRiseModel&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Loads 3D models from glTF/glb + full animation engine.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/rds1983/PlMpegNet" rel="noopener noreferrer"&gt;PlMpegNet&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Simple library for loading video.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;Opinion from the creator of FNA: &lt;a href="https://flibitijibibo.com/xnacontent.html" rel="noopener noreferrer"&gt;The XNA Content Pipeline Is Bad and You Shouldn't Use It&lt;/a&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>gamedev</category>
      <category>monogame</category>
    </item>
    <item>
      <title>MonoGame - A Game Engine for Those Who Love Reinventing the Wheel</title>
      <dc:creator>Roman Shapiro</dc:creator>
      <pubDate>Sat, 23 May 2026 01:12:37 +0000</pubDate>
      <link>https://forem.com/rds1983/monogame-a-game-engine-for-those-who-love-reinventing-the-wheel-4d2o</link>
      <guid>https://forem.com/rds1983/monogame-a-game-engine-for-those-who-love-reinventing-the-wheel-4d2o</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/I1uC0NRMepk"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When creating a new game, one of the very first questions is choosing a game engine.&lt;/p&gt;

&lt;p&gt;The main candidates everyone knows about are Unity, Unreal Engine, and Godot.&lt;/p&gt;

&lt;p&gt;However, besides them, there are quite a few second-tier engines that few people know about.&lt;/p&gt;

&lt;p&gt;One of them is MonoGame, which is exactly what I want to talk about in this article. I will briefly go over its history, discuss whether it is worth choosing, and share a couple of useful links.&lt;/p&gt;

&lt;h2&gt;
  
  
  History
&lt;/h2&gt;

&lt;p&gt;The C# programming language was created by Microsoft in 2002. Microsoft positioned it as a general-purpose language, so they developed a number of technologies and libraries demonstrating its use in different fields.&lt;/p&gt;

&lt;p&gt;One of these libraries was XNA, released in 2006. It was based on DirectX 9 and allowed developers to create games for the Microsoft ecosystem of that time, namely Windows, Xbox, and Windows Phone.&lt;/p&gt;

&lt;p&gt;XNA immediately gained considerable popularity within the gamedev community, which naturally wanted their games to run on other devices and operating systems as well.&lt;/p&gt;

&lt;p&gt;MonoGame was the answer to those demands. It aimed to be fully API-compatible with XNA while also running on Android, iPhone, Linux, and so on.&lt;/p&gt;

&lt;p&gt;In 2013, Microsoft discontinued XNA support. As a result, MonoGame eventually had to expand to Microsoft platforms as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  MonoGame Today
&lt;/h2&gt;

&lt;p&gt;At the moment, MonoGame more or less implements the XNA4 specification.&lt;/p&gt;

&lt;p&gt;In other words, it is essentially an abstraction layer over gaming hardware, providing fairly low-level access to graphics, audio, mouse, keyboard, gamepad, and so on.&lt;/p&gt;

&lt;p&gt;At the same time, it also contains some higher-level functionality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A linear algebra and 3D geometry library. Matrices, vectors, rays, transformations, and so on. There are many methods for 3D graphics, such as creating perspective and orthographic projection matrices. There are also bounding boxes, bounding spheres, and much more.&lt;/li&gt;
&lt;li&gt;SpriteBatch, or the ultimate tool for working with 2D graphics. In particular, it allows rendering text.&lt;/li&gt;
&lt;li&gt;An audio library.&lt;/li&gt;
&lt;li&gt;Content Pipeline, a framework for processing assets and converting them into a format suitable for runtime use. It is a fairly controversial feature. Personally, I am not a fan of it and see nothing wrong with loading assets in their raw form.&lt;/li&gt;
&lt;li&gt;A simple 3D model library. It has two major problems: a hard dependency on the Content Pipeline (meaning models cannot be created dynamically at runtime through code) and the lack of animation support. That is why I do not use it either.&lt;/li&gt;
&lt;li&gt;Several simple shaders for 3D graphics. For example, BasicEffect, which implements lighting using the Blinn-Phong model, and SkinnedEffect, which does the same while supporting skeletal animation. Incidentally, the demo at the beginning of this article is built on top of these shaders. It is worth noting that they only support directional lights. Point lights and spot lights are unfortunately not supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Choose It?
&lt;/h2&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%2Fy1z7bv90gd9rwa95e6oc.png" 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%2Fy1z7bv90gd9rwa95e6oc.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The meme is almost true. Though it is probably worth clarifying that this mostly applies to very simple 2D games.&lt;/p&gt;

&lt;p&gt;In the general case, however, it must be admitted that if maximum development efficiency is your goal, I would recommend using Unity or Unreal.&lt;/p&gt;

&lt;p&gt;But if efficiency is not the top priority and you mainly want to enjoy the development process, then MonoGame is worth choosing for several reasons.&lt;/p&gt;

&lt;p&gt;First, love for C#. Yes, Unity supports it too, but Unity uses its own framework that traditionally supported older versions of the language and runtime. MonoGame, on the other hand, works on top of the official modern Microsoft .NET ecosystem.&lt;/p&gt;

&lt;p&gt;Second, appreciation for open source and permissive licenses.&lt;/p&gt;

&lt;p&gt;Third, if you have a certain mindset often described as "think in code." If you dislike the designer-centric approach represented by Unity, Unreal, and Godot, and instead prefer the "bare" game loop approach offered by MonoGame.&lt;/p&gt;

&lt;p&gt;Finally, if you enjoy digging into technical details and reinventing the wheel. Yes, there are many libraries built for MonoGame (the author of this article developed some of them). However, you are unlikely to find every piece of functionality your game needs. Most likely, you will either have to create your own libraries or extend existing ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://monogame.net/" rel="noopener noreferrer"&gt;Official MonoGame Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to visit the Showcase page in order to learn about some well-known titles that were developed with XNA/MonoGame(i.e. Terraria and Stardew Valley)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fna-xna.github.io/" rel="noopener noreferrer"&gt;FNA - Another XNA Implementation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>monogame</category>
      <category>gamedev</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
