<?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: Siver.T</title>
    <description>The latest articles on DEV Community by Siver.T (@trigves).</description>
    <link>https://dev.to/trigves</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4270584%2F6458f302-f5a1-43fa-8bb1-8a35c70a4df2.png</url>
      <title>DEV Community: Siver.T</title>
      <link>https://dev.to/trigves</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trigves"/>
    <language>en</language>
    <item>
      <title>Preferences screen once more</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sun, 25 Oct 2026 08:40:07 +0000</pubDate>
      <link>https://dev.to/trigves/preferences-screen-once-more-hp2</link>
      <guid>https://dev.to/trigves/preferences-screen-once-more-hp2</guid>
      <description>&lt;p&gt;&lt;strong&gt;I&lt;/strong&gt; thought that the preferences screen is all done, but then I noticed there are still some things missing, like confirmation dialog on "Quit" button, audio preview when changing speech/sfx volume and more.&lt;/p&gt;

&lt;p&gt;When I was proofreading the previous entry I noticed the typo in bootstrapping class, it was named as &lt;code&gt;BootsrapManager&lt;/code&gt; (missing "t") so I've renamed it to &lt;code&gt;BootstrapManager&lt;/code&gt;. Well, it is funny that I didn't find it earlier, but with autocomplete in IDE you don't check typos.&lt;/p&gt;

&lt;p&gt;The next thing I was working on was message dialog. But as first, the support for 9-slice sprite was needed. Therefore, new import type was defined in &lt;code&gt;StciImporter&lt;/code&gt; which will take the sprites from the &lt;code&gt;.sti&lt;/code&gt; file and create the one 9-sliced sprite from it (it is actually 8-slice sprite, as the "content" is transparent, because each dialog could have its own background image).&lt;/p&gt;

&lt;p&gt;Message dialogs are implemented using solo canvas, with stacking dialog supported. Each dialog prefab contains the "blocker" part (so no UI beneath it could be interacted with) and the actual dialog. There is an &lt;code&gt;DialogManager&lt;/code&gt; which is responsible for the dialog creation and destruction and then a &lt;code&gt;MessageDialogComponent&lt;/code&gt;, which does handle the dialog interactions. For now only "&lt;strong&gt;OK&lt;/strong&gt;", "&lt;strong&gt;YES&lt;/strong&gt;"and "&lt;strong&gt;NO&lt;/strong&gt;" buttons are supported.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9vhq9ycj63qy6rjk9nli.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9vhq9ycj63qy6rjk9nli.png" alt="Quit dialog message " width="681" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another thing thts was rewritten was that game settings option numeric values are now stored in the "natural" range and not in &amp;lt;0,1&amp;gt;. Also, default value is in  range now. The conversion to &amp;lt;0,1&amp;gt; range happens only when needed, mostly for the UI elements.&lt;/p&gt;

&lt;p&gt;There was another change regarding the options and that is option groups. This is used for situation, when at least 1 of the 2 option must be selected (like "&lt;strong&gt;Speech&lt;/strong&gt;" or "&lt;strong&gt;Subtitles&lt;/strong&gt;" should be on). This is defined in &lt;code&gt;AssetGameSettingsData&lt;/code&gt; class, where multiple option groups could be defined. Then, in preferences screen, the check is done and if situation like the above happens, message dialog is shown.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz9u9zbxcwnqdw5un264r.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz9u9zbxcwnqdw5un264r.png" alt="Option groups in action" width="707" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then the "quit" dialog command was implemented, with showing the message dialog and quitting back to the main menu, if confirmed.&lt;/p&gt;

&lt;p&gt;The last thing that has been done is audio preview when changing the sfx/speech sliders. The actual preview is done in ViewModel, using newly created &lt;code&gt;AudioPreviewService&lt;/code&gt;. And also, when the option in the list view is checked, audio effect is played for the check/uncheck event. At first, I was using Toggle's event changed but that was problematic, because this event fires in various places, not only when the user clicks the Toggle. Therefor new event was added in &lt;code&gt;Toggle4State&lt;/code&gt; class, which is raised ONLY on "external" clicks (For more info see &lt;a href="https://github.com/VPDPersonal/Aspid.MVVM/discussions/275" rel="noopener noreferrer"&gt;https://github.com/VPDPersonal/Aspid.MVVM/discussions/275&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;There was again, as always, various bug fixes, like hard-coded enum values for &lt;code&gt;AssetType&lt;/code&gt; enum, fix of toggle rendering in options list, button disable state rendering and more.&lt;/p&gt;

