Learn greetings from around the world and play rock paper scissors

Today’s deck is the Official Garbage Pail Kids Tarot.

I’m gonna be honest, I’ve never liked gross out humor… or toilet humor for that matter, while I understand why it might be fundamentally funny, I’m too grossed out for the shock to translate into laughter.

Now dudes getting hit in the dick? THAT cracks me up like you have no idea, peak comedy.

Deck’s fine, usual licensed stuff, but I do appreciate that the minor arcana have individual illustrations.

Today’s reading advisesin favor of resting and meditating for work to flow which… I did end up doing my own way (walking/strolling is meditation time for me).

So today I got back to gamedev, but the task didn’t involve coding. However, to properly explain it, I gotta give context to something else.

I’ve talked about this in the past but VA-11 Hall-A didn’t have any preparation or preproduction of any kind. Zero, we started and figured things out as we went.

While this made sense for that project at the time, the result was that when I moved onto N1RV Ann-A before leaving that project I overcompensated on the other direction. I thought about every production eventuality I might face and decided to tackle it from the word go and that caused, among other things, a situation where I spent so much time with behind-the-scenes sort of code that I didn’t really get anything done.

So one thing I’m keeping in mind while making this project is a balance between both. Being prepared and organized but not slowing progress as a result, making sure to do forward-moving code but not in a way where I’ll shoot myself on the foot later.

So the next step in the process is to refactor everything I had so far but mainly because I spent last week throwing things at the wall to figure out how the engine worked.

The analogy I use to keep myself in check is that of “organizing the table”. Imagine that you have this table in a workshop, you start a project but then realize how many pieces you’re gonna have all over the place so you take time to get containers and label all the containers. The nuts go here, the bolts go here and so on.

Do not worry about what if you find a piece of radium, but do worry about more tangible realities like small screws falling onto the ground. You get the image.

To that end I decided to start documentation where I keep tabs not just of how the code works holistically (AKA the logic of it rather than any specific code) but also important routines to keep tabs on, and the detail I want to highlight today in particular:

Naming conventions.

Here’s the thing: Even beyond it making code more legible and easier to pass onto other people, having rules on how to name files frees up a part of your brain that later on does not want to be disturbed.

Late into development is all too easy to not have the brainpower to think about names for objects and stuff so you end up naming them shit like “AMV_Youre_gonna_go_far_kid_jon_arbuckle” which is admittedly funny in the moment but then debugging time comes in and you wanna travel back in time and dunk yourself in a toilet.

Establishing rules makes it so you don’t really have to think that hard.

Also, again, legibility.

Another thing I learned in the process of “cleaning the table” was that Godot apparently already has built-in localization tools.

Let me explain.

In programming there’s Strings, String is the technical term for… text basically. If you have a button with a text that says “Continue”, the word “Continue” is saved in a string.

So let’s say you need to localize the game, “Continue” has to become “Continuar” or “次へ”, but if the string is in the code you have to find a way to make the game shift from one to the next.

In the past my solution was to basically scour the code for every random string, save it in a variable and then when the game starts, depending on your language choice something was assigned to the code.

Let’s say for the sake of this hypothetical that the code for the button goes…

I would replace that with…

The variable continue_string would be declared on startup and when you chose language it would go…

Yes, I know about switch statements, but I’m writing this assuming people with less than zero code experience are reading it and an “else if” is easier to parse in those cases.

Now, even with a switch statement, this approach has a problem: The strings are still in the code and localizers tend to not know nor be expected to know how to parse code. Not to mention they have their tools which usually involve spreadsheets.

And I was thinking about all this because while it was a long-term thing and the sort of “five steps ahead” thing I told myself I shouldn’t stress over, I figured I should at least be aware of how to push all strings into a spreadsheet or something similar.

And as it turned out, looking into CSV (comma-separated values, basically an excel spreadsheet not exclusive to excel) files led into discussion of the localizing tool built into the engine.

So long story short, this tool does automatically what I explained earlier, except that instead of one manually checking every single string you give it a list of objects and the tool goes through the code and converts the strings into IDs assigned in a standalone file.

I came in wondering if I should start assigning variables to strings since early and I came out instead realizing I should instead make sure to not put strings-as-code and strings-the-player-reads in the same object if possible.

And writing this I realized I should add a naming convention for objects with extractable text, so hey!

This is what the to-do list looks like by the end of today. None of the older tasks are finished and new tasks were added but progress was still made.

That last point was an idea I had while thinking about other elements. When you call for text in Dialogic you do it via a string anyways, so in theory if I made a room WITHOUT the object that receives the “dialog end” signal when a dialogic dialog timeline ends, and that had a text field where you feed in a timeline’s name, it’s actually relatively easy to have a built-in test tool for specific dialogs.

There’s actually not much else to talk about today. Like I said I went for a walk but even that walk was specifically for me to go through all of this inside my head before putting pen to paper.

Oh wait, the mailman came to pick up my Book Off boxes, so now I’m free of a bunch of unused electronics, yay!



Posted

in

,

by

Tags: