Cross-Platform Writer Progress

Earlier this year, I mentioned I was doing a rewrite/port of my custom writing software in order to support it on Linux. If you haven’t read about that, I recommend doing that first.

Anyway, my Avalonia UI port is going very well, and it’s now mostly usable on both Windows and Linux Mint. Its source is available on GitHub at https://github.com/TjMott/TjMott.Writer/tree/avalonia.

You may recall I wasn’t sure what to do about my document format and rich text editor. Previously, it was based on Microsoft’s FlowDocument, and nothing outside of .NET on Windows supported that. My choices were to wait for the Avalonia team to come around to supporting FlowDocument, or migrate to another document format, one that was not limited to Windows.

So I migrated to another document format. For the rich text editor, I selected Quill, which is a browser-based JavaScript editor. To me, this was a very weird choice, especially since my application is not web-based and I generally hate web-based software. So I needed to embed a web browser. I used the Chromium Embedded Framework (CEF) along with an Avalonia-compatible .NET binding for it called CefNet, and as weird as this is, it works well and its cross-platform. It’s also pretty seamless. You’d have no idea you’re interacting with a web browser!

Quill uses its own document format called Delta, which is really just JSON. JSON is text-based so it stores just as well as the old XML-based FlowDocument in my editor’s SQLite save file. I have a barebones custom converter that converts FlowDocument to Delta. Right now it handles about 95% of my data, and I’ll fix the remaining when I find it. If there are other users of this software, there’s a good chance the importer will miss stuff when you run it, because you are probably using document features I’m not using (lists, certain types of formatting, etc.) I’ll handle these as I become aware of them, but it’s a good idea to keep a backup of your old WPF-based works database so that data is not lost.

I am a big advocate of digital privacy. This new version of the app will NOT load Quill or its resources from the Internet. They will be loaded from offline HTML/JS files packaged with the application. I also cut out as much tracking/telemetry as possible from CEF. Originally, the embedded web browser submitted all kinds of stuff to Google which was ridiculous for a private offline application. I think I got 99.9% of all that shut off or blocked. There may be a couple minor cases left but I haven’t run into them yet. Ultimately, this means the app does not require an Internet connection and nothing within my app is scanning/tracking your data or providing it to outsiders.

No Official Mac Support, Sorry!

I mentioned before that this app would run on Mac once I finish porting to the new toolkit. Unfortunately, now that I’ve done most of the work this will not quite be true. The problem is cost/resources. It is free to develop for Windows and Linux, but Apple expects you to have Apple hardware (which I don’t have), a paid Apple developer account (which I don’t have), and a code-signing certificate (which I don’t have, because they are quite expensive and difficult to get as an individual and not a company).

That said, my codebase should be very, very close to working on Mac. I just can’t test it or officially support/release it. It’s very likely the branch will work if you were to compile it yourself and make a few tweaks to the CefNet startup code. I somewhat dislike the open source mentality of “It’s open source, so just fix the code yourself!” but I have to take that position on this issue. But I will gladly accept pull requests if someone wants to finish Mac support and figure out how to properly distribute it.

You Can Now Print!

I never even considered printing support in the old WPF-based app. But using CefNet, I almost got printing for free. I just call a Print() function on the embedded webview, and the built-in browser prints for me! All I had to do was write up some print CSS for the Quill editor page to clean it up a bit.

Combining Document Formats

The old WPF-based version had two document formats: FlowDocument which was used for manuscript text, and MarkdownDocument which was used for notes and tickets. I was never quite comfortable with that, but FlowDocument was missing features I found useful for notes, and Markdown was very inadequate for a rich text document.

The new Avalonia-based version, however, only uses one document format based on Quill delta. This simplifies things, and avoids mental context-switching when a different document has a totally different UI and set of features. Now, it’s all the same!

Losing Some Features

I am trimming the fat, so to speak, as part of this port. A couple features I never really used are going away.

File Browser

