Folders and a Refactor!

This is a quick update to let you folks know what I’m currently up to!

Calendar Mk2 work is still progressing with more automated tests being added all the time.

However, I decided to take a short break from the calendar work to enable me to deliver some much requested functionality: Folders!

Up until now the user had no real power of organisation in Sojour. They were reliant on the structure that’s provided in the Asset Browser.

The new code that’s being written changes this and will allow users to add their own folders so as to better organise their work:

We will soon be able to add folders! (Click for larger image)

To add a folder, all one need do is right click and select ‘Add Folder…’ to an existing folder or to one of the following nodes:

  • Campaign Assets
  • Characters
  • Documents
  • Journals
  • Maps
  • Tables
  • Document Templates

This will result in the folder naming dialog appearing:

The folder naming dialog (click for larger image)

Once a name has been entered, your new folder will appear in the Asset Browser:

A new custom folder! (Click for larger image)

The folder system is coded to allow one to define folders within folders. You can go as deep as you need to go. The only limitation is that folders can only hold one type of data based on their parent node.

For example, if you create a number of folders under the Maps node, only maps can be stored in those folders. However, you can store as many maps as you want at whichever levels that you want!

I was on the home straight of delivering the folders functionality when I realised that Sojour had a bit of an architectural problem…

Whilst plumbing in the new menu items needed to support the folders system I realised that the display layer of Sojour had rather too much complex code in it. 6412 lines of code to be precise. (Eeek!)

This code encompasses a huge range of user functionality resulting in it being hard to figure out what’s where and how it all hangs together.

Architecturally, on the whole, Sojour is pretty good in that each subsystem such as Maps, Journals, Tables etc is confined to its own classes with no cross talk.

However, the large display layer kind of throws the spanner in the works with regard to architecture because it has to orchestrate many of these subsystems and user controls to do the users bidding – often resulting in some pretty complex code.

This complex code is made harder to understand simply because it is all in one place within the display layer.

I felt I needed a way to simplify the display layer in order to make it easier to find and understand what was going on within that layer.

To that end, I came up with the concept of an Action.

These Actions represent the actions of a user.

Actions would then be grouped into classes by originating subsystem. For example, all actions originating from a Journal would find themselves housed in a JournalActions class.

These actions classes would then coordinate all the UI changes and subsystem orchestrations in order to achieve what it is that the user wants. Such an architecture helps keep related functionality together and it encapsulates the really hard parts away from the display layer.

The result is that the display layer will have a much simpler and smaller code base.

For example, if you wanted to change the hit points of an NPC in the Journal, all the display layer would need to do is call JournalActions.UpdateNpcHitPoints – just one line of code and that’s it! This contrasts to the many hundreds of lines of code currently within the display layer for this specific functionality.

The other advantage of this architecture is that many UI elements can now cleanly invoke the same functionality without having to duplicate the code or understand how it works!

It’s a great architecture and I’m quite pleased with it. But, alas, it’s going to take a fair bit of time. I have already made a fair bit of progress but there is still a long way to go:

Almost 12 hours have been pumped in so far! (Click image for full sized version)

It turns out that the quick diversion from the Calendar Mk2 work for custom folders is going to end up being a not-so-quick one.

On the plus side, it will leave Sojour’s architecture in a much better place to accept changes and as a bonus you folks will get the much requested folders system!

That’s it for this update!

Have Fun!

RobP

Sojour 1.2.113.0 has been released!

This is a minor update that provides the following enhancements:

RPG-391 Attempting to open an already opened document will now bring that document into focus, even when that document is minimized. For minimized documents Sojour will now restore it to where it was originally located on the desktop and then bring it into focus.

RPG-392 Microsoft’s WebView2 component – used for PDF viewing – has now been upgraded to the latest available version.

The WebView2 component proved particularly difficult to update as my source control system wouldn’t let me push the latest WebView2 binaries because they were too big.

Dev-Ops hat is now firmly on as I attempt to fix the WebView2 issue!

