it’s all about the tools you have

There comes a time in any man’s life where they have only one goal and one priority: making tools for videogames. My whole life I’ve been dreaming about making tools for videogames. When my second grade teacher asked: “Billy, what do you want to be when you grow up?” I said I wanted to make tools for videogames.

So when I got my cutscene system up and running, I asked myself: How can I make a tool to help me with this? I refactored the system to read cutscenes from a .json file, and the answer was staring right at me: I need to create a tool to *create* those .json files.

This is actually a good project. This is not an engineer over-engineering something or creating convoluted solutions for something that is barely a problem.

A game that is heavily dependent on storytelling, and that has a lot of cutscenes, needs something to make it so the process of creating cutscenes is a fast as possible. You want it so creating those .json files is not a bottleneck, you want to iterate fast, you want to visually see things faster. There is just a lot of benefits into having a tool that creates cutscenes.

What is a Cutscene Editor?

this is a cutscene editor

The first step of every old fashioned software is to figure it out in paper and paper. I decided to name the software “the wanderson film maker” – Named after my favorite movie director: Wes Anderson. It doesn’t make much sense, but who cares about the tool’s name anyway?

The requirements were simple enough: It has to read cutscenes from a .json file, and save cutscenes to a .json file. Of course, to do that, we have to settle on a .json format.

The .JSON file format

When I first wrote the first cutscene, this is what it looked like.

[
{ "action": "DIALOGUE", "actor": "thief", "value": "Scene 1: An Orc Dungeon" },
{ "action": "MOVE_X", "actor": "thief", "value": 3 },
{ "action": "DIALOGUE", "actor": "thief", "value": "A Thief enters the room (that's you)" },
{ "action": "WAIT", "value": 0.5 },
{ "action": "MOVE_X", "actor": "thief", "value": 6 },
{ "action": "MOVE_Y", "actor": "thief", "value": 2 },
{ "action": "WAIT", "value": 0.5 },
{ "action": "TURN", "actor": "thief", "value": true},
{ "action": "WAIT", "value": 0.5 },
{ "action": "TURN", "actor": "thief", "value": false},
{ "action": "WAIT", "value": 0.5 },
{ "action": "MOVE_X", "actor": "thief", "value": 9 },
{ "action": "MOVE_Y", "actor": "thief", "value": -4 },
{ "action": "WAIT", "value": 0.5 },
{ "action": "PLAY_SOUND", "value": "cash_sfx" },
{ "action": "EMOTE_WAIT_HIDE", "actor":"thief", "emote":"money", "wait":1.0}
...
]

That ended up working pretty well. Every entry, or action, will have an “action” saying… Well, what is the action, and what follows after are the parameters needed to execute the action. So, when the cutscene manager in Godot is reading the json, it will look at the action, and will look at different parameters to create the cutscene.

Of course, everything evolves and changes, but this structure mostly stayed the same through the development of the tool. The only thing that was added were fields for a cutscene name, description, and the starting position of different actors.

"description": "Passport Control Scene",
"name": "cutscene_3",
"start_positions": {
"burub": {"x": 9,"y": 3},
"gashnakh": {"x": 14,"y": 3},
"thief": {"x": 3,"y": 13}
}

The Features

“Creating Cutscenes” is not specific enough, so how to break that down into something that we can actually code to create cutscenes?

Turns out we need *a lot* of things. Here is an incomplete list:

  1. We need the good old New/Open/Save/Save As… menu
  2. An Action List – A panel that shows us all the actions in a cutscene, and allows us to add new actions to a cutscene.
  3. An Inspector – A panel that will allow us to configure every action. Inputting its different parameters.
  4. A Playback Preview. This one is not a must, but it’s pretty nice to be able to see things and it helps to catch issues early, before actually getting the cutscene into Godot.

At the bulk, that’s it. But of course, things grew a little bit out of hand.

The Action Inspector