&lt;p&gt;Link to the repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Finishing the Preferences screen</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sun, 11 Oct 2026 10:09:23 +0000</pubDate>
      <link>https://dev.to/trigves/finishing-the-preferences-screen-104b</link>
      <guid>https://dev.to/trigves/finishing-the-preferences-screen-104b</guid>
      <description>&lt;p&gt;&lt;strong&gt;N&lt;/strong&gt; ot much has happened (as in new features) since the last blog entry. There are 2 main things, that needs mentioning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;AssetRefMockerManager&lt;/code&gt; was moved to the &lt;code&gt;BootstrapManager&lt;/code&gt; class. Because &lt;code&gt;BootstrapManager&lt;/code&gt; is now a singleton then there is no need to be &lt;code&gt;AssetRefMockerManager&lt;/code&gt; in each scene. Therefor, it was made as part of the &lt;code&gt;BootstrapManager&lt;/code&gt; class. Because of this, the code required some changes. The one reason was, that while the &lt;code&gt;AssetRefMockerManager&lt;/code&gt; was in the each scene, then on the start of scene  all the ref mockers could be loaded. But now, the &lt;code&gt;Start()&lt;/code&gt; method is run only in the bootstrap scene so therefor batching mode was implemented. That is, when the batching mode is on, the asset ref mockers are just registered. And only after all the mocker are present they are loaded.&lt;/li&gt;