The downside to being a sole developer on a project is that one has to be multi-disciplined. I have to be the Software Developer, the Technical Author, the QA, the DevOps person, the Marketing Manager, the Business Manager, an Accountant and the Customer Service representative! Though luckily not all at once!

To fix the WebView2 issue, I had to put on my Dev-Ops hat and figure out a way around the binary size issue. After a lot of tweaking on the build server, I finally managed to find a solution and get the latest WebView2 component to build on the build server! 😎

The above enhancements were added after watching Lord Gwydion’s excellent You-Tube series for Under the Ashen Skies:

I noticed that Lord Gwydion worked with a lot of PDFs and was having issues locating the ones he needed to use – hence the above enhancement.

Work still continues on the Mk2 calendar system. The automated tests are now up to 211 in number! These tests have highlighted many areas where the code needed improving.

These improvements have been implemented, but there is still a lot more to do, both in terms of adding new automated tests and in adding new Mk2 calendar functionality.

We are now up to 211 automated calendar tests!

That’s it for this update!

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

Calendar progress and Release Notes for v1.2.86.0

As many of you know, I have been finding it difficult this year to get the time together to do as much development on Sojour as I would like.

However, progress is being made, and if anyone reports any game-breaking bugs or other general usability issues, I will try and make the necessary time.

The calendar’s user interface has had a few changes made to it. Here is a screenshot of it displaying a Gregorian calendar designed from first principals using time units:

The new calendar pane! (Click for larger version)

The changes are required to allow the calendar to accommodate the additional information that the Mk2 calendar system can support.

In the future one will be able to get a zoomed in view of a day as one’s mouse cursor passes over it!

Time Units will now show you when they are being overridden by rolling entities by turning red and displaying a message to that effect. The affected fields also show the overridden values and are set to read-only:

Overridden time units (Click for larger version)

Clearing their overrides or moving the rolling entities to a different level results in the colour’s moving with the changes. Here I have moved the day rolling entities up to the week level (level 2):

The rolling entities are moved up a level! (Click for larger version)

Not a good idea, just demonstrating functionality! Note that there is a new bug in the above image where the original level three values are not being restored. This used to work and will be fixed!

Rolling entities image coding is now mostly done. Here I have created a second rolling entity group just called Images and have assigned three rolling entities to it with three different images (a speaker, a basket ball and a musical keyboard). Here is the speaker one:

Rolling entities now support images! (Click for a larger version)

Here we have assigned the Image rolling entities to level 3 and set the speaker image is the start of the sequence. We have also set a parameter called ‘Skip’ to 1. This means that every single calendar cell will get a rolling entity. (If it had been set to 2, every other calendar cell would have got this rolling entity):

Setting the assigned level! (Click for larger version)

By assigning our Image rolling entities to level 3 we now get this on the calendar pane:

Two sets of rolling entities in action at the same time! Days of the week and Images! (Click for larger image)

The above image is quite significant in that it shows that Sojour can now handle multiple rolling entities, simultaneously, even when assigned to the same level!

The image render code is an early version and is just there to show me the system working. It will be improved as coding continues.

Why support images?

By doing so, one could add an image sets that represent cyclical things such as, for example, the phases of the moon.

That’s about it for the calendar progress. It is slow, but it is getting there!

Now for v1.2.86.0 release notes – (this update will be up very soon):

Enhancements
RPG-386: The drop down lists in the journal for look-up tables and turn sequences can now be filtered and searched by starting to type the name of the table or turn sequence you are trying to find. It should make finding the required items faster when you have a lot of them!

You can now filter the drop down lists! (Click for large image)

RPG-387: Sojour only used to save data on exit unless the user used the various manual save buttons. The problem with this approach is that if Sojour crashes or your computer dies, you could lose a lot of data.

Sojour has now been updated to be a lot more aggressive with regards to saving your data. It will now auto-save your data for no less than 41 additional activities! Alas, there are some activities that I couldn’t add this for without compromising performance. However, I will keep this under review.