The old File Browser feature allowed you to embed entire files within the works database. I intended this to store cover art, completed manuscripts, and so on, so it’s all packaged up in the works database and you only have to backup/store one file to have everything. However, I never used this feature for anything except storing one Word template file, so I simply canned this feature. So when you update, make sure to pull any important files out of the File Browser first, because they will be nuked as part of the database upgrade.

Ticket Tracker

As a software engineer, my concept of ticket tracking is heavily influenced by Redmine/Trac/Jira/Bugzilla/etc, and my ticket tracker reflected that. But it was actually way too heavyweight, and so I am removing it. All tickets and ticket history will be lost as part of the database upgrade to the new version.

What’s Left?

I have a ton of small tweaks and fixes to work on, but it’s mostly usable at this point. (Export to Word is very much still a work in progress.) I have not created a release yet, but that should happen in the upcoming weeks. In the meantime, the avalonia branch is buildable and usable to anyone who wants to build it in Visual Studio. Check it out here: https://github.com/TjMott/TjMott.Writer/tree/avalonia

Well, that’s all I have for now. Thanks for reading!

Rescue at Waverly is now on Audible!

I am happy to announce that my first novel, Rescue at Waverly, is now available as an audiobook through Audible! This is my first ever audiobook, and is narrated and produced by myself.

Head over to Amazon.com to purchase it: https://www.amazon.com/dp/B0B6PZ7LN6. I understand it’s supposed to be available on iTunes as well, but since I am not an Apple/iTunes user I can’t confirm this.

2022 Update: Audiobooks, Book 4 Progress, and Writer Updates

Hello readers! Been a while since I’ve posted, so here’s an update on how things are going.

Coming Soon: Audiobooks Through Audible

I’m joining Audible! This means my collection will eventually be available in audiobook format, narrated by myself. Rescue at Waverly is fully narrated and uploaded to Audible, and I’m waiting for some beta listener feedback before I click the publish button. It’s around 8 hours in length. In addition, I have about a third of Rebellion at Ailon recorded, but it (as well as most later titles) will be around 15 hours in length so I’m going to wait on feedback for Waverly before I do too much work on these.

Here I am, recording in my home studio.

Progress Update on Mercenary Ascent

To put it bluntly, I am way, way behind on my fourth novel, Mercenary Ascent. My existing manuscript had become a disorganized collection of short stories, and it wasn’t driving forward the story I need to tell. As a result, I’m doing a “do-over” of it. I came up with a new outline, I’m copying in old things from the manuscript that are still usable, and I’m trying to create a more focused, driven story.

One hard part is I’m dealing with a large amount of general burnout in almost everything, and it’s been difficult to find motivation to work on this project. I finally found an environment where I can be productive (sitting outside at one of my city’s lakes) but the “spring” weather has been so terrible (cold, rainy, and sometimes snowy) that that hasn’t been much of an option. I hope I can make significant progress this summer. As an aside, I know I’m not the only person dealing with burnout these days, and I’m finding just how important it is to change up your environment and surroundings in order to make yourself productive again.

My Writer Application Is Coming To Linux And Mac, Finally!

Lastly, I am finally taking efforts to make my writer application cross-platform, because I am primarily a Linux Mint user and I’d like this to work on that OS. Currently, it is Windows-only because it uses the Windows Presentation Foundation (WPF) as the UI toolkit. I have a branch in git where I am porting the project over to .NET 6 and a UI framework called Avalonia UI, which is supported on Windows, Linux, and Mac.

Avalonia is extremely similar to WPF (still uses XAML and databinding, and the syntax is around 90% compatible), so most of my existing code is porting over with only minor changes. Performance has improved a lot, too! I really don’t know what the state of WPF/.NET on Windows is these days, but it seems to have some significant performance issues. Mostly the mouse hitches around a lot, there’s stuttering and microfreezes, and sometimes lost keystrokes. I thought it was a problem with my application, but I’ve noticed all WPF applications (including some versions of Microsoft Visual Studio) act this way on my Windows 10 machine, so there’s a deeper issue there.

