DevLog4: Day26.txt- Effed Around, Found Out.


Day 26.

The day that I effed around and found out.

Today, friends, is the day that I decided that I needed to make Custom Export templates for WriteIt.

The file size for WriteIt, up until this very moment, was around 60 megabytes, which, for a text editor, was far too much.

You see, it's written in Godot, which is a full-fledged Game Engine.

It contains useful things, such as a complete 3d engine, a physics system (two or three, actually!), and all kinds of audio-visual support.

A text editor has little to no use of these things.

Luckily, being open source, Godot allows for customized builds, which for the layperson means that I can decide which parts to throw out, and which juicy bits get to stay in.

In our case, almost everything can go.

There's a useful web-tool here that tells you exactly which of these bits do what.

I set off turning off nearly everything.

After that, it was just a matter of compiling the export templates, which is to say, waiting, and then setting them up as Custom Export Templates in the export manager and-!

WriteIt crashed immediately on opening.

Well, damn.

***

I looked at the file size as well, it was nearly 300 megabytes, which means my file decreased by -400%.

Hmm.

After some quick research (which, to the layperson means that I actually read the documentation this time) I discovered that I needed to erase some debug headers from the file. Easy enough, the nearly 300mb export template went down to a breezy 25 megabytes.

But WriteIt still didn't load.

I'll tell you what happened, and how to prevent something like this from happening to you or your loved ones, but first I want to make *absolutely* clear that I did, in fact, spend about 5 of my real life hours messing with settings and redownloading and recompiling source codeboth of the export templates and Godot itself.

I do not recommend blindly recompiling code over and over and over again, as it's something less akin to a state of zen, and more akin to a state of headless panic.

The solution was, as it always is, right in front of me the entire time.

When running WriteIt in a terminal (which I promise that I had done) it informed me that the program wasn't loading the resources of the main scene, or the terminal theme.

That's all well and good, and I assumed that something was broken in the packaging of the export.

And, while it was true that the resources weren't loading, the actual cause of the problem was that somewhere along the line, in my casual and carefree erasure of bits and bobs and doohickeys, one of the bits was responsible for loading vector graphics, which I had only just added to the project.

So the lesson is this, kids: Carefully, CAREFULLY read ALL of the error messages.

It informed me (FIRST THING) that the vector image couldn't load. This meant that the theme wouldn't load, which meant that the main scene wouldn't load, which meant that WriteIt wouldn't load. No scene, no SceneTree, no nothing. Just a beautiful ball of fire and void.

Reader, I deleted those Vectors. I deleted them twice in one night.

***

Now, I'm typing on a new, svelte export of WriteIt, weighing in at right around 35 mb, (12, zipped!), which puts it at half of the original file size.

Is it true that other text editors are even smaller? Yes, but it is also true that the ones that I've seen on itch weigh in at at least twice this.

So do I think it was worth the effort? Yes, I do.

Do I recommend jumping into the sea of Custom Export Templates without heeding these warnings, or a wary sense of concern and a careful attitude?

No I do not.

But now, I can cross "Custom Export Templates" off of my To-Do list, and WriteIt is one step closer to a public release.

But for now, it is time for bed.

Zzz.

Get WriteIt!

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.