&lt;li&gt;Implementation of the fast help text (&lt;strong&gt;FHT&lt;/strong&gt;, a.k.a. tooltips). This was implemented using separate canvas in the bootstrap scene. There the &lt;strong&gt;FHT&lt;/strong&gt; would be shown, always on the top. The &lt;strong&gt;FHT&lt;/strong&gt; consist of two parts. The &lt;code&gt;FastHelpTextComponent&lt;/code&gt; which is used for game objects, which will have some tooltip info. And the &lt;code&gt;FastHelpTextRendererComponent&lt;/code&gt; which is actually used for rendering the text. The glue between those two is &lt;code&gt;FastHelpTextManager&lt;/code&gt;. Because of how are &lt;strong&gt;FHT&lt;/strong&gt; implemented, the "control" characters in the text (like "|") were replaced with tag based (like &lt;strong&gt;&amp;lt;b&amp;gt;...&amp;lt;/b&amp;gt;&lt;/strong&gt;). Then, they're further processed to TMP's rich text tags (like &lt;strong&gt;&amp;lt;font&amp;gt;&lt;/strong&gt;, &lt;strong&gt;&amp;lt;color&amp;gt;&lt;/strong&gt;, ...). For instance &lt;strong&gt;|&lt;/strong&gt; is processed as custom font and custom color. The custom font is needed, because the text should be bold. And because a bitmap fonts are used, for bold text the separate font need be used (well this is not strictly true, as even with bitmap fonts one can used "weight table" but it is much harder implement it in our situation, because of "embedded" font assets int &lt;code&gt;.sti&lt;/code&gt; assets). Then color tag is used for the color (which is defined as a field in &lt;code&gt;FastHelpTextComponent&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwbwjb5d3ysetw1vk05e.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwbwjb5d3ysetw1vk05e.png" alt="Preferences" width="656" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There were also some minor changes, like fixing the focus "bug" in the preference item prefab (when the item was unchecked, it still retained in the "selected" state, so the sprite wasn't changed. This was fixed with disabled "Navigation"). Also, sound volume settings changes are now reflected in the appropriate mixer. Then there was implemented color change on focus for &lt;code&gt;Toggle4State&lt;/code&gt; and changing the default colors for the buttons and preferences item in preferences screen.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Preferences screen and some rewrites</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sat, 03 Oct 2026 09:07:12 +0000</pubDate>
      <link>https://dev.to/trigves/preferences-screen-and-some-rewrites-27e4</link>
      <guid>https://dev.to/trigves/preferences-screen-and-some-rewrites-27e4</guid>
      <description>&lt;p&gt;&lt;strong&gt;T&lt;/strong&gt; oday, I'll talk about progress in preferences screen (and all the relevant changes directly affecting it).&lt;/p&gt;

&lt;p&gt;When I started implemented a preferences screen I stumbled on one problem regarding assets mocks. Till now, all the &lt;code&gt;AssetRef&lt;/code&gt; were stored in the &lt;code&gt;AssetRefMockerManager&lt;/code&gt; GO in the scene. This was sufficient with main menu, as there were practically no prefabs with embedded &lt;code&gt;AssetRefMocker&lt;/code&gt;. But as soon I've started working on the preferences screen, the problem appeared: How to handle asset ref mocks inside the prefab when &lt;code&gt;AssetRef&lt;/code&gt; is stored in the scene object? So the solution was to store it in the asset ref mocker component itself and then register the instance to the &lt;code&gt;AssetRefMockerManager&lt;/code&gt; during &lt;code&gt;Awake()&lt;/code&gt;. &lt;code&gt;IAssetRefMocker&lt;/code&gt; interface was converted to base class for asset mocks and lot of other changes was done. It should be done like this from the start. Another feature implemented was on-demand loading of the mocks. Till now, all the registered mocks were loaded during the scene load (&lt;code&gt;Start()&lt;/code&gt; message). But when you use prefabs, that are instantiated &lt;strong&gt;AFTER&lt;/strong&gt; the scene is loaded, then you have a problem. Therefor, on-demand loading was implemented. The asset is loaded immediately after registering to the &lt;code&gt;AssetRefMockerManager&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Another bigger change was making a &lt;code&gt;BootsrapManager&lt;/code&gt; singleton. Because the bootstrap scene is &lt;strong&gt;ALWAYS&lt;/strong&gt; loaded, then it is practical to make it as singleton. This change connects directly with making the &lt;code&gt;SoundManager&lt;/code&gt; as a normal &lt;code&gt;MonoBehaviour&lt;/code&gt; based class stored in &lt;code&gt;BootsrapManager&lt;/code&gt;. Because audio needs scene objects (audio listener, audio sources), there is no need to &lt;code&gt;SoundManager&lt;/code&gt; be and &lt;code&gt;ScriptableObject&lt;/code&gt; based manager.&lt;/p&gt;

&lt;p&gt;The next step was creating the "custom" UI controls needed: Button, Slider and Checkbox.&lt;/p&gt;

&lt;p&gt;Regarding the button (&lt;code&gt;Button5State&lt;/code&gt;), the one thing that needed to be handled was "disabled" state appearance (this was first implemented using animator an animations, but it was dropped later and implemented in code for simplicity). In JA2 there are 2 options: &lt;strong&gt;hatched&lt;/strong&gt; and &lt;strong&gt;shaded&lt;/strong&gt;. The &lt;strong&gt;hatched&lt;/strong&gt; style was implemented using "checker" texture overlay (as is done in JA2). The &lt;strong&gt;shaded&lt;/strong&gt; was implemented in shader, where the final color was darkened with the predefined shade.&lt;/p&gt;

&lt;p&gt;Slider was the one with the minimum work involved as the Unity's &lt;code&gt;Slider&lt;/code&gt; was sufficient.&lt;/p&gt;

&lt;p&gt;Checkbox (&lt;code&gt;Toggle4State&lt;/code&gt;) was also the one, that didn't involved lot of work. But showing the preferences options was.&lt;/p&gt;

&lt;p&gt;Now back to the preferences screen as such. The preferences screens show the game options in dynamic way. That is, there is an &lt;code&gt;AssetGameSettingsData&lt;/code&gt; class (used as asset), which defines all the options through the &lt;code&gt;GameSettingOptionData&lt;/code&gt; class where one can define the text, whether it should be display as the options and so long. In preferences screen, the options are loaded from the file (or generated if it is a first run) and shown in the panel with the scrollbars. In runtime, the GameSettings encapsulate the &lt;code&gt;AssetGameSettingsData&lt;/code&gt; and &lt;code&gt;GameSettingOptionValue&lt;/code&gt; handles the value set for &lt;code&gt;GameSettingOptionData&lt;/code&gt;. This complicated scheme is used because &lt;code&gt;ScriptableObject&lt;/code&gt; should define just some immutable data, while the runtime classes uses those data and implemented mutability, serialization and other stuff. The list of options is implemented as a solo view with &lt;code&gt;Aspid.VirtualizedList&lt;/code&gt; which is using "view prefab" for it's items (one game setting). Therefor if one needs to add new game settings, it just needs to update &lt;code&gt;AssetGameSettingsData&lt;/code&gt; and everything will just work (no need to update UI). The only downside is, that the options aren't shown as in original JA2, where they're shown in 2 columns.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fls03s3tza732hr40hsft.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fls03s3tza732hr40hsft.png" alt="Preferences screen" width="675" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There were also some other changes like case-insensitive lookup for keys in INI files and the whole INI handling was rewritten as serialization to the string was also implemented.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Credits screen</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sun, 27 Sep 2026 15:33:12 +0000</pubDate>
      <link>https://dev.to/trigves/credits-screen-3cdo</link>
      <guid>https://dev.to/trigves/credits-screen-3cdo</guid>
      <description>&lt;p&gt;&lt;strong&gt;F&lt;/strong&gt; inally, the credits screen is done and working. But, let's start from the beginning.&lt;/p&gt;

&lt;p&gt;As I've mentioned in the previous post, the work has already started for the credits screen. As the fonts were working I switched my attention for the faces with the blinking eyes and sliding credits.&lt;/p&gt;

&lt;p&gt;At first, all the "eyes" were implemented as solo sprites. But then I thought why not use a sprite atlas after all? There was just one problem and it was, that sprites, that should be used in the atlas, should be a regular assets. But in my case, they were "embedded" in the &lt;code&gt;.sti&lt;/code&gt; file. New asset type was added to &lt;code&gt;StciImporter&lt;/code&gt;. Then the whole process of extraction and atlas generation is done in 2 passes. First, the texture sub-assets in the &lt;code&gt;.sti&lt;/code&gt; file are remapped to the external assets. That is, the textures are extracted to solo asset files and in the &lt;code&gt;.sti&lt;/code&gt; file only sprites are left. Then in the second pass, the textures are marked as dependencies for the sprite and sprite atlas is created. &lt;code&gt;AssetManager&lt;/code&gt; was also updated, because atlas are loaded on demand using events. And finally, while generating the asset bundles, the atlas source textures are ignored, using special chars for directory (which is then ignored) as they aren't needed anymore.&lt;/p&gt;

&lt;p&gt;The blinking eyes are implemented as simple alpha blending of the sprites. That is, when the time comes to blink the eyes, the "blinking eyes" sprite's colors alpha is set to opaque (gradually) and then back to transparent  after some time. There is also some randomness added to it.&lt;/p&gt;

&lt;p&gt;The next thing, which was already implemented, but I forgot to mention it in the previous post was, the sliding credits (text). This is implemented as a sliding game object with text component (and all the other supported components). The game object is instantiated "below" the screen, then move up and finally after isn't visible on the screen, the game object is destroyed. As in the original game, speed change (+/-) and pause are implemented too.&lt;/p&gt;

&lt;p&gt;And finally, the detailed info about each face was implemented. This was done using events in &lt;code&gt;CreditsFaceComponent&lt;/code&gt; class, to which &lt;code&gt;ScreenMainMenuCreditsManager&lt;/code&gt; is subscribed (for each face) and handles the detailed text that is passed to it from the event. But because the cursor changes while the mouse cursor is hovering over the face, some type of cursor manager needed to be implemented. As in original JA2, each game cursor has an enum, it is the same here. But, because cursor could have some other attributes like if it is animated, hot spot, etc. the &lt;code&gt;AssetCursorDatabase&lt;/code&gt; class was created which is used as cursor database (and &lt;code&gt;StciImporter&lt;/code&gt; was also updated to support the cursor asset type). There, all the cursors should be defined (for now, only two are, the base arrow and "pointing finger" cursor). &lt;code&gt;CursorManager&lt;/code&gt; class then handle all the operations with cursors.&lt;/p&gt;

&lt;p&gt;Here is some simple "video" of the credits screen:&lt;/p&gt;

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

&lt;p&gt;Another thing I was working on was "import settings" asset. It is an asset, where one can define for each file in the given &lt;code&gt;.slf&lt;/code&gt; the attributes for the importer. Like what asset type it is, and some default values for it. This is to avoid setting it manually after extracting the &lt;code&gt;.slf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AssetRef&lt;/code&gt; had now a custom GUI (&lt;code&gt;PropertyDrawer&lt;/code&gt;) and could be used for creating the &lt;code&gt;AssetRef&lt;/code&gt;data from the asset object.&lt;/p&gt;

&lt;p&gt;For the main menu, keyboard shortcuts were implemented.&lt;/p&gt;

&lt;p&gt;I also removed some unused classes like &lt;code&gt;MouseRegion&lt;/code&gt; as it isn't needed altogether in Unity (mouse enter/leave is handled directly in the UI components for now).&lt;/p&gt;

&lt;p&gt;I've already started implementing the preferences screen. And this will be the next entry about.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Fonts updates and sound</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sat, 12 Sep 2026 11:10:23 +0000</pubDate>
      <link>https://dev.to/trigves/fonts-updates-and-sound-9hc</link>
      <guid>https://dev.to/trigves/fonts-updates-and-sound-9hc</guid>
      <description>&lt;p&gt;&lt;strong&gt;I&lt;/strong&gt;  n the previous entry I mentioned the how font support was implemented. But after some testing it's just not finished yet. The one problem is, that &lt;code&gt;AssetJa2Font&lt;/code&gt; class represents just one concrete font, like &lt;strong&gt;10 pt Arial bold&lt;/strong&gt;. What is also needed is a class that will group various font assets like normal, bold and italic. Therefor new class was created, &lt;code&gt;AssetFontClass&lt;/code&gt;. This has also another benefit - if in future I would like to replace for instance &lt;code&gt;font10arial.sti&lt;/code&gt; with some other open-source alternative, it would be no problem. I would just create the &lt;code&gt;AssetFontClass&lt;/code&gt; asset with another font and it will work. The default font classes (from JA2 assets) are generated using menu option.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2jw67mz582mfcn7i4hul.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2jw67mz582mfcn7i4hul.png" alt="Font asset" width="547" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There was also another change regarding the fonts and it was metrics computation. When I initially implemented font support, I didn't bother using right values for various properties of the font metrics (like &lt;strong&gt;ascentline&lt;/strong&gt;, &lt;strong&gt;descentline&lt;/strong&gt;, ...) which resulted in wrong rendering of the text, like for instance alignment wasn't working properly. This was fixed and new importer options were added to be able to specify it per font basis. Because of those changes, the &lt;code&gt;TextWithShadow&lt;/code&gt; component was replaced by the generic &lt;code&gt;TextComponent&lt;/code&gt; which is now using &lt;code&gt;AssetFontClass&lt;/code&gt; directly.&lt;/p&gt;

&lt;p&gt;The next new thing that I was working on was &lt;code&gt;SoundManager&lt;/code&gt;. It is based on &lt;code&gt;ScriptableObjectManager&lt;/code&gt; class. At first I wasn't sure if there should be global sound manager or it should be per-scene basis, but it's same as with the camera. There need to be a "singleton" that will handle sound and music whole time. Default mixer and audio group was also created. The &lt;code&gt;SoundManager&lt;/code&gt; is now used in main menu scene, where the background music is playing. Because this background music should also play in for instance credits, the audio source couldn't be in main menu scene as it would be destroyed, when the credits scene would be loaded. Therefor &lt;code&gt;SoundManager&lt;/code&gt; has special method for attaching the audio source to it and it would be played till it isn't destroyed.&lt;/p&gt;

&lt;p&gt;The work for the credits scene has also began. The parsing of &lt;code&gt;.edt&lt;/code&gt; file is working. They are just blobs which are encrypted by primitive algorithm.&lt;/p&gt;

&lt;p&gt;Finally, quite a bugs were fixed, as always (like preventing adding duplicitous asset ref mocker values for the same component).&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Font support</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Tue, 01 Sep 2026 19:40:21 +0000</pubDate>
      <link>https://dev.to/trigves/font-support-1mk9</link>
      <guid>https://dev.to/trigves/font-support-1mk9</guid>
      <description>&lt;p&gt;&lt;strong&gt;I&lt;/strong&gt; n this blog entry we would talk about fonts.&lt;/p&gt;

&lt;p&gt;Fonts are now supported and are used in the main menu screen (the copyright text). The fonts in &lt;strong&gt;JA2&lt;/strong&gt; are stored in the &lt;strong&gt;.sti&lt;/strong&gt; files (as sub-images), along with shadow support and palettes. Each font letter image therefor has the main color letter and shadow letter (encoded differently). In the &lt;strong&gt;Ja2Unity&lt;/strong&gt; those image are imported as separate color channels: &lt;strong&gt;R&lt;/strong&gt; is for the main color,  &lt;strong&gt;B&lt;/strong&gt;  is for the shadow color and in the &lt;strong&gt;G&lt;/strong&gt; channel, the background color is stored, but I don't know if it is used anywhere in the original game. Each font asset (AssetJa2Font class - which is the main asset) therefor has those sub-assets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Texture atlas with all the supported letters (it's just the tiny subset of the UNICODE)&lt;/li&gt;
&lt;li&gt;Palette used for font coloring (as Texture2DArray assigned to the font material)&lt;/li&gt;
&lt;li&gt;Font asset (TMP_FontAsset)&lt;/li&gt;
&lt;li&gt;Font material asset with custom shader assigned&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqehcy3yiqf68uwhbz2ur.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqehcy3yiqf68uwhbz2ur.png" alt="Font Asset" width="313" height="83"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Because TMP_FontAsset isn't used directly, the new UI.TextWithShadow class was created, which extends the TMPro.TextMeshProUGUI. This has two practical reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Because no TMP_FontAsset is used directly, the component needs to be able to store the AssetJa2Font asset instead, from which font asset will be read and also to be able to specify the shadow color (which is now set in the component) but was missing in the original TMPro.TextMeshProUGUI class (for obvious reasons).&lt;/li&gt;
&lt;li&gt;To add support for asset ref mocker (AssetRefMockerText).&lt;/li&gt;
&lt;/ol&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fseywylvaglkeqph3ngqb.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fseywylvaglkeqph3ngqb.png" alt="Copyright" width="526" height="76"&gt;&lt;/a&gt;&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq5cjo0u73lbm4n7n1pqs.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq5cjo0u73lbm4n7n1pqs.png" alt="TextWithShadow and AssetRefMockerText components" width="388" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For font rendering, the custom shader (Ja2/FontShadow) is used, which either renders the text with shadow or without it. The main color and shadow color are set on the cloned material, when the asset ref is loaded. For now, dynamic changes of the colors during the gameplay isn't supported (yet?).&lt;/p&gt;