Avalonia does not have that stuttering at all. So even if I didn’t care about cross-platform support, it would be worth the switch just to fix the performance issues and reduce frustration. In any case, it’ll help me migrate more fully into Linux as my primary OS, and in theory the application will also work on Macs although I will not be able to test or officially support Apple. Officially, this app will be supported on Windows 10 and Linux Mint. Unofficially, it should run on anything that supports .NET 6.0.

There is one big problem with Avalonia, however: it doesn’t have an implementation of FlowDocument or a rich text editor. My documents are completely based upon the FlowDocument type, so that part is still Windows-only. There are tickets and chatter on Avalonia’s GitHub page regarding this issue, so I believe they’ll have a solution eventually. So, my plan is to port as much of my application over to Avalonia as possible, which should be pretty much everything except the actual document editor. At that point I’ll have to re-evaluate things. Maybe by then Avalonia will have a rich text editor, and then the final porting will be easy.

There are other options, none of which I’m too enthused about. I could migrate my data to some other format and do something weird like embed a GTK or Qt rich text view into the app. I did look into AvaloniaEdit because a lot of people recommend it, and while it’s a cool project, it’s meant for coding and not document creation. It would take some significant hacking to make it fit my purposes, but I haven’t ruled it out yet. Lastly, I could do something completely custom, which I really don’t want to do. This app was only possible because the FlowDocument/RichTextEditor in WPF did all the document editing for me, allowing me to focus development efforts on all the supporting features outside of the document editor.

An early build of TJ Mott’s Writer running on Linux Mint. Progress!

Anyways, that’s all I have to share at the moment. Thanks for reading!

TJ Mott’s Writer – Video Overview

Hello, readers. If you’ve been following this blog, you know I released my custom software for writers as free and open source. I’m going to start a video tutorial series to cover some of the basics and help you get started. I just finished uploading the first video, which is a brief overview of the application’s features. Take a look here. (Also, it’s up to version 0.2.1.)

I don’t have much more to say right now. I’m still slowly making progress on my fourth science fiction novel, “Mercenary Ascent.” I’m also doing some work on a fantasy novel, but I’m not prepared to share much about it yet except that it involves black magic and grenade launchers. I came up with the premise while sick with a fever, reading some C.S. Lewis, and playing Quake: Champions…

TJ Mott’s Writer – Version 0.1.0 Release

Hello everyone,

Today I created the first public release of my own word processor, writing/publishing tool. This is a beta release, version 0.1.0, but I am currently able to use it for my writing tasks. This is a free, open-source application for Windows, and you can find out more here or download the installer at the project’s GitHub page. Here’s a direct link for the version 0.1.0 installer.

The actual word processing side is fairly basic since my needs are pretty simple. It’s based on Microsoft’s FlowDocument model, and I hooked up a few basic editing/formatting controls in the Ribbon at the top (half of them may not work since I don’t really use them…FYI). Nothing special to it; I mostly followed the online WPF RichTextBox samples and kept it pretty basic. Word has a billion times more features. Anyway, it does what I need, and it has the capability to export to a Word document which is what you’d submit when publishing. Here’s a screenshot from the opening scene of Rescue at Waverly:

But for me, the real power in this application is the way it organizes information, allowing you to easily move sections/chapters around without risk of copy-paste errors, as well as the Markdown document system used for creating notes and reference material. Here’s the main view, with some components partially expanded:

Some of the notes I’ve started to compile. Most of my notes are still kept in a personal Redmine website, but my plan is to host all these features within this application itself:

There’s a ticket tracker and file browser, but mine are currently empty so I have no meaningful screenshots to show. However, I’m using SQLite’s full-text search to search everything: titles, contents, notes, tickets, etc. Here’s a slightly-redacted screenshot of that:

And that’s really all I have to show for now. It’s free for download and use, so if you’re interested, go ahead and install it. If you find any issues, let me know.

Thanks,

TJ Mott

2020 Update – Promotions, Next Book, And Some Open-Source Software

Hi readers,

I just realized how long it’s been since I’ve made a blog entry. 2020 has obviously been a very crazy year and time really got away from me. I’m still quietly plugging away at things, so here’s an update on what I’ve been up to. In summary, I’m running a sale, been working on my fourth novel, wanted to share some cool new artwork from my artist, and I’ll be releasing my custom word processor as an open-source application sometime this year. Keep reading for the details!

On Sale!

I’m currently running promotions on the Kindle ebook versions of all my works. My first novel and two short stories are currently free, and the sequel novels are discounted to $0.99. If you’ve missed any of my works, now is a good time to head over to my Amazon author page and buy them! And if you have any science fiction-reading friends, please share and help me get news of this sale out there!

These items are free August 7 – 11:

And these items are discounted to $0.99 August 7 – 14:

As always, these are enrolled in Kindle Unlimited, so if you’re a Kindle Unlimited subscriber you can already read these for free.

Mercenary Ascent

I had hoped to have book 4 of my series, Mercenary Ascent, finished and released by now, however the COVID-19 shutdown has really affected my productivity in a bad way. My draft is roughly 50 – 60% complete at 78,000 words. There’s a lot going on and I’m aiming for a more epic plotline — the second half of the Thaddeus Marcell Chronicles will be quite different from the first half. My artist, the talented David Johnson, sent me its cover art several months ago. More of my main characters now have faces. Can you identify them?

Mercenary Ascent front cover

You’ve certainly heard a few mentions of the Norma Empire in the first three books, although it was not a featured setting. However, it’ll be front-and-center for the final three books. David created a new back cover for the second half of the series, and I’m really impressed with how it turned out. This is the Imperial Citadel on Norma, the Emperor’s palace and the seat of government for the Empire. Enough said for now, I don’t want to spoil anything and you’ll just have to wait and read!

TJ Mott’s Writer

In a previous blog post, I showed off my custom word processor. It worked for me, but it was rather hacked-together, inconsistent in design, and the internal code was frankly quite embarrassing. I’ve been working on a new version with new features, a more consistent UI, and less-embarrassing code, and I plan to release this version as a free and open-source application (licensed under the 3-clause BSD license).

Besides basic word processing capabilities, this version includes full-text search, file containers, Word document template management, an integrated wiki-like repository using Markdown to store notes and plans, and a basic ticket tracker to help you prioritize your writing and editing tasks. Behind the scenes, it uses SQLite to store all its data which is much faster and more efficient than the XML file used in the older one. The XML file for my works was becoming quite large and unwieldy, causing performance problems since the entire file needed to be re-written to disk any time something changed. Plus the switch to a relational database allows me to add a lot more features and data where XML just wouldn’t have been an appropriate format for storage.

This new version runs on .NET Core 3.1. In theory, .NET Core is cross-platform and will work on Linux and MacOS, however the GUI is still based on WPF which is Windows-only. I followed a few guides to get .NET Core/WPF applications running on Linux via Wine, but they have not worked for me. I’ve considered switching the GUI framework to something like Qt to get this running on Linux (I’m more of a Linux user than a Windows user), however I rely heavily on the WPF FlowDocument type and I really don’t feel like porting all my work to something else at this time. No promises on whether I’ll ever achieve cross-platform support, but migrating from the .NET Framework to .NET Core is a step in the right direction.

The source code is available here: https://github.com/TjMott/TjMott.Writer. Please note this is in a prerelease state and is not terribly useful yet! Use at your own risk.

I’ve creatively titled this application “TJ Mott’s Writer”. This is a tool I’ve developed for my own use according to my own needs, but I hope someone in the writing community finds it useful. Stay tuned for more information.

Thanks for reading,
TJ

Surprise Release! Two Short Stories!

Good morning readers, today I just released two short stories that function as prequels to the Thaddeus Marcell Chronicles. Early last week, Amazon emailed me about the Pen To Publish 2019 contest for short stories. I’ve always had some ideas on how to go back before Rescue at Waverly, but there’s just not enough there to fill out an entire novel. But short stories less than 10,000 words? That’s the perfect opportunity to examine some of the backstory of my two main characters!