Actions can get pretty complicated and sophisticated, this is an example of the action where multiple actors can move at the same time. Not that bad, but it is the most complicated thing that can happen in a cutscene.

The Character Manager

I have created a “Character Manager.” All that the cutscene system really needs is a name. That name will be used in Godot to map to an existing actor with all the sprites, animations, and set up. But I wanted it to be a bit nice, and added sprites so we can visualize the cutscenes in the tool 🙂

Everything is just nicer when you have pretty pictures to go along with it.

The Log

Honestly, for me, this is a must on any application. I just need to see what is happening, I want to know what is happening. And I want to be able to clearly differentiate between a log, a warning, and an error. And I would like that to be in the tool itself, not on a windows console in a separate window.

The star of the show – The Cutscene Preview

Sure, I said it’s not a must. And it isn’t. But it is, by far, the shiniest piece of the tool. It all just hits different when you can visualize the cutscene while building it.

On this cutscene preview you are able to:

  • Paint the map with movable/blocked tiles. It’s purely visual as the cutscene will ignore all that, it’s there just so I can better depict the godot scene into the tool. I just need to know where actors can and can’t move.
  • Resize the map to any size. Currently useless, as I do every map so that they are the size of the viewport, but I’m sure one day I will want maps to be bigger and have more things.
  • Play the cutscene.
  • Move to previous and next action. It can also start playing from a specific action. Being able to jump around the events are life saving as I don’t have to go through all of them every single time when creating or editing a cutscene.

Boring Programming Parts

Open, Save, and Save As…

It seemed that the best library out there to show file dialogs in C++ is this one called “nativefiledialog-extended.”

And it was surprisingly easy to setup and get it up and running. After including it on my CMake build, this is how the function to open a cutscene looks like.

void CutsceneEditorLayer::OpenCutscene() {
NFD::Guard nfdGuard; // NFD_Init() is called, and NFD_Quit() is called when it goes out of scope. Neat!
NFD::UniquePath outPath;
nfdfilteritem_t filters[] = { {"Cutscene JSON", "json"} };
if (NFD::OpenDialog(outPath, filters, 1) == NFD_OKAY) {
Cutscene loaded;
if (WANDERSON::SERIALIZER::LoadCutscene(outPath.get(), loaded)) {
m_cutscene = loaded;
m_currentFilePath = outPath.get();
m_selectedAction = -1;
m_isDirty = false;
}
}
}

The LoadCutscene() function above is what is going to do the heavy work of opening the file that, thanks to this library, is guaranteed to be a valid file, and parse the json to load it into the internal data structures.

Now what

Welp, that’s the gist of everything I wanted to talk about in terms of this tool to create cutscenes!

I am, for real, and for some weird reason, a bit passionate when it comes to making *tools* for videogames. Maybe it’s the idea of solving a problem really well that does it. Creating cutscenes by writing json files would be unbearable. And, at the same time, cutscenes have to be data-driven, otherwise it would be even more unbearable. A tool to make a cutscene solves that problem, it can spit out those files for us and it has a pretty interface to let us do it.

Maybe it’s the fact that now I don’t have to worry about creating those files, and creating a cutscene is easy, and as least time consuming as it can be. So, I can focus my time on other things. And I know that if I rewrite a cutscene it won’t be a pain to edit it or redo it.

This created an interesting problem. I can create, edit, and tweak cutscenes really fast, so now I have to actually do all of the writing, and rewriting of cutscenes. That is actually the time consuming part that there aren’t shortcuts for. But I guess I did it to myself when I said: “You don’t want creating .json files to be a bottleneck.” Because creating those .json files are certainly not the bottleneck.


vibe coding a videogame

https://gueepo.itch.io/machinist-story


The word about AI has been on the streets for quite a while now. As a professional skeptical person, and, not only that, as a professional “I hate and don’t trust technology” type of person, I had no interest on it. Until one day I get a message at work saying we have enterprise licenses to use AI Coding tools and asking who was interested in having access to it. In a few minutes over half of my team manifested interest.

So I did what any secure person would do: Give in to societal pressure and also say I’m interested. And once I have access to it, might as well try it and see what the fuzz is about, right?

I haven’t been really coding much on my free time, so didn’t really care for the productivity gains there. And I couldn’t use non-enterprise coding tools at work, so I never really got into “the perfect storm” for me to try coding with the help of AI.

I’ve seen the wonderful tales of vibe coding, and also the tales of woes, even the more experienced people in the industry seemed to all have the same thought and opinion: “It’s just a tool, and can improve your productivity if you know what you are doing.”

I have been using AI for a good amount of days now to help me, and what’s my take? You might ask. My take is that it’s just a tool, and can improve your productivity if you know what you are doing. I could sit here and sing the praises to it, but the truth is that I have been coding *almost* daily for over 10 years now, and, whether I like it or not, I have to say that I am pretty much an expert on this, and I know what I’m doing so this tool helps me greatly because I have experience on thinking exactly what I need, and planning how to do it.

I can easily detect when the AI is making things up or just using things that don’t exist, and I can easily fill in the gaps where AI doesn’t go to. Would it be the same with a Junior Developer? I’m not sure. Probably not. I’m not a Junior Developer so I can’t really be talking much about that experience, and honestly, I don’t really care much. I’m just trying to make a video game on my free time, I’m not trying to push the entire industry of programming tools forward.

All that is to say that, yes, coding with AI helped to reduce the boring parts of it, and allowed me to overcome pain points faster and easier. I feel like it’s important to say that I have one important rule: I don’t let AI edit my files, hell, I don’t even let it read it. I copy it and paste whole files and code snippets like an animal and ask questions about it. So I guess that, by definition, I’m not really vibe coding after all ):

TL:DR; I hate AI. But eventually caved in to the idea of coding with AI assistance. Yes, the productivity gains were substantial.

Anyway, what did I do?

My original goal was to work on monthly iterations and milestones. But I didn’t work on this videogame for almost 2 months. Life happens, people get busy, demotivated, travel do France, runs a marathon, things like that.

But when I got back into this, I had a laundry list of things I wanted to do:

  • Rework the cutscene system (vague)
  • Improve the enemy behavior (vague)
  • Rewrite script for the first scene and add the changes into the game.

I decided to start with the cutscenes.

Cutscenes

I was, at first, just trying to see what these AI coding tools would say and do. And it was very efficient at suggesting helper functions to create, and ways to simplify the code. Until it eventually called me out on my bullshit.

Wow! It even reads my comments and points out at things I’m unhappy with!

I had already considered doing this move, but seeing this just made me think that I *had* to do this refactor, and so I got into it. It was really just a matter of creating a function that would read a .json and calling the proper functions to queue actions based on it.

So, in 2 days or so I was able to fully do this refactor that I have been holding off for so long, and now everything is better. wow.

The best thing is that now that cutscenes are data files, I can create a separate tool to create cutscenes. Everything in game dev always boils down to having cool tools, so I would like to make a cool tool to create cutscenes for this videogame.

So, you know what next update is going to be about 🙂

On a side note, I reworked the entire first cutscene.

Enemy Behavior

There were a number of small adjustments on how the enemy behaves in this videogame. Let me just list it out.

  • When moving, it will look for a tile around the enemy, not the enemy itself. A small adjustment, but one that makes a lot of sense.
  • The enemy will look one turn into the future to decide what it should do this turn! A significant adjustment. So, if the enemy doesn’t see a good move for this turn it can think about it a little, instead of just being like “Welp, guess that’s it!”
  • Did a small tweak so now characters won’t walk on top of each other when moving. I had support for this already, just had to flip a boolean variable. Oops.
  • Added a coward behavior to the enemies. If an enemy is flagged as “Coward” it will run away from you when their health is low. Here’s some code snippets!
