Daggerfall Imaging 2 – User Interface

This post is about a few of the UI enhancements going into Daggerfall Imaging 2. Not exactly gripping stuff, but I know many people are still using the old DF Imaging and may be interested in where I’m going with the new version.

When you open the old version of Daggerfall Imaging, you’re greeted with the following dense menu of image files to choose from:

Talk about a wall of text! Most people only fire up Imaging once they’ve found the file they want in Daggerfall Explorer first, and even then it’s easy for the eye to get lost. Things don’t get any better once you’ve opened an image file, either. You’re limited to simple “next-file” and “previous-file” buttons or doomed to return back to the mess above and start again. Let’s face it, Imaging is a nice exporter with a rubbish UI. And haven’t people let me know it; I’ve received dozens of emails over the years condemning the user interface.

So while finishing up image handling in DFConnect, I thought: “what the hell, let’s rewrite the old mongrel.” It was a perfect opportunity to improve on an old tool and catch some bugs in my new library.

Searching through images should be fun and easy, and the best way to accomplish that is to let the images do all the talking. It’s much easier to find what you want from thumbnails than plain-text filenames, so the first change was to put in a nice thumbnail viewer.

 Thumbnails Detail Tiles

The thumbnails are housed in a sizing pane and can be rendered in a few different ways. Currently, there are two formats for browsing Daggerfall’s image files. The Thumbnails layout is just a preview of each image file. You’ll notice these thumbnails are mini views of the entire file, not just a single image. Think of them as thumbnails inside thumbnails. The Detail Tiles layout has the same thumbnails, but with additional information about the image file itself.

This simple change makes browsing into image files a lot more visual and fun. I never feel “lost” among the files, something I felt all the time in the old Daggerfall Imaging.

For those of you following DFConnect, the thumbnails are generated by a new method called GetPreview() that renders an image file onto a managed Bitmap. You can specify the dimensions of the resultant Bitmap emitted by this method, allowing you to fit more/less images into a single preview. All DF image classes support this method.

New Exploring Tools

I’ve mentioned in the past that I plan on releasing standalone exploring tools based on DFConnect. The first of these tools is under development now, and proceeding rapidly. Below are a couple of screenshots of Daggerfall Imaging 2.0.

   

Daggerfall Imaging has always been the least favourite of my old tools. Despite solid exporting features, it was let down by many aspects of the user interface. To date it is the only tool I have received negative feedback about. For these reasons it became the first program I wanted to revisit as DFConnect matures.

I plan on releasing the first version of Daggerfall Imaging 2.0, complete with source code, before the end of May. This will coincide with an update to DFConnect. The goal is to create something useful and fun while honing DFConnect through actual use.

Time permitting, I hope to turn out new small-to-medium exploring tools every few months. This will give everyone something to play with and demonstrate what DFConnect is capable of.

DFConnect Library 0.4.5

DFConnect Library 0.4.5 is now available for Download. Please check the Issues page for current known issues, and the System Requirements page for help getting started.

The key feature of this build is RMB and RDB blocks are almost fully supported by the library. This release includes an RMB Block Viewer Demo (binary and source code included with library download). The control scheme of this tool follows the RDB viewer:

RMB (Outdoor) Block Viewer

  • Click and hold the left mouse button while moving the mouse to look around in a first-person manner.
  • Click and hold the right mouse button while moving the mouse forward and backwards to move along the camera’s facing vector.
  • Click and hold the middle mouse button while moving the mouse to go up, down, left, and right relative to the camera’s facing vector.
rmb viewer 1 rmb viewer 2
rmb viewer 5 rmb viewer 3
rmb viewer 7 rmb viewer 4

The upcoming 0.5.0 build will introduce Maps.bsa support, along with climate processing (i.e. using correct textures for swamp, desert, etc.). This build will also include a simple map viewer demo similar to early screenshots of Daggerfall Scout.

The 0.5.5 build will be a bug-fixing and polishing build. If you have any problems with DFConnect not mentioned on the Issues or Troubleshooting pages, please Contact me so I can address them.

Starting with 0.6.0, I will be adding more usability features to the root DFConnect namespace. While the individual classes in the DFConnect.Arena2 namespace greatly simplify access to Daggerfall’s files, the addition of custom readers will make this easier.

I have started work on standalone applications that demonstrate advanced use of DFConnect. The plan is to release these separately to the DFConnect Library as new exploring tools. Details of these tools will be released shortly after the 0.6.0 milestone.

Workshop Updates