So here they are, available on Amazon in ebook form for $0.99 each. If you ever wanted to see a young, naïve Thaddeus Marcell, or wondered how Amanda Poulsen became so angry and toughened, here you go.

Thaddeus Marcell: The Terran Engineer

Amanda Poulsen: The Hyberian Raider

I don’t plan to publish these as standalone paperbacks because they’re way too short for that. But I will add “The Terran Engineer” as a bonus section to the paperback edition of “Mercenary Ascent” and “The Hyberian Raider” to “Mercenary Justice,” so if you’re a paperback-only reader, you’ll have to be patient.

Enjoy!

On Having An Unlikable Character

The first three novels in The Thaddeus Marcell Chronicles are finished, available on Amazon in Kindle and paperback formats. I’m making progress on the fourth entry, Mercenary Ascent, and thought I’d do a little mid-series analysis. Don’t worry, there are no serious spoilers here, though I do vaguely outline the future direction of the series.

Is Thad An Unlikable Main Character?

There’s one piece of criticism that I consistently receive on my first novel, Rescue at Waverly. Main character Thaddeus Marcell is an unlikable character.

I don’t let reader criticism work me up too much. Sometimes it’s valid, sometimes it isn’t, and I don’t set out to confront negative readers. But whenever I hear this one, my initial thought is, “Well, yeah, that’s the point! In that novel, Thad Marcell is supposed to be an unlikable character! Morally-speaking, the series starts with Thad at his lowest point.”

Making him unlikable was unexpected to some readers. And the book’s ending is also a bit sour, but I still think it was necessary for the overall story arc. However, when I hear that some readers never advance beyond the first book for these reasons, it tells me my execution could have been better. They see who Thad Marcell is at this early stage, and they think the rest of the series will be the same. If you don’t like the main character, why would you read the sequels? Maybe the first novel doesn’t adequately answer that question. I tried to address that by including a preview of Rebellion at Ailon, but was that enough?

In hindsight, I’d say my approach to Rescue at Waverly was experimental with mixed results. But it was also my first novel, and a writer’s first novel almost always stands out as different.

A New Beginning, Not a Baseline

Book 1 is just the starting point. It’s not meant to set the norms for its sequels, it’s there to bring about significant change. It establishes who Thad was, then it violently shakes him up and changes his status quo. He begins to change, and by the end of the series he’s a very different character. His plotline over these six books is more-or-less about redemption. If not redemption, at least transformation.

So it’s my intention for the reader to feel somewhat conflicted by him, at least during the first two books. There’s both good and bad in him. There’s satisfaction at seeing him change his ways and become a better person. But I also don’t let him get away with his old evils because that feels unjust, so there’s a thread of tragedy as a result of things he’s done–the worst of which occurs in the second book, Rebellion at Ailon. Yes, he’s changing into a better person, but his past will always haunt him.

A Sequence of Themes

If I intentionally started my hero as an unlikable character, where does he end? I think literary critics (and especially teachers) put way too much emphasis on themes in fiction and often read things the author never intended. I hesitate to go there because I’m just trying to write something entertaining and I don’t really have any serious theme or purpose to this. But if I look hard enough, I can see some themes in this series, and as the writer I guess I have final say in that matter.

This six-book arc can be broken up into three sections, each with two books that have a common theme. I think I can describe this without serious spoilers.

Books 1 and 2: Self-Awareness and Introspection

In the first two books, Rescue at Waverly and Rebellion at Ailon, Thad finally realizes that he cannot continue operating as he does. He must change his ways, and as the writer I’m incredibly hard on him to force this change. As a result, there really are no strong antagonists here because it’s all about inner conflict. Sure, he faces a variety of enemies, but the important thing is that Thad must overcome himself.

These two books are by far the most tragic in the series. But there’s some light in that you clearly see the beginnings of Thad’s transformation during the second book. The first book might make you hate him, but hopefully the second book makes you feel for him.

Books 3 and 4: Changes and Growth

In the second section, The Prince’s Revenge and Mercenary Ascent, Thad is clearly changing. His goals are different. His priorities are different. The way he runs his mercenary company is different. And there are lines he refuses to cross now. Many of his men have backgrounds as outlaws, pirates, and other nefarious types, and they’re starting to worry because their boss isn’t really one of them anymore!