&lt;p&gt;I've just realized, that I didn't mentioned the link to the repository so far. So, here it is: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I've also updated the &lt;strong&gt;README.md&lt;/strong&gt;  there with instruction for how to build the asset bundles. Also, there is a player build (for Windows) which could be used for testing (but its lifetime will be very limited as this project is "action in progress" so the newest asset bundles may not work with the older player). Only main menu is shown and nothing could be done, but it is proof of the concept that the way I choose is working.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Main menu updates</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Tue, 25 Aug 2026 18:23:56 +0000</pubDate>
      <link>https://dev.to/trigves/main-menu-updates-p30</link>
      <guid>https://dev.to/trigves/main-menu-updates-p30</guid>
      <description>&lt;p&gt;&lt;strong&gt;W&lt;/strong&gt; ell, another "long time no see". I'm still working on the project as much as I can. But it's not a steady work. During summer I was doing some other things (like bike touring) and mostly work.  &lt;/p&gt;

&lt;p&gt;So, what's new? Well the main menu is working. While working on it the need arise for some sort of "mockups" components for various asset and mockup manager. Let me explain why. Because the assets of JA2 are proprietary, it means that you need to extract and build the asset bundles by yourself. Therefor all the assets in the GameObjects needs to be referenced indirectly (because they may not exist yet). This is where mockup come on scene. The mockups are just references to the real assets (like pointers in C++). And when the scene is loaded, the mockup manager primary role is to load the real assets from the mockups.  &lt;/p&gt;

