Sojour 1.6.0.0 Has Released!

The new filing system!

This release is primarily about making Sojour play nicely with Cloud Drives.

I think it would be fair to say that file loading and saving just got a lot more complicated!

It’s one of those releases where a huge amount of work has gone into it, but if I have done my job correctly, you won’t notice much of a difference between this version and the previous one.

Only 161 files changed and that was just for this story!

I won’t go into too much detail as to how the new filing system works – that’s the video’s job which you can view at the end of this post.

What I will say is that this is the first iteration of this new and complex filing system. It has had around 2 weeks of testing, but alas, the hardware and cloud systems that I have access to is somewhat limited, which might impact the efficacy of the testing.

Before installing this update, I highly recommend that all customers backup their data first.

I’m hoping there won’t be any issues, but given the nature of what has been done, it wouldn’t surprise me.

If you do find issues, please contact me using the email at the front of the manual and we will work together to get it resolved!

Other changes included the incorporation of a new enterprise level logging system:

We now have logging!

Logging got added to facilitate the testing of the new filing system. It’s needed because so much now happens behind the scenes that this is the only reliable way to see what’s going on.

These log files are rolling log files, so they will never grow out of control. Once they reach their maximum size, the oldest entries are removed to create enough space for the new ones.

The above log is the standard log, but the system also outputs a much more detailed developers log for when Sojour is run from Visual Studio.

These logs are now included in Sojour’s exception windows if, heaven forbid, Sojour crashes:

The logs covering the day of the crash are now appended to any exception information!

This should enable me to more easily fault find customer issues.

With the inclusion of the robust filing system and logging, I’m starting to feel that Sojour has crossed that boundary from a bedroom project to a full-on enterprise application!

What else got changed?

There is now a new splash screen:

The new splash screen

This was added because the new filing system is now asynchronous. This results in the user interface loading up its various elements in real-time, which is somewhat disconcerting. The splash screen was added to hide this behaviour.

The rendering loop of Ionian – Sojour’s graphics engine also got re-written to take into account the fact that asynchronous file operations can make Sojour look less busy than it actually is. This can result in the graphics engine unintentionally hogging all the resources as it thinks Sojour is idling.

Various additional bugs were also fixed with the character health bars. These were all extreme corner cases. I only found these issues thanks to the new automated integration tests I wrote for this sub-system:

We now have new automated integration tests!

These tests should help prevent a re-occurrence of the emergency fixes that plagued the 1.5 releases.

The other big fix that got included in this release, was in and around how Sojour remembers its windows positions in a multi-monitor environment. There was a bug that prevented the windows being restored to the correct monitors. This should now be fixed – I say should, because the most monitors I could test this on was just two.

The video below provides a much more in depth explanation with regard to the new filing system. I’d encourage all customers to watch it!

That’s it for this release!

Have Fun!

RobP

Sojour 1.5.0.0 has now been released!

Sojour 1.5.0.0 has now been released! Tokens and map from Chaosium’s RuneQuest Starter Set and RuneQuest Adventure Tokens pack.

This is the first release from my new build and release system (I migrated from JIRA/Confluence/TeamCity to Azure DevOps earlier in the year). Hopefully, there will be no issues, but this is something to be aware of!

The new Azure Devops System scaring the willies out of me! Is that really how much time I have left?

Before we get to the list of changes, I’d like to point out that I’m now working in iterative sprints where the stories are a lot smaller than they used to be. The upshot is that it is no longer worth publishing the story numbers like I used to do with the old RPG-XXX format.

The reason for this is that the number of stories per release has increased dramatically. This release alone as over 30 of them. I’m pretty sure you don’t want to know about all the details!

What are the changes?

At a high level, they can be broken down as follows:

  1. Added support to add external web pages to Sojour as either a tab within Sojour’s main window or as a separate standalone window.
  2. Added a dice rolling trigger to enable web pages to trigger rolls on Sojour’s tables. Note, this is an early version, in that right now it only works by inspecting network traffic. I do have an upgrade in the pipeline which will also analyse the web page itself. Until then, JavaScript only apps might not work with this system.
  3. Sojour’s tokens and maps now support three additional image formats: GIF, WEBP and AVIF.
  4. Sojour’s map can now be panned by left clicking and dragging the mouse directly on the map – you would not believe how hard this was to do – especially in 3d!
  5. Trackable Characteristics now support as many characteristics as you want to add! This used to be limited to four, but I have now lifted the limitation. However, the health-bars displayed on the maps and toolbars can only show these characteristics in groups of four at a time. You can switch between groups by using the left and right keyboard arrows when hovered over the health bar for a token.
  6. Fixed an issue where computers with touch pads or touch screens could force Sojour’s maps into an infinite zoom.
  7. Campaign Assets are now always rendered underneath other tokens with Static Campaign assets being at the lowest level. This is because these tend to represent map features, so other tokens should appear above them.
  8. The File Manager now performs a ‘Save All’ prior to performing some of its operations. (A necessity after Sojour’s file system got changed in the previous release.) The File Manager has also been updated to aggressively close down and free all memory allocated by WebView2 – this is to prevent crashing when restoring from a backup due to WebView’s cache being locked.
  9. Fixed a bug where changing External Characteristics on a player character didn’t propagate to all maps.
  10. Opening Characters, Campaign Assets or Tokens and then shutting them now returns focus back to Sojour properly. This is a WebView2 message queue and threading bug!
  11. All external components used by Sojour have been upgraded to latest – if I have done this right, you won’t notice any changes!