Fixes
RPG-388: Fixed a bug where events could end up on the wrong day for years with leap days. Also fixed recurring events so that they take account the origin year’s leap days and all subsequent year’s leap days. This ensures that recurring events now always occur on the same day across all years.

That’s it for this post!

Have Fun!

RobP

The Gregorian Calendar can now be modelled with Time Units!

Sojour uses Time Units to model any calendar from first principles.

Here are a selection of calendars created using these Time Units (Click the images to see full sized versions – you can do this for all images in this post):

A Gloranthan Calendar
A D&D Calendar
A Third Imperium Calendar

As you can see, the calendar system is pretty flexible!

However, there used to be a limitation with the system. It couldn’t support calendars that roll their days relative to their months. For example in the Western Gregorian calendar, the 1st of February will start on a different day of the week dependent on the year.

Given that Sojour couldn’t model this, it used to cheat and provided the user with the Windows Operating System’s Gregorian Calendar.

But not any more! Sojour can now model rolling calendars too! 😎

I thought the best way to test the new rolling calendars functionality was to build the Western Gregorian Calendar from first principles using only Time Units and Rolling Entities. If I could get Sojour to model this relatively complex calendar, it should be able to model any calendar!

A few months back I had thought I was nearly there. But detailed testing showed that my calendar always seemed to be a day out here or there. Tracking down these issues took a lot of time. But they are now all fixed!

One problem (of many) were the leap years. I had thought they were simple.

Every four years is a leap year, right?

Wrong.

Turns out there are additional rules…

If the year is divisible by 100, then it must also be divisible by 400 to qualify! So 1700 and 1800 would not be leap years, but 1600 would be.

To allow the modelling of this and other rules, I added the concept of leap year rules, which consist of a triggering condition and any number of rules associated with that trigger:

We now have leap year rules!

For the moment the system only supports divisor triggers and rules, but it is designed to support any mathematical expression should the need arise.

To model the Gregorian calendar Sojour only needed one trigger and one rule. The trigger is activated when a year is divisible by 100. Once triggered, its associated rule – the year must be divisible by 400 – is then invoked.

I suspect that most gamers will not use this functionality as RPG calendars tend to be relatively simple affairs . However, these rules are incorporated to allow the user to be able to create complex calendars such as the Gregorian one.

Why bother trying to model rolling calendars?

Rolling calendars, or in Sojour’s parlance Rolling Entities, allow for a lot more flexibility and will allow users to create their own custom rolling calendars such as the Golarian one used in the Pathfinder RPG. Without this ability, such calendars would be impossible to create.

How are the rolling days of a month created and modelled in Sojour for the Gregorian calendar?

You need to create a Rolling Entity Group, call it days of the week, add the seven days and then associate that Rolling Entity Group with a Time Unit level:

Rolling Entities in Action!

The screenshot above shows our days of the week Rolling Entity Group. We have also ticked the ‘Override Time Unit?’ option so that these Rolling Entities replace the names of their target Time Units.

If you examine the screen shot closely, you can also see that these Rolling Entities target the third level of Time Units, which in this calendar’s case equate to days (as seen in the tree view on the left).

The ‘Start Year’ and ‘Start Rolling Entity’ fields are simply used to determine how the Rolling Entity Group is synchronised with the main calendar. In this case we are saying that for the start of the year 2024, its first day of the week will be a Monday. Sojour will then automatically calculate all the other days of the week!

Rolling Entity Groups and Rolling Entities are extremely powerful. They aren’t just limited to modelling days of the week. A calendar could have as many of these as required and each of them could be applied in a myriad of different ways.

For example, in the Gregorian Calendar, we could add an additional Rolling Entity Group to model the phases of the moon. These moon phases would then show up on the relevant days!

For the rest of this post I will show you Sojour’s Gregorian calendar from first principles using Time Units and Rolling Entities, along with proof that Sojour’s calculations are correct!

First up, an easy one, today’s date:

So far so good…

Lets try the earliest year that Windows 11 allows its calendar to go – 1924:

Still good!

What about a long way in the future? Say the Year 4765?

Alas, the Windows 11 calendar won’t go that far in the future, so we will have to check our calendar against what the Internet says:

Sojour is still delivering the goods!

What about the crazy leap year rules? Will Sojour show 1600 as a leap year, but 1700 and 1800 as non leap years?

Leap Year
Non-Leap Year
Non-Leap Year

Yes. Yes it does!

As an aside, any Time Unit or group of Time Units can be leap year enabled to allow you to create some truly unique leap years for your calendars. These are already used to great effect in the D&D calendar.

Those leap year screen shots look impressive, but how do I know that the actual days of the week shown are correct? Let’s pick 1700 at random. Here is what the internet says:

All good here too!

How about a crazy early year? Say the year 15 AD?

Sojour is still rocking!

Can we go earlier? Oh yes! But alas I haven’t found an online resource to verify the days of the week for such early dates. However, I am satisfied that the internal mathematics are calculating the days of the week accurately.

Here is 426bc:

As noted above, there is no reliable way to confirm that the calculations for this date are correct, but given that Sojour is using the same calculations as used in the previous date examples, I have no reason to doubt its accuracy.

This post might not seem impressive until you consider that this Gregorian calendar is not using any operating system components for its calculations. Instead, it is using Sojour’s Time Units and Rolling Entities from first principles.

These Time Units and Rolling Entities can be used to create any calendar that you can imagine. I’m pretty certain that there is nothing like this in the software market right now and I’m only just getting started!

Why the blog post?

Firstly I wanted to show you folks that I’m still hard at work!

Secondly, I wanted to celebrate getting over the big development hump – the hard bit – the actual calculations themselves. Everything else should theoretically be a lot simpler to implement (famous last words!).

In terms of the development effort so far, I’m up to 25 code commits and 69 hours and 35 minutes of coding and testing!

Quite a lot of time has been sunk into this. But I think it will be worthwhile as it will provide Sojour with a world class leading calendar model.

There is still a long way to go as there is a lot more that I want to add to version two of the calendars system.

As with all other enhancements, this calendars update will be free of charge for all existing Sojour customers!

Thank you for your patience and have fun!

RobP

Sojour – A 2023 Retrospective!

Sojour has had a good year in 2023 with numerous enhancements added and many bugs squashed. (As an aside, all updates and enhancements are offered free of charge to all existing customers!)

Despite many new features being added, there is still a huge list of enhancements that I want to incorporate!

For those new to Sojour, the key take away from this retrospective is that nothing stands still! Sojour will continue to improve based on customer feedback and my own designs.

Here is a list of some of the major achievements and enhancements that Sojour attained in 2023:

Sojour got released!

This was a huge milestone. It’s one thing to code Sojour for personal use, but quite another to make it ready for commercial use. Over 200 hours of testing and refinement got pumped into Sojour to ensure that it would work under a much expanded use-case regime.

In addition, a manual had to be created – and subsequently re-written to avoid copyright issues – which itself took several weeks of effort. This illustrated manual currently stands at 166 pages!

At that time, everything I did was focused on getting Sojour released and I had naively assumed that once released the journey would be over and I could then re-focus work on my other project Ancient Armies. (Sojour borrowed a lot of technology from Ancient Armies)

But as it turned out, the release marked the start of a whole new journey – one that I hope many of you will join me on! If you are interested, Sojour can be bought at DriveThruRPG for a one off payment of $10USD with no DRM or servers needed.

Map Scale Assistant added!

The map registration system got a complete overhaul. It was replaced by a new wizard called the map scale assistant that allows one to directly scale their maps using the actual maps rather than a separate window.

The original blog post covering this new map scaling assistant can be read here. Please note this is an earlier version of the assistant and things have progressed!

Custom Health Bars added!

These are known as trackable characteristics and are extremely flexible. The user can create up to four health bars for each token and these can be defined in characteristic sets. This allows one to have multiple health-bar configurations in one ruleset!

The intent is to allow for more health bars in the future. The core technology already supports this. The hold up is figuring out how to make a large number of health bars a practical proposition in the user interface.

This video demonstrates an earlier version of trackable characteristics:

3D Map Tilting added!

Sojour uses a custom graphics engine called Ionian. This engine was originally written for Ancient Armies and one of its hidden secrets is that it is really a 3d engine!

I decided to take advantage of this by offering map tilting which makes many maps really shine.

In addition, there is built in functionality to allow the user to accurately align the tilt of a map so that it is in the same plane as a 2d isometric drawing – this results in an uncanny 3d effect!

Here is a video that goes through map tilting:

Fog of War added!

This was a huge piece of new functionality. It enables the user to add fog of war to any map!

The backend code is super configurable. However, only a small proportion of its functionality has been surfaced to the user interface – so expect more enhancements in the future!

There are two videos covering fog of war.

The first is for the original iteration:

Whilst the shorter follow-on video describes some enhancements made to the fog of war system as a direct result of user feedback:

File System Manager added!

This was a major piece of work that provides users with a number of useful functions for dealing with their data. These functions also include the ability to backup and restore games.

A video covering its extensive features can be viewed here:

Tutorial Videos added!

These might seem unimportant, but many users rely on these to gain an understanding on how to use Sojour and how to solo scenarios designed for multiplayer games.

Producing videos takes a lot of effort, but I think the results are worthwhile!

All the tutorial videos can be found in this You-Tube playlist. The playlist is incomplete. There are many more planned videos to come!

In addition to the Sojour tutorials, I also released a handy video describing how to solo multi-player RPGs!

Well over 300 sales!

It would be fair to say that Sojour has sold a lot more copies than I envisioned.

The reason for my low expectations is that I have done no real advertising. I was kind of hoping to make it ‘feature complete’ before really pushing it out there.

This low profile combined with the fact that the product is in a niche of a niche (a solo VTT, in a VTT market), meant that my original sales expectations were generally a lot lower.

In fact, truth be told, Sojour was never really meant to go on sale!

I originally wrote it to satisfy my own personal needs for a VTT. I had tried many of the popular ones out there and each one of them was great for multi-player gaming (their design intent), but not so good for solo play.

As Sojour developed, and I started using it, I got an inkling that many others might have a need for a solo VTT too. That’s when I decided to commercialise it.

I’d like to thank everyone that took the plunge and bought Sojour!

Not forgetting the minor enhancements!

A huge number of enhancements got added to Sojour. Here is an incomplete list of some of them:

  • Static Campaign Assets. The user can now create tokens that are part of the map – for example discovered caves.
  • Ability to create on-map custom names for multi-instanced tokens or campaign assets. For example, you could drag 4 goblins to the map and then set about giving them custom names to add more character to them.
  • Sojour’s default automatic token scaling can now be altered by the user on a per-map basis.
  • Improved map context menu. It now looks better and is much more context sensitive based on what’s been clicked.
  • Dead tokens can now be optionally hidden – or not….
  • Tokens can now be double clicked to view their associated documents.
  • Sojour’s installer got many improvements, including the ability to directly upgrade an existing installation in-place without needing to manually uninstall it first.
  • Various improvements to the journal, including the conversation system (now more flexible) and enhanced dice rollers (in fact the original version of Sojour had no dice rollers at all!)

The Failures….

No one likes to talk about failures, but every software project has its share of failures. They are an intrinsic part of the natural evolution of the software. If one doesn’t take the risks, then the software can never hope to improve in any meaningful way.

Sojour suffered from two setbacks in 2023, both of which cost a lot of development effort and ultimately lead nowhere:

Dark Mode

An attempt was made to give Sojour a dark mode. Alas, this ill fated attempt failed because the technology underpinning Sojour doesn’t really support it.

The aim is to re-write Sojour at some point in the future using a more modern technology stack, but this will only occur once the current feature pipeline reduces somewhat.

A re-write would require considerable effort and take me away from general Sojour enhancements and bug fixing – which is why I need the feature pipeline to dry up a little first!

The trials and tribulations of this doomed feature can be read in this blog post and this one.

Custom Folder System