&lt;p&gt;Also, the main menu is implemented using &lt;strong&gt;Aspid.MVVM&lt;/strong&gt; package (MIT licensed). Some other minor changes is custom &lt;code&gt;ScriptedImporter&lt;/code&gt; for &lt;code&gt;.pcx&lt;/code&gt; and &lt;code&gt;.sti&lt;/code&gt; (STCI) images. At first, the STCI was extracting solo textures + sprites, but it wasn't ideal. Now, the STCI asset contains the texture and sprite sub-assets.  &lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8t6p5j60hblt5p7jba4v.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8t6p5j60hblt5p7jba4v.png" alt="Asset inspector" width="398" height="648"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Another major change was rewrite of the &lt;code&gt;GameState&lt;/code&gt; (and therefor &lt;code&gt;ScriptableObjectRuntime&lt;/code&gt;) to be able instantiate GameObjects on it's own. This was needed, because the main camera isn't per scene anymore, but just one global. This was needed to simplify the code. Another import change was, that the Bootstrap scene &lt;strong&gt;&lt;u&gt;IS ALWAYS&lt;/u&gt;&lt;/strong&gt; started as first and from there it is switched to the current opened scene in the editor. This was also needed, because in &lt;strong&gt;Bootstrap&lt;/strong&gt; some initialization code is done which needs to be run always. And as always lot of bug fixing, refactoring and so long.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffj9z84jpj4gyg3e9bq9g.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffj9z84jpj4gyg3e9bq9g.png" alt="Main menu" width="764" height="590"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Main Menu &lt;/p&gt;