That’s it for this release. Please do get in touch if there are any issues (email is in the front of the manual). I have done a lot of testing, but I’m a little on edge as this is my new development environment’s first real public release!

Here is a video covering off the main features!

Have Fun!

RobP

External Resources – Preview

Howdy Folk!

This is post to give you a preview for what’s coming to Sojour.

The screenshots and video are from a very early build and there is still much more to do, but, hopefully you good folk will see some value in it.

Firstly, what do I mean by external resource?

An external resource is any web based resource.

Right now the system is coded to deal with just web pages, but in the future it will support direct API communications for the more advanced users here.

I guess the next question is, what can I do with external resources?

At their most basic level you will be able to embed web pages into Sojour as an asset:

TravellerMap.com embedded within Sojour!

External resources have several advantages over using a web browser.

Firstly, the resource is easier to find and you don’t need yet-another-window open to use that resource.

Secondly, if the resource tab is left open and Sojour is closed down and restarted, it will reload that resource from exactly where you left off. In the above example it would remember your last map position.

Ok, we have established that we can embedded external resources into Sojour, but can it do anything else?

Yes. Yes it can!

Sojour’s external resources can have one or more triggers added to them. These triggers allow functionality within Sojour to be triggered based on various criteria from the external resource.

For example, if I wanted to integrate a third party dice roller, say DDDice, I could add a trigger to look out for when a dice is rolled in DDDice:

The trigger editor for external resources. This is DDDice being wired into Sojour!

More triggers can be added or the existing ones edited by using the assets browser:

The updated tree view.

Now that DDDice is wired in, I can roll dice in it and have them trigger table rolls in Sojour automatically!

DDDice fully integrated! Make the roll and see the result in Sojour!

Sojour will initially support two types of trigger: A table roll trigger and a journal injection trigger. There are plans for a further 6 trigger types, but the implementation of these is further off.

Obviously, DDDice is just an example. This system can be used to integrate any web resource that uses HTTP/S! 😎

You can see external resources in action by watching the You-Tube video below:

That’s it for this post!

Please bear in mind that it’s an early preview of a very early iteration of brand new functionality. This will only get better as we go down the road!

Have Fun!

RobP

Sojour 1.2.155.0 has been released!

I’ll start by saying that this is NOT the custom folders release. Work is still ongoing for that release, but I do have a video of it in action!

Instead, this release is focused on bug fixing and maintenance that addresses the following issues:

RPG-396 When Sojour crashes (on load), we should not be overwriting the main save files: This is an important one. I have had 3 reports over the last year of customer’s save games being corrupted.

When I examined their saved games, it looked like the save files had become partial save files. I finally traced a potential use-case where this can occur…

There are occasions where Sojour could crash during loading resulting in incomplete data being resident in memory. The global exception handler would then try and save that data resulting in partially complete saved files.

This will no longer happen. In addition, I have changed the code for closing down Sojour post crash so that it more reliably closes its process down.

RPG-397 Sojour shouldn’t crash if there are missing data directories on load. A week or two back I had a customer report that their Sojour game was crashing during loading and there was nothing they could do.

On investigation, I discovered that some of the customer’s data folders were missing. This upset Sojour and caused it to crash.

Sojour is now a lot more tolerant with regard to missing folders or data. In addition, if a crash is detected whilst loading, Sojour will now offer the option to pick a different data directory, restore from a back up, or simply exit:

The new exception handler for failed loading! (Click the image to see a larger version)

RPG-399 Sojour crashing when dragging character to map with journal open. This was an odd one in that the investigation had found some corrupt internal data within the customer’s save file which, alas, I hadn’t been able to reproduce.

This corrupt data was centred around token characteristics. All token characteristics code has now been updated to be more fault tolerant.

RPG-400 Adding or editing a map-link with no campaign selected crashes Sojour. Sojour used to use the assets browser to get the current campaign or ruleset. The flaw with this approach is that if a user selects a different campaign, or no campaign at all, it can lead to Sojour having problems.

This code has been entirely re-written and all places that used to rely on the assets browser for the active ruleset or campaign, no longer do so, and instead, use the updated code.

RPG-401 Adding or editing a map-link when the map is set to show all, doesn’t show them! This is a minor issue where adding or editing a map-link would result it in not respecting the current map’s Show Map Links option. This has now been fixed!

Work has been slowed down a little by the fact that Sojour currently has three work streams associated with it:

The three main work streams / branches!

Having three streams of parallel work means that any issues I find in one of them has to be merged into the others. This is normally pretty easy using my source control system.

However, the fly in the ointment is that the Custom Folders branch sports a radically different UI architecture from the other two branches, which means that some fixes have to be hand coded as opposed to merged!

Normally I try to work on one thing at a time, but I soon realised that if I stayed on the calendar work, my customers would see very little new from me as that work is such a large undertaking.

Custom folders sprung up as a result of many customer requests and of seeing Lord Gwydion struggle with his data during the live streams. As with most things software related, I had thought it would be a quick and easy update, but it has turned out to be a little more complex. Hopefully the video above will provide ample evidence that we are headed the right way.

Finally we have the main branch where all the hot-fixes and high priority changes go.

My end game is to get back to one branch again, but this is predicated on me delivering the Mk2 Calendar and Custom Folders functionality! 🙂

That’s it for this post!

Have Fun!

RobP

Automated Tests! Oh, and Dorian…

This is a fly by update to let folks know that development is still ongoing in the Sojour world despite time pressures.

As per previous posts, the current development focus remains with the Calendar Mk2 system (which I should really give a name!).

One of the things that I have realised whilst developing this system is that it has many complex algorithms that interact with each other. As a result it can be quite easy to upset them and not know that they have been upset.

In the end I decided that this is an area of Sojour that absolutely needs some automated testing around it.

Automated tests will automatically ensure that the complex algorithms in the Mk2 Calendar are performing as they should. These tests also highlight existing potential issues and pitfalls – many of which have since been fixed after being identified by these tests.

The ever expanding test suite for calendars Mk2 (Click for larger image)

We are now up to 134 integration tests that are automatically run by my development environment every time I merge code:

The build server automatically running the new tests! (Click for larger image)

Writing the tests takes a fair bit of time, including the time required to integrate them with the automated build pipeline – it’s why the build server screenshot above shows a lot of red as I try to get the server to run the tests correctly.

Despite the time cost, these tests enable me to write code faster and more efficiently.

If I do break something it will be flagged on the build server and also in JIRA as shown below, top left (the red rectangles are builds where tests failed):

The builds show up top left in JIRA! (Click for larger image)

If any of the tests do fail, they will provide detailed information as to why they failed that should speed up my job and also help to produce a warm fuzzy feeling that things are working properly and headed in the right direction.

Ok, so that’s what I have been doing on the new calendar system, but, what’s Dorian when it’s not at home?

Dorian is a new graphics engine that I’m working on. It will replace Ionian which is the one currently used by Sojour (and by Ancient Armies).

A very early version of Dorian strutting its stuff!

Why a new graphics engine?

The primary reason is that Ionian is preventing Sojour from being a 64 bit application, which limits the memory it can access. This can lead to limitations with image sizes etc.

Dorian will be fully 64 bit compatible, it will support Direct-X 9, 11 and 12, plus it will allow rendered surfaces to be embedded in WinForms – much like the current Ionian engine.

The above demo shows it running successfully in a 64 bit application in a WinForm – a big milestone for the engine.

There is still a lot of work to do and once the engine is ready, Sojour will need to be updated to be able to work with the new engine. It will be a non-trivial job, but it’s a piece of tech debt that has to be tackled to allow me to take Sojour to the new places it has to go.

That’s it for this post!

Have fun!

RobP

Lord Gwydion uses Sojour for Ker Nethalas!

This is a shout out to Lord Gwydion who has started filming some great You-Tube videos using Sojour to run a solo adventure using Ker Nethalas (click to go to its store page).

So far there are three videos, an introduction to Sojour:

And the adventures of Samuel through what looks to be a fairly dangerous dungeon:

Lord Gwydion also created a video demonstrating using Sojour to create a ruleset for Ker Nethalas:

The system is very interesting one in that it is solo focused, but also provides the player with a lot of agency. I highly encourage that you pop over to Lord Gwydion’s channel to follow the adventures of Samuel!

Also, don’t forget to thumbs up Lord Gwydion – producing videos for You-Tube is not an easy task and takes considerable effort!

On the development front, work is happening on Sojour, albeit at a very slow pace as I’m finding it hard to get the time together.

The current plan still stands: A calendar update to version 2, followed by tables enhancements, followed by dice enhancements. Once they are all in, I’ll ask the community what they want to see next!

In the meantime….

Have Fun!

RobP