This was to be a system to allow users to completely configure Sojour’s asset browser in any way they saw fit. It even allowed one to create custom views that could show combinations of assets.

The problem with the system is that it was complex and took too long to write and test. Alas, it got to a point where its code base was too far behind the current version of Sojour to make any kind of integration a viable possibility.

I still have the code on its own test branch, so it’s not completely dead. I will probably resurrect this feature as a simpler cut down version sometime in the future.

You can read about my initial aspirations in this blog post.

A final thanks!

Finally, I would like to personally thank each and every customer that took the punt and bought Sojour from an unknown developer. It means a lot to me and helps instil a sense of responsibility that I have to all my customers.

Customer feedback has been really good thus far. Thirteen reviews, all maxed out at 5 out of 5 stars.

One quote that makes me particularly proud is this one from DriveThru RPG:

Overall, Sojour Solo RPG VTT offers a level of functionality and ease of use that is unmatched by any other VTT platform. – David S.

It’s quotes like this that provide some feedback that we are headed in the right direction! 🙂

I hope Sojour has provided for a lot of fun and enjoyment. There is more to look forward to in the future. The version of Sojour that you have in your hands right now is only the beginning!

Have fun and here’s to hoping for a great 2024!

RobP

Sojour v1.2.50.0 minor hotfix has been released!

This is a hotfix release to address two issues and to add two minor improvements.

The big calendar v2.0 release will still happen, but it will be early in the new year.

There are four changes in this release:

RPG-369 Hot Fix – When a map is set to hide token health-bars, the cursor will no longer change nor allow you to alter these health-bars as if they were still visible.

RPG-371 Minor enhancement – Double clicking a token on a map will now directly open its associated document, if it has one. This should save having to right click a token to get its context menu displayed first.

RPG-376 Hot fix – Static campaign assets no longer appear in the initiative tracker. This was a very serious bug that got reported to me yesterday and the main driver of this hot-fix release.

RPG-377 Minor enhancement – The installer has been updated so that it will automatically replace previous earlier versions of Sojour – your data is safe. There is no longer a requirement to manually uninstall earlier versions of Sojour first! Note, this installer will not let you downgrade Sojour to an earlier version. That is something you must do manually.

The hotfix can be downloaded from your DriveThruRPG library and installed over any previous version.

That’s it for this small release. I’d like to thank all my customers for Sojour’s first year of release. A lot got added to Sojour since it released and I anticipate a whole lot more in the new year!

I wish you all a Merry Christmas and a Happy New Year.

Have Fun!

RobP

Calendar Rolling Dates – Update

It’s been a while since I have posted. This is due in part to not being able to get enough time on Sojour and also due to the size of the current task in-hand. That said, progress has been made!

I guess the first question for me to answer is ‘What are rolling dates?’

I feel that the easiest way of answering this question is to firstly explain what non-rolling dates are.

Calendars that have non-rolling dates are characterised by each month starting on the same day of the week:

A Gloranthan Calendar – with Non-Rolling Dates! (click for larger image)

The above example shows two different seasons from the Runequest Gloranthan calendar. Each season starts on a very specific day – Freezeday. This would still apply even if I was to go to a different year: Sea Season’s first day will always be Freezeday.

It’s this lack of relative motion between the days and their months that make this Gloranthan calendar a non-rolling calendar (otherwise known as a fixed calendar).

It turns out that many role playing game systems use non-rolling calendars as they are the simplest to use in terms of gameplay. Examples of games using non-rolling calendars are Runequest, Dungeons & Dragons and Traveller.

In direct contrast, the Gregorian calendar, as used in the West on Earth has months that do not start on the same day. This is the case even when looking at the same month over many years.

For example, April 2023 starts on Saturday, whilst April 2024 starts on a Monday.

These variations in the start day occur because the day of the week, Sunday to Saturday, roll independently of the month that they are in. They always form a full seven day week even when crossing monthly boundaries.

It’s this that makes the Gregorian calendar a rolling calendar.

Now, it might come as a shock to most people, but Sojour has never natively supported rolling calendars!