func IsActorInDanger(_actor) -> bool:
if _actor.actor_stats.will_retreat:
var health_ratio = float(_actor.CurrentHealth) / _actor.actor_stats.health
return health_ratio < _actor.actor_stats.health_ratio_to_retreat
return false # an actor that wont retreat is NEVER in danger.
  • I introduced the idea of speed and charge time on the game (just like in Final Fantasy Tactics) so now turns are more dynamic based on actor’s speed and it’s something that I can play around with.

What’s Next?

I think it’s time.

The ultimate goal for this part of this project is to have the first Act of the story. I want the first Act to be very good, cool, polished, beautiful, and all the nice words that I can think of. So adding the other two Acts is just a matter of writing a script, and designing cool and interesting battles.

I also want the next game to be just a matter of writing a cool story and designing cool and interesting battles. Or at least that I have very polished game system so that I can work on adding complexity and making a good videogame.

So it’s time to add the content for the entire first act of the videogame. As of today, that means adding 2 more battles, and 4 more cutscenes. Adding some music, sound effects, and possibly working on some pixel art as well.

We’ll see how it goes next time!

machinist story: a milestone

There is a new update to the machinist project! Check it out !! https://gueepo.itch.io/machinist-story


Upon “releasing” my little game project idea out in the wild, my goal shifted to having semi-frequent updates. I’m calling the first update the “iteration milestone” because the goal is to work only on quality of life improvements.

A lot of things about this videogame still suck, and I would like to address as many of those things I can before moving into actually designing more battles, writing more chapters, and making more music.

I like to think of this game in three different areas: Cutscenes, Battles, and Dialogue.

Cutscenes

Most of the work on cutscenes happens on a sheet of paper where I need to write, rewrite, and add notes on top of the game script. Translating all this into a cutscene isn’t that difficult, honestly. It just looks very ugly.

Can you believe I’m paid to code professionally?

I like to think that… This is a cutscene. A cutscene is just a bunch of scripted commands, but I hate this so much, but it works. So I probably won’t be overthinking this too much until it stops working! When that happens, I will be mad at myself for not thinking about this earlier.

Battles

The big question here, beyond quality of life, is how to make combat interesting.

Maybe if “Machinist Story” (Working Title) ever make it across the finish line, I can add traditional RPG elements to the game, like items, skills, party members, or any form of customization that changes how the battles play out. But these things are definitely not making it into this one. So, how *do* I make battles more interesting?

The first step was improving quality of life. The new update feature things such as:

  • Being able to see how far your character can move/attack while navigating through the UI;
  • Graying out options that you are not able to use anymore in this turn;
  • Showing how much damage was dealt; and
  • Being able to navigate the map when it’s your turn so you can see how far the enemies can move and attack.

A big challenge here is the AI. There’s just so many variables to account for. What’s the shortest path to the enemy? Which of the four positions around them I want to be at? How can I not obstruct my mates and let them kill the enemy too? What is the best path to get to the enemy if I can’t get to it this turn?

The good thing is that I don’t need to worry about none of that right now. So I won’t. Moving on.

Dialogue

My biggest issue with how dialogues are portrayed is that it isn’t clear who is speaking, and the dialogue boxes are ugly and always in the same place. I wanted to add names, portraits, and make the dialogues come out of the character.

I would like something more like this.

But unfortunately, I have spent way too much time on making the battle a little bit prettier, and making the cutscene code a little less ugly.

What’s Next?

Working on monthly iterations has been an interesting idea. And although I really want to add more stuff into this game, so the game has more battles, more cutscenes, more, more, more! I am faced with a sad reality: That intro cutscenes *SUCKS.*

So, the next iteration is simply working on the script, incorporating the pages of notes I have into the actual script, and, who knows, if time allows, I can start writing the script for the rest of the game, and not just Act I.

I will probably tackle some quality of life and small improvements here and there as well. And I expect to do *A LOT* of work on the cutscene system to improve it, but the overall goal here is simply to tell a better story in a better way. (:


2025 – machinist lives

ok, here we go.

I don’t even remember how to write anymore! Most of the times when I think about wanting to make videogames on the side and writing about it, I think that a good measure of progress is to evaluate myself monthly, that is, a monthly blog post. Lately, these are closer to one single blog post a year. I have reflected on the why that is enough times, publicly, and in private, and it doesn’t really matter. What matters is that I want to make a videogame, and I want to write about making a videogame.

The issue here is that I’m not really making a videogame. I like to think of this as working on what I call “the machinist project” where a videogame is one of its public apparitions. “The Machinist Project” resides mostly on a soft cover red moleskine that I have in my apartment where I write long handed short stories. Up to this day there are twenty six little stories in there, and the “videogame” I have been working on is story number thirteen. That means that when I work on a videogame, I am thinking of the possibility of making twenty five others.

As a living and breathing world, the world contained on that soft cover red moleskine goes through a bunch of shit. Ranging from Board Games Tuesdays on your local tavern, musicians getting upset because they aren’t getting the busiest spot on a friday evening on said local tavern, to a swordsman getting into combat with a demon from an alternate reality and ending up in a parallel universe, train heists and political intrigue.

The point I’m trying to make here is that this is, in a way, a real world.

What I’m trying to get at is that there are bands and musicians in this world, and I quite enjoy my time sitting down on my computer, chugging down a pack of Sapporo and staring down at MIDI tracks on garage band, reading on music theory and questioning my ability of coming up with good melodies while playing pentatonic scales on a guitar tuned to Standard C. What I’m trying to say here is that I’m trying to make music, and music is another facet of this project.

the videogame

Check it out on itch.io: https://gueepo.itch.io/machinist-story

Setting goals for yourself and failing to achieve them is a tale as old as time. Here is the first iteration of what I wanted to achieve this year.

I really like The Machinist Project and I wrote a few good chapters for it, and I’m tired of not having anything to show from it. So I want to have a demo. The demo should be the first act of the first story, and that means 2 cutscenes and 2 battles.

I do really like The Machinist Project. And those few good chapters are so good that they made it through my randomly conducted script reviews mostly intact. And I am still tired of not having anything to show from it.

I haven’t made any significant progress by November, so the idea shifted towards having anything by the end 2025. Literally anything.

That means scuffing things out, cutting this “minimum viable product” into something even more minimum, and trying to keep the “viable” part in there.

This project only needs to be a thing that can be executed, and then you watch a little cutscene, play through a little battle, and then watch another cutscene that resolves the conflict. Things can roll from there. I can upload it to itch.io, keep updating it, and making devlogs.

More importantly, I can show it to people.

“Show it to people” being such a high priority might come off as “impure,” like, what? Am I working on a project just for the sake of other people? Ew! But it’s just that it’s annoying to talk about this thing that doesn’t exist, especially when it’s been over a year. How about YOU try telling your friends you have been doing this thing for a year and then show nothing from it to anyone.

With all that in mind, I started making use of all the 30min breaks I could find throughout my day to add or fix something on the game. And I managed to get the cutscene, dialogue, and battle system into a decent state in less than 2 months. The wonders of consistently showing up to work on a project!

What I’m saying in way too many words is that I finally have a “minimum viable product,” or “proof of concept.” Just something that I am going to show a few people and ask: “Is this anything?”

It can be found on itch.io: https://gueepo.itch.io/machinist-story

What’s Next?

It has been less than 24 hours and I already have a laundry list of things to improve on it. The videogame idea seemed to be received positively, and the fact that it now exists gives a lot of mental clarity.

So, what’s next? Iterating on the script so the characters and the world are a bit more fleshed out. Tweaking the gameplay, and adding quality of life stuff before even moving into adding more content.

After that, adding more content and finishing the whole first Act of the game! That’s three more scenes, which means three more cutscenes and three more battles! (Subject to change)

And, of course, making music for the game, as well as a soundtrack EP. YES. These two are different.

Who knows how long all that will take!