Unity 5 Transition Progress

I’m working through code changes required to transition Daggerfall Tools for Unity to Unity 5. The first priority is full compatibility then I can look at taking advantage of new features.

Here is a summary of compatibility tasks I am working on and those which have been completed. I will update this list as I progress and release a Unity 5-compatible Developer Preview of 1.3 when ready. This should be available within a week.


Initial Unity 5 compatibility update is now available on git. I still need to do more work and testing but it should be mostly good to go. Just avoid the new Deferred Shading path for now.

In Progress

  • Fix billboard batch shaders self-shadowing in Deferred Shading path.
  • Update Streaming World Demo with effects now available to all users.


  • Fix default reference changes.
  • Fix white terrain textures.
  • Fix MIDI synthesizer not running.
  • Fix MIDI synthesizer sample speed.
  • Fix sound effects based on audio changes.
  • Fix obsolete methods/properties and other warnings.
  • Fix DaggerfallActionDoor collider errors.
  • Fix PlayerMouseLook exploding/bugging out.
  • Update integrated iTween to latest version.
  • Fix fog in Deferred Shading path. (N/A. Requires new Global Fog effect). This will be part of new demo scenes in future update.

Unity 5 Released!

Unity 5 has been released, and with it comes the new Personal version with all the same core engine features as Professional. This is great news for Daggerfall Tools for Unity! Here’s why.

  • Deferred path for everyone. Daggerfall uses many small dynamic point lights, ideally suited for deferred rendering. Up until now Free users were limited to the Forward path, which struggled with Daggerfall’s lighting. As an added bonus the new Deferred Shading path is even sexier than the old Deferred Lighting pre-pass (now called Legacy).
  • Render-to-texture. There are many real-time effects that can only be accomplished when rendering direct to a texture. This feature was completely absent in the old Free, which means I couldn’t make use of it in the tools.
  • Post processing and advanced water. All of these Pro-only features are now available to everyone, and we can finally make use of them as standard.
  • 64-bit editor. The new editor performs substantially faster on city imports and in many other areas.
  • Improved physics. As in, hugely improved! Moving static colliders now incurs almost zero cost, which fixes several problems around a floating origin in streaming world.
  • Physically Based Shading, real-time shadows on any light, and general sexiness. Now there are even more ways to spice up Daggerfall’s boxy models to look their best.

And that’s just the main stuff. There are also improvements to audio system and throughout Unity as a whole.

Considering the number of awesome features now available to all Unity users, I will be shifting Daggerfall Tools for Unity up to 5.0 and dropping a 1.3 Developer Preview as soon as possible.

Streaming World 1.2 Release Demo

I had this buried in the 1.2 release post earlier and forgot to post it to the Demos page, which means a few people might have missed out the latest demo code. Reposting just in case!




  • Huge streaming world over 340,000 km/2 created at runtime.
  • Over 15,000 fully explorable locations and dungeons.
  • MIDI synthesis and context song manager.
  • Full day/night cycle, seasons, and weather effects.
  • Enemies in dungeons, including random enemies based on dungeon type.
  • Basic combat system.

Streaming World 1.2 Release Demo



  • Mouse move to look.
  • W, S, A, D to move.
  • SHIFT (hold) to run.
  • SPACE to jump.
  • LEFT-CLICK mouse to open doors, enter dungeons, operate switches, etc.
  • ESC to exit game (standalone).


  • Z to toggle weapons.
  • Right-click and drag mouse to swing weapon.


  • R (while outside) for random location, season, time of day, and weather.
  • R (while in dungeon) to recall back to dungeon start.
  • 1-7 for preset location (keeps current season, weather, etc.).


  • P to toggle songs on/off.
  • [ to play previous song in context playlist.
  • ] to player next song in context playlist.


  • – to reduce timescale (0-8 steps).
  • = to increase timescale (0-8 steps).


  • I to toggle mouse invert on/off.
  • H to toggle high speed running on/off.
  • L to toggle debug text on/off.

Text And Localization – First Look

Text, text, text! There’s so much text in Daggerfall – from “Rat just died” all the way up to multi-page books. Before it’s possible to tackle many gameplay elements, something must be done about all this text. All the better if the text engine provides localization features at the same time.

Rather than start from scratch, I have integrated the excellent free Unity asset Smart Localization into Daggerfall Tools for Unity. On this solid foundation, I’m building import tools to convert Daggerfall’s various text sources into a format that can be easily localized and consumed at runtime.

Let’s take a look at the basic workflow. Everything starts with creating a “Localization Workspace” in your project Assets. By the way, it’s possible to work on translations without Unity installed, more on this towards the end.


What you see above is the Smart Localization workspace. I have already created 3 languages for English – en, French – fr, and German – de. There is also a Root Language File, which needs a bit more explanation.

The Root Language is a database of native key/object pairs that can be morphed into other supported languages. In addition to strings, the Root Language also supports images, sounds, and other game objects.

I am writing one-click importers that transfer text data out of Daggerfall’s various files (even the .exe) into their own text namespace. See below for an example after importing the contents of TEXT.RSC.


There’s a fair bit going on here, so I’ll break down all the parts.

Type is the type of asset being worked with. These are all STRING for now, but GAME_OBJECT, AUDIO, and TEXTURE are also supported.

Key is the unique key for this resource. As we’re importing from Daggerfall, the tool maintains each unique key in its own namespace. RSC means that TEXT.RSC was the source and the following digits are the unique ID for that text record. Each distinct resource will have its own three-letter namespace (BOK, IMG, SND, etc.) and unique ID.

Comment is the actual value, or contents, of that record. Anyone that has worked with Daggerfall’s text data will be familiar with the % codes. What’s a little different are how the control bytes are parsed into text format, for example [0xFD] for end of line. This is done because the control bytes are not valid characters for XML (which is how everything is saved to disk) and they are not generally human readable. The [0x00] format makes it very clear where control bytes are used and simple for a human to edit. It’s also trivial to parse these back into byte format.

A little more on those control bytes for anyone unfamiliar with them. They are basically for TTY-styled formatting. They control things like text position, justification, and font, and are very specific to the native Daggerfall GUI at 320×200 resolution. It’s very likely that future developers will prefer not to use the control bytes for their modern scalable UI. However, I pass through the control bytes exactly as-is and its up to the end developer how they wish to use them. If you would like read more about Daggerfall’s text then this article would be of use.

Once the Root Lanuage is ready, it’s time to create our translations. As the text is already in English – en it’s just a simple matter of opening that language and copying all values from Root.


Now the great thing about Smart Localization is that it supports CSV import/export. This means you can export out your language data to CSV file to edit in Excel or similar tool.


Because everything is uniquely keyed, translation teams can build “master” CSV files that implementors can use to quickly add/update languages in their projects. For example, below is the CSV for German – de from their TEXT.RSC file.


And then imported into Unity ready to use in a game project.


One issue with existing translations is that localization teams have needed to squeeze more complicated character sets down into Daggerfall’s 8-bit format. The good news is this is no longer necessary – you are no longer limited by Daggerfall’s engine. The bad news is that a lot of text will probably need to be rewritten for true character set translations for modern platforms. I will work with international Daggerfall fans to ensure they can use native character sets in the translation tool chain.

So we can create a giant resource database and spin-off various translations. How does this get used in a game project?

Accessing localized resources is very easy. For example, to retrieve a localized text string above, you would use the following code. Other resources are just as easy.

string textValue = LanguageManager.Instance.GetTextValue("RSC.1004");

As the native IDs are preserved, it will be easy for upstream developers to call for the correct translations as linked from quests and elsewhere. You can also add custom values for your own project, just need to give them a unique key.

Fell free to hit me up in the comments or via email if you have any question.

Daggerfall Tools for Unity 1.2!

The huge 1.2 world update is finally live! The tools have come so far since 1.1 and a big thank you is in order to everyone who tested Developer Preview versions and sent me feedback. You’ve all helped 1.2 become more than it could have been without you.


What’s New!


  • Now requires Unity 4.6. (and not yet compatible with 5.0).
  • Vast streaming world can be created procedurally at runtime.
  • Blazing-fast billboard system for dense trees.
  • Tilemap shader for retro-style ground textures.
  • Enter any valid building or dungeon.
  • Random encounter tables in dungeons.
  • MIDI synthesizer with custom SoundFont support.
  • Hundreds of bug fixes and small improvements.


  • Complete streaming world demo scene included with all code.
  • Weather effects with Weather Manager.
  • Helpers to change lighting based on time of day, season, dungeon.
  • Contextual Song Manager to play music appropriate to player.
  • Ambient Effects Player to play sound effects in dungeons, etc.
  • A player compass.
  • Footstep Manager to change footstep sounds in winter.
  • Example enemy and player scripts for basic combat setup.
  • Many more small helpers and one-shot classes to learn from.

Get The Release!

Watch The 1.2 Feature Video!