Lately, I have been spending most of my development time on the DFConnect Library. Besides making Daggerfall’s file formats more accessible, I now have the added benefit of a framework for rapidly discovering new things. I hadn’t realised just how cumbersome my old code had become until I started writing tutorials and demos for DFConnect. I can do things with DFConnect in a few lines of clear code that previously required a lot of jumping through hoops. There’s a lot to be said for a clean rewrite and rethink. Time spent on DFConnect is time saved in the future. Best of all, it’s something the entire community can take advantage of.

I’ll give you an overview of what I’ve been up to.

DFConnect 0.4.0

The next build of DFConnect is almost finished, and will be up in the next few days (this weekend at the latest). This build supports reading from BLOCKS.BSA, with a strong focus on dungeon (RDB) blocks. Outdoor (RMB) blocks are implemented, but still need some testing. So dungeon blocks will be the focus of this release, and outdoor blocks the release after.

DFConnect Demos

To complement the tutorials, I have started work on a series of demos for getting the most of DFConnect. These demos will cover things like proper 3D visualisation of models, blocks, and maps. Future demos will cover action records in dungeons (moving blocks, levers, etc.) and working with world data.

These demos will be available as pre-built explorers for everyone to play with. The source code for these demos will be bundled with the DFConnect Library starting from 0.4.0.

WorkshopDemoEngine

This is a self-contained 3D rendering engine – basically a simple wrapper for Ogre3D 1.6.3. All DFConnect demos will use this engine for 3D visualisation.

The WorkshopDemoEngine does not expose the full functionality of Ogre, just enough to do the job at hand. The goal is to provide a series of simple and direct examples of how to work with DFConnect data without cluttering these examples with engine-specific boilerplate. The implementation should be generic enough for you to learn the important concepts and apply them to your own engine of choice.

The second purpose of the WorkshopDemoEngine is a simplistic foundation for everyone. If you are just getting started with the DFConnect examples, or C# itself, the engine will hopefully be an easy starting point for you to get cool results without struggling with a 3D library on top of everything else.

Dungeon Block Viewer

Below are a couple of screenshots of a test dungeon block viewer. This uses DFConnect and the WorkshopDemoEngine. A cleaned up version of this will be released with DFConnect 0.4.0, along with source code.

Also, a big thanks to Lucius for his tips on cleaning up the edges of my billboards. The 2D flats have lost their black edges, and now blend slightly into the environment instead (not really visible in jpeg below). Enabling anisotropic filtering on supported hardware has cleaned up texture noise on long stretches adjacent to the view direction (see bottom-right screen shot).

blockviewer1 blockviewer2
blockviewer3 blockviewer5

Future of Daggerfall Scout

I’ve been thinking a lot about Daggerfall Scout, and where it belongs in regards to how I spend my time on this hobby. A few things have made me rethink the purpose of this tool:

  1. The best part of Daggerfall Scout has always been exploring cities and dungeons. This will very shortly be possible using the DFConnect demos. While these demos won’t have all the features planned for DF Scout, they will do much the same thing – with source code and faster to boot.
  2. Working with Daggerfall has never been easier for me than it is now with the DFConnect Library. As Daggerfall Scout is based out of a much older code base, it carries a lot of baggage along with it. Every time I look at the DF Scout code these days, I spend all my time wishing I’d written DFConnect first to make life easier on myself.
  3. Last but not least is DaggerXL. What Lucius is doing here is incredible! Much of the “wow” factor of DF Scout has been far exceeded by DaggerXL. If I had to choose between exploring the world in DF Scout, or in DaggerXL, I’d pick DaggerXL every time. If that’s how I feel about my own program, then others probably feel much the same.

When I started on DF Scout earlier in the year, the Daggerfall scene was stagnant. Since then, Daggerfall has been released for free and Lucius has come along to bring our remake dreams back to life. With the community revitalised, DF Scout is just looking really tired. To be brutally honest, I think I’m wasting my time with it.

Moving forwards, everything good from DF Scout will be cannibalised for DFConnect. So rather than releasing one big program at some point in the future, I get to release lots of small purposeful programs almost right away. For people who just want to explore the game files, these programs will be available for download. For people who want to hack away at the Daggerfall files themselves, the source code for these programs will help you get started.

I feel this adds the most community benefit, and is more in line with the spirit of Daggerfall Workshop. Thinking back to the glory days of this site, I can only imagine how much more could have been accomplished if I’d started work on a Daggerfall library then, rather than sinking that time into other projects that ultimately went nowhere.

Community Forums

To start rebuilding our development community, I am reopening the Workshop forums in the next few weeks. This will be a place where Daggerfall hackers can get together and talk about their projects. If you are using the DFConnect Library, this will be the place to share your ideas and get support from the community. Promising projects will be given their own subforum, just like in the past.