&lt;p&gt;So, the main menu is working - that is, all the images are shown, buttons are working too and music plays! The next step is to implement the credits. Why credits? Because there I need to test font handling and some animations.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Project reborn</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Mon, 29 Dec 2025 17:01:00 +0000</pubDate>
      <link>https://dev.to/trigves/project-reborn-m4n</link>
      <guid>https://dev.to/trigves/project-reborn-m4n</guid>
      <description>&lt;p&gt;&lt;strong&gt;W&lt;/strong&gt; ell, after a long time of inactivity I started to work on this project again. It's been a long time since I touched the project. I've got a lot of other work to do, and also other "spare time" projects to work on.&lt;/p&gt;

&lt;p&gt;This time, I'll be using Unity engine. So, the basic infrastructure is almost done. At moment I'm working on the UI stuff. The project would be using &lt;strong&gt;uGUI&lt;/strong&gt; (Unity GUI) with some MVVM library.&lt;/p&gt;

&lt;p&gt;The one big difference from the previous project is, that original JA2 data would be needed only in build time, not in a runtime. There would be editor utils, that will convert the original JA2 data to the format Unity could work with. This means, that every user would need to do this step manually as I don't think it would be legal to distribute it.&lt;/p&gt;

&lt;p&gt;After the working main menu I would post a github link to the project as I need to also update &lt;code&gt;readme.md&lt;/code&gt; so anyone would know where to start.&lt;/p&gt;