There’s less introspection and inner conflict at this point. There’s no need for it anymore. Thad is overcoming himself, so I let the conflict turn outward. Now he faces powerful external antagonists, which is a stark contrast to the sequence of mishaps in the first novel and the mostly-faceless Avennian overlords of the second novel.

Books 5 and 6: A Hero with Honor and Integrity

Thad’s transformation is completed in the third section, Mercenary Justice and Conspiracy at Earth. I can’t say much about these two novels yet, not without spoiling the plotline, but at this point Thad is a very different person. If the Rescue at Waverly-era Thad is unstable, self-obsessed, and unlikable, willing to run over anyone or anything that gets between himself and his own selfish goals, the Conspiracy at Earth-era Thad is strong, reliable, and wields his power to do what’s right and help others. They’re practically two different characters!

As you can guess from Book 6’s title, this one involves finding Earth. Had the Rescue at Waverly-era Thad found Earth, it would have ended in disaster. He was too selfish and too much of a loose cannon. But the Conspiracy at Earth-era Thad is able to deal with the situation honorably. It just took six books to change him into the right person for that!

Lessons Learned: So What About Future Series?

The readers who quit after the first novel have a valid point about Thad Marcell being an unlikable main character. That was the story I came up with, and that was the story I wrote, and I don’t think I could have done it any differently without invalidating the entire series. But it’s an experiment I do not plan to repeat. The sequel series to The Thaddeus Marcell Chronicles, titled Secrets of Earth, is more straightforward. It follows a new main character on a wild adventure that serves to tie up loose ends I just wasn’t able to solve in the first series. I expect it to stand fairly well on its own, though a few details will be clearer if you also read the first series.

This time, I don’t expect the reader to feel as conflicted about the main character. He’s one of Thad Marcell’s sons, and he’s unambiguously a good guy, free of the dark past and baggage that weighs down his father. So despite the tragedies and battles in this story, it’s far easier to feel sympathetic towards the main characters and the tone is usually more lighthearted.

Conclusion

I guess my point is that if you read Rescue at Waverly and thought Thad Marcell was an unlikable, unredeemable character, this was intentional. Yes, the first two books are dark, but it gets better if you’re willing to keep reading. And if you don’t like The Thaddeus Marcell Chronicles, maybe you’ll like the upcoming Secrets of Earth because the tone and approach are very different.

And if not, that’s okay. As with any writer, my work isn’t for everyone. I write the story I want to write. Some people will like it and some will not. That decision rests with the reader, not me.

The Prince’s Revenge released!

The third novel in the Thaddeus Marcell Chronicles, The Prince’s Revenge, has been released in Kindle ebook and paperback editions! This entry brings back an old enemy, High Prince Saar, the absolute leader of the Tor Regency who, many years ago, hired Thad Marcell to protect his empire during the Tor-Dravon War. At the end of that war, Saar made a costly mistake, one that cost the lives of millions, and one that he blames Marcell for. Now, no price is too high and no collateral damage too great in Saar’s quest for vengeance, and Thad and his Organization must stop him before it’s too late.

The Prince’s Revenge Purchase Links

The Prince’s Revenge on Amazon.com – $2.99 Ebook and free for Kindle Unlimited

The Prince’s Revenge on Amazon.com – $11.99 paperback edition

The Prince's Revenge cover art

Closing in on “The Prince’s Revenge”

I just received my first paperback proof copy of the third entry in the Thaddeus Marcell Chronicles, The Prince’s Revenge. I need to do one final readthrough and editing pass (and fix up one short subplot that I think really falls flat on its face in its current form), and then I’ll finally release the Kindle ebook and paperback editions for sale over on Amazon.com.

It’s a big book–nearly 500 pages! Unfortunately, I need to raise the price of the paperback edition compared to previous entries due to printing costs. It will most likely cost $11.99. The Kindle ebook edition will be $2.99 just like the previous stories.