In the meantime, I am opening up comments in the blog for new posts starting with this one. I look forward to hearing all your thoughts.

Visual Diary: Building Maps – Part 1

The Cartographer view in Daggerfall Scout is a continuous map interface, allowing you to zoom all the way out to see the whole Illiac Bay at once, or zoom right in to street level to see individual ground detail and buildings. The location browser on the left is for quickly finding a location.

 CartographerDev2

Prototype

The first step was to quickly prototype a dynamic scrolling map. The screenshot to the left renders each world cell using a single texture (from TEXTURE.002, .102, .302, and .402 depending on climate type). Locations are just plotted as red squares.

This fairly basic setup solves most of the early problems, and helps me visually confirm my new ultra-fast world queries are working. Now to throw out the experimental code and write it again properly.

 CartographerDev4

Top-Level Map

There will be several levels of fidelity to the map. To start with we have the whole Illiac Bay on-screen at once. On the left is the first version of this map. Water is blue, land is grey, and locations are just yellow dots. So many locations!

I tried several different approaches here before settling on dynamic textures mapped to quads. The next step is to add some details.

 

 CartographerDev6

Region Coding

This picture colours each region band appropriately. The colours have been averaged from the actual region ground textures. Location dots have been disabled so I can see details.

 CartographerDev7

Height Shading

Next I have modified climate colours based on elevation of the landscape. As you zoom in, this will be replaced by actual deformed terrain and textured ground.

Nothing here is pre-generated, this is all built dynamically by reading data from MAPS.BSA (locations), CLIMATE.PAK (climate), POLITIC.PAK (region) and WOODS.WLD (elevation data). Every “world pixel” is built from a combination of data from these sources.

 CartographerDev8

Zooming In

This screenshot is a slightly zoomed-in version of the above. This is about the limit of the top-level map, once you zoom in much further, 3D elevation maps will start to be paged in. My next post will show the process of this being added.

Updated User Interface

I have been working on a new user interface for Daggerfall Scout. I was often frustrated by the previous UI, due to conflicting requirements between the navigation and exploration components. I wanted to put more detail into the navigation pane (lots more detail), but I also wanted the 3D exploring pane to have as much real estate as possible. After trialling many solutions, a simple tabbed view proved the most elegant.

The free release of Daggerfall also prompted a complete rewrite of how I cache content. My initial design only supported an original Daggerfall CD (i.e. optical media). The new cache is more streamlined, in addition to supporting the free version of Daggerfall.

Note: I am a bit further along than these screenshots show, but future posts will be confusing unless I talk about the new UI first.

 DFScoutUI1

First Run

The first time you open Daggerfall Scout, it prompts you to set your Arena2 path. This is more in line my previous tools. The Arena2 path can be a Daggerfall CD, full installation, or unzip of the free download.

Once set, Daggerfall Scout will automatically attach to your Arena2 folder next time you open it. If you move/delete your Arena2 folder, DF Scout will simply reprompt until it is provided a valid Arena2 folder.

You will notice the two tabs at the top allow you to switch between the Cartographer and Explorer views. More on this below.

 DFScoutUI2

The New Cache

Once your Arena2 path is set, Daggerfall Scout will initialise the cache. Unlike the old cache that required everything to be built ahead of time (which could take several minutes), the new cache simply performs a few essential startup tasks. The whole process takes a few seconds the first time, and less than a second on subsequent opens. Content is then cached as needed.

This means DF Scout is ready to go in a matter of seconds, without burdening the user with a cache builder dialog. Not only is this a huge plus for everyone, it allows me to quickly trial changes to my converters without waiting for a complete build or navigating through several windows.

 DFScoutUI3

Cartographer & Explorer

It doesn’t look like it yet, but the Cartographer view is turning into something special. On the left is the familiar region-name browser you saw in the old UI. On the right, I am developing a complete 3D map of the game world you can zoom and pan around (think Google Earth). This 3D map is constructed from random landscape tiles and populated with all cities and locations. When zoomed out these appear as coloured dots, as you zoom in these progress from a simple 2D map to the actual location itself. This view will be the subject of my next several posts.

The Explorer view is more or less what you’ve already seen in previous screenshots (fly and walk around a town/dungeon), but with one exception. You are placed properly in the world itself, and all random landscape is generated around you. You will be able to fly from one end of the map to the other.

To make the two views as seamless as possible, I will be creating several methods of switching between them based on context. For example, if you are hovering over a location you’d like to explore in the Cartographer view, a quick shortcut will take you directly to that place in the Explorer view where you can explore at ground level.

This has just been an introduction to the new user interface. I will be posting more in the near future and showing off early stages of the Cartographer view.