&lt;p&gt;Link to repository: &lt;a href="https://github.com/Trigve/Ja2xUnity" rel="noopener noreferrer"&gt;https://github.com/Trigve/Ja2xUnity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Changes to string handling - UTF-8</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sun, 23 Jan 2011 18:25:00 +0000</pubDate>
      <link>https://dev.to/trigves/changes-to-string-handling-utf-8-534o</link>
      <guid>https://dev.to/trigves/changes-to-string-handling-utf-8-534o</guid>
      <description>&lt;p&gt;So after some time here are some minor updates on project.&lt;br&gt;&lt;br&gt;As first, std::wstring was replaced by std::string (as UTF-8 as default) as it somehow wrong approach to use std::wstring anywhere. For more details see [1], [2], [3]. All std::string now by default hold UTF-8 valid string. As next I will change all projects to use unicode by default and use wide WinApi functions (with help of core::ConvertClass).&lt;br&gt;&lt;br&gt;As second some changes were made in whole game state/screen/handling management. There was added some new classes for init screen handling and so. As usual you could see changes in google code project site.&lt;br&gt;&lt;br&gt;For the near future I'm planning to implement MouseRegion class and the go to GameManager::run().&lt;br&gt;&lt;br&gt;And happy new year :)&lt;br&gt;&lt;br&gt;[1] - &lt;a href="http://thread.gmane.org/gmane.comp.lib.boost.devel/212505/focus=212516" rel="noopener noreferrer"&gt;boost.devel thread about strings, UTF-8, ...&lt;/a&gt;&lt;br&gt;[2] - &lt;a href="http://thread.gmane.org/gmane.comp.lib.boost.devel/213026" rel="noopener noreferrer"&gt;boost.devel tread about strings and future&lt;/a&gt;&lt;br&gt;[3] - &lt;a href="http://stackoverflow.com/questions/1049947/should-utf-16-be-considered-harmful" rel="noopener noreferrer"&gt;stackoverflow question about UTF-16&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Updates of SGP, VFS</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sat, 18 Sep 2010 14:59:00 +0000</pubDate>
      <link>https://dev.to/trigves/updates-of-sgp-vfs-54gm</link>
      <guid>https://dev.to/trigves/updates-of-sgp-vfs-54gm</guid>
      <description>&lt;p&gt;About month ago I've posted some updates about ja2. It's about the time for new post. What have changed? I've began to rewrite the SGP system. Mostly is is rewritten but is not compilable now. That's because I'm waiting till SGP will be done and then try to finish the SPG to be sure everything is working as needed.&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