Play The Demo!



  • Mouse move to look.
  • W, S, A, D to move.
  • SHIFT (hold) to run.
  • SPACE to jump.
  • LEFT-CLICK mouse to open doors, enter dungeons, operate switches, etc.
  • ESC to exit game (standalone).


  • Z to toggle weapons.
  • Right-click and drag mouse to swing weapon.


  • R (while outside) for random location, season, time of day, and weather.
  • R (while in dungeon) to recall back to dungeon start.
  • 1-7 for preset location (keeps current season, weather, etc.).


  • P to toggle songs on/off.
  • [ to play previous song in context playlist.
  • ] to player next song in context playlist.


  • – to reduce timescale (0-8 steps).
  • = to increase timescale (0-8 steps).


  • I to toggle mouse invert on/off.
  • H to toggle high speed on/off.
  • L to toggle debug text on/off.

Atlas Editor Window

Just a quick post today. I’ve added a simple editor window for searching locations, to be available in 1.2 release. After selecting a region, you can either filter locations by type (city, dungeon, etc.) or enter a partial string which is matched against all locations in the region. The search string is not case sensitive and will match any part of location name.

I plan to add more features to this later, such as a map preview and setting location to StreamingWorld.



LypyL’s Unity Multiplayer Test 2

Good news, everyone! LypyL has created a second multiplayer demo for us to enjoy. It was amazing to share a dungeon run with him earlier.

Incredible to think… This is the first time it’s truly been possible to explore a Daggerfall dungeon with friends. Although still in early stages the potential for this is incredible. Great work LypyL!

Edit: Updated link to later build.

LypyL MP Demo2

Daggerfall Tools for Unity – Streaming World Multiplayer V.2.1 by LypyL

Web Player (Hosted by LypyL. Requires Unity Web Player)

New Stuff

  • Daggerfall, Wayrest, Sentinel & Orsinium Castles are explorable. Use fast travel to leave.
  • (local) enemies in dungeons.
  • Fast travel menu with 35 locations.
  • Music.
  • Player Skin selection.


  • Click to capture mouse (webplayer).
  • ESC to uncapture mouse (webplayer).
  • Mouse move to look.
  • W, S, A, D to move.
  • SHIFT (hold) to run.
  • SPACE to jump.
  • LEFT-CLICK mouse to open doors, operate switches, etc.
  • Q toggle no clip/fly.
  • E climb mode (when facing wall).
  • Z toggle weapon.
  • Right-click and drag mouse to swing weapon.
  • New: F1 fast travel.
  • New: F2 toggle music.
  • New: F3 previous track.
  • New: F4 next track.

Roadmap Jan-Mar 2015

I wanted to post a quick update of my plans over the next few months. This gives me some goals to meet and ensures any potential developers know where I’m headed next.

  • 1.2.x release with streaming world. This should be out in the next week. I’m currently stomping bugs, updating docs, and testing everything I can.
  • A few weeks break for Real Life work, as discussed a couple posts back.
  • 1.3 begins. This will be another big release with an emphasis on Text & Translations, NPCs, Quest Foundations, Performance Review, and Mixing Custom/Procedural Assets.

Moving forwards, I will try and be more conscientious of other developers. This involves a few changes to how I think about the tools.

  • Move to GitHub. I plan to do this as part of 1.2.x final release.
  • Fewer breaking changes when possible. This involves thinking about the impact of any changes to upstream developers. Where possible, I will avoid sweeping changes and use [Obsolete] rather than simply remove old methods.
  • Thinking about multi-player, multi-camera patterns. As much as possible, I will try to organise tools not to depend on a single-player, single-camera pattern.
  • Improve code practices in general. This will be stuff like using Interfaces where appropriate and trying to make the code easier to understand.

Obviously there will be a changeover period where your upstream code will get clobbered by changes at my end, but I’m hoping that sometime after 1.3 you can start to have more confidence about importing changes into your fork.

As always, I’m open to suggestions and learning from others.

Work/Life Time

Hey everyone. I just wanted to let you know that work is still heavy at the moment. I am also about to start a couple of surprise work projects that require a higher than usual amount of presence and concentration.

Things should go back to normal in around 6-8 weeks. In the meantime, I will work on what I can in Daggerfall Tools for Unity, but expect updates to slow down for a little while.

If you don’t hear from me for a couple of weeks, please do not be concerned. I know that I’ve been very active while getting this project off the ground, but it was inevitable that sooner or later I would need to take a break from my hobbies to concentrate on the business. It sucks, but I’ve got to pay the bills.

Thanks for your understanding. :)