Some of you will be reading the above paragraph in disbelief and will be pointing to Sojour’s built in Gregorian calendar as evidence to the contrary.

However, Sojour’s Gregorian calendar is a special case. Sojour does not use its calendar system’s time-units to model the Gregorian calendar. Instead, it uses the default Gregorian calendar provided by the operating system. It then seamlessly integrates that calendar with Sojour’s user interfaces to provide the illusion of rolling date support.

The big give away is that unlike other calendars, you cannot edit it:

The Gregorian Calendar is a special case – it’s why you can’t edit it!

Much of the recent work has been centred around getting Sojour’s time-unit based system to be able to model rolling calendars like the Gregorian calendar. Enabling this will allow users to literally invent any calendar that they can imagine!

Today is a special day in that I finally cracked it! :

A Gregorian Calendar, but not as you know it! This time it is constructed and modelled with Sojour’s time-units! (Click for a bigger image!)

The above screenshot doesn’t look too significant, however it represents a huge step-up in Sojour’s calendar modelling capability. That’s because it has managed to model a rolling calendar – the Gregorian Calendar – using its own built-in editor and time-units!

The system even takes leap years into account:

A leap year!
A non leap year!

As an aside, Sojour can model leap days, weeks, months or whatever else you can imagine. For example you could easily invent a calendar that has 4 leap days that occur every 6 years 🙂

Coding the month view to support rolling calendar dates was a right royal pain. The first issue is that the 1st can occur on any day! So the 1st will invariably not start in the first cell of the month view and will tend to move around.

In addition, some months will have more, or less rows (weeks) than other months and all of this has to be calculated:

For example April has six rows of days, whereas most other months will tend to have five. The code has to be able to account for this!

Sojour’s rolling dates are really powerful. In the above Gregorian calendar it only has one set of rolling entities to drive those dates and that is a rolling entity group called ‘Days of the week’. However, I could quite easily go on to add many more rolling entity groups and map those to different time-unit levels.

In fact, you can even assign multiple rolling entities to the same level! For example, with the Gregorian calendar I could create another set of rolling entities called ‘Moon Phases’ and then assign those to the day level. The moon phases will then roll around independently of anything else as the days go by!

Sojour even allows you to associate images with your rolling entities and these will end up being visible on the calendar’s month view. In the above example we would see the different phases of the moon on each day.

The Gregorian calendar I created here is simply a proof of concept. I figured that if Sojour’s time-units could model the Gregorian calendar successfully, then in theory a user could create any calendar that they can imagine!

Whilst I have made a lot of progress, there is still a huge amount of work left and I suspect I will be on this feature for quite a while yet.

Hang on in there and have patience! Once released, Sojour will have one of the most powerful and flexible calendar systems ever released in a VTT!

Have Fun!

RobP

Back in the Saddle!

The replacement laptop has arrived as have the ordered upgrade parts. Most people don’t take apart their brand new laptops, but I do 🙂

Adding a much bigger SSD amongst other things!

With the laptop put back together and the development environment installed, we are now all green to start coding again!

The new laptop being taken through its paces!

The first coding task is to add rolling entity groups to calendars:

Rolling entity groups! (Click for bigger image)

What are these?

They are groups of any entity type that you can think of. They can be days of a week, or perhaps phases of the moon as shown above. Or anything else that you can imagine!

These groups are then attached to calendar time-unit levels. The idea being that each time-unit on that level will cycle to the next rolling entity in the rolling entity group. If the calendar is already on the last rolling entity, it will roll around back around to the first entity.

This mechanism will allow users to create custom calendars with rolling dates. It will also allow users to attach as many rolling entity groups to each level of time units as required.

For example you could set the lowest level time units to show the day of the week and the moon-phases together! Both sets of rolling entities will independently roll and display on the calendar!

I know this all sounds confusing, but it will be a very powerful feature.

Once it is done, I’ll update the custom calendars video on You-Tube to include a demonstration of this new feature. It’s much easier to demonstrate than it is to explain – honest!

That’s it for this week!

Have Fun!

RobP