SGP is a big chapter. There is a lot of stuff, mostly graphics. I've added new surface classes, surface manager, video manager etc. There is a lot of work to be done, but I'm one of those optimist. Hope SGP will be compilable till the end of year.&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
For more details you can check the commits on google code page &lt;a href="http://code.google.com/p/ja2trigve/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="http://code.google.com/p/ja2trigve/" rel="noopener noreferrer"&gt;http://code.google.com/p/ja2trigve/&lt;/a&gt; in source sectiond -&amp;gt; changes&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>More updates</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Mon, 19 Jul 2010 11:28:00 +0000</pubDate>
      <link>https://dev.to/trigves/more-updates-40lo</link>
      <guid>https://dev.to/trigves/more-updates-40lo</guid>
      <description>&lt;p&gt;Hey, looks like there wasn't any update for about 2 years. I was busy and had some other projects to work on... But I manage to return now :) But for now I'll be using the ja2 1.13 svn code and my first major goal is to use Ogre3D engine for entire game a then use 3D isometric view for tactical mode and use 3D MERC. This will be proof of concept.&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
And now minor goals. For now I manage to refactor the VFS library, remove unneeded #defines, get rid of macros, global variables, circular-dependencies, add more object oriented paradigm where needed. For first months that will come I don't want to add new features but make the code a lot cleaner. Then will I try to add support for Ogre3D.&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Wish me luck :)&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Laptop updates and code</title>
      <dc:creator>Siver.T</dc:creator>
      <pubDate>Sun, 23 Mar 2008 20:31:00 +0000</pubDate>
      <link>https://dev.to/trigves/laptop-updates-and-code-4i57</link>
      <guid>https://dev.to/trigves/laptop-updates-and-code-4i57</guid>
      <description>&lt;p&gt;Finaly I had some time to work on the project.... The GUI stuff was more-or-less rewritten. Next, new GUI components will be added such as list view. List view will be used in email browser and maybe also somewhere else. For now email browser show some "list view mock up", but want to finnish it in the next to weeks. When the mail client will be done, the python interpreter will be incorporated to tha application and bindings to the python will be made.&lt;br&gt;Anyway, application opening was done, that is when someone cliks on the laptop main icons (such as mail client) the animation of the opening window will start. You can see the animation on screenshots.&lt;br&gt;&lt;br&gt;&lt;br&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1a8wsuhxqpdb65h03o95.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1a8wsuhxqpdb65h03o95.png" alt="Mail" width="649" height="514"&gt;&lt;/a&gt;                                                                                        Mail client mock up&lt;br&gt;&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftb2t685t4mcxgjuec6ns.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftb2t685t4mcxgjuec6ns.png" alt="Mail" width="651" height="516"&gt;&lt;/a&gt;&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyrzatb5sxillk7qz48f.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyrzatb5sxillk7qz48f.png" alt="Mail" width="649" height="515"&gt;&lt;/a&gt;                                                                                                                                                            Animations&lt;br&gt;Also the code is now available at the &lt;a href="http://code.google.com/p/ja2trigve" rel="noopener noreferrer"&gt;google code&lt;/a&gt; . The only way to get it from there is using SVN. Use the source tab at the given link to find more info.&lt;br&gt;&lt;br&gt;see ya&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>devlog</category>
    </item>
  </channel>
</rss>
