Reverse Engineering a Gameboy Advance Game: And so? What did we get? — Final Part

This post is part of a series entitled Reverse Engineering a Gameboy Advance Game. Read the introduction here. Read the previous post here.

Specifically for this last part, it isn’t necessary to have read the previous ones — but I strongly recommend it because they are top-notch.

Fan art do Klonao feita pelo Ian Dimas

And so, we finally arrived at our last post in this long series. It’s hard to believe that, finally, I’m writing the closing chapter about this project that I started at the end of 2017, and only now, at the beginning of 2020, I’m closing it.

It’s even strange to write it because many things changed in my life, but I kept firm, developing in the same codebase of a purely personal project and even documenting it here. And it took more than one year.

Hey! My last post is 100% opinionated.

In this last post, I’ll speak about the technical lessons, but mainly about soft skills, because I think it’s something we should consider more. It’s not enough just to know how to deal with computers, but it’s also necessary to learn how to deal with yourself!
So I’ll start speaking about soft skills, beginning with the “time” aspect. ️️⌛️

Throughout this project, many people asked me how long I’d been developing it, and they were surprised with my answer. After all, I said it was since the end of last year.
This surprise is expected because klo-gba.js is a personal project. I don’t have any obligation to focus on it for a long time, so I could just stop at any time — and let’s agree, that’s how a majority of personal projects end.
And it’s precisely because a personal project doesn’t naturally have an obligation that we should create one! External goals are a good way, and deadlines are important because they make abandoning the project more difficult.
With this mindset and after testing a couple of project ideas, I noted that klo-gba.js was the most viable. So I signed up for some conferences to present this project and talk about reverse engineering.
At that time, I was far from having the first alpha running, but I’d managed to create the desired responsibility (“I need to have something breathtaking to present at the conference!”). Since I can’t change the conference date, it’s an external deadline, which created a sense of obligation and responsibility with something that I proposed to myself.

It’s one of the main reasons that I lecture in conferences: to create external goals. It motivates me to keep the ball rolling.
I know that I become very nervous and anxious when I’m going to talk at a conference, and even more when it will be to hundreds of people and being recorded. I spent weeks thinking about the big day, and how if it wasn’t at the quality that I craved, I would be disappointed and brooding over the awful experience. For that reason I know I will dedicate day and night to my personal project to present the best quality I can.
Knowing yourself is fundamental, and knowing that aspect of myself I can use it to my advantage. I know that presenting a talk is something that motivates me a lot to study; that same motivation won’t necessarily apply to you, so you should also look for something that motivates you to study! I took a while to get to know that aspect of myself, and I know that there’s still more to discover to get more out of my own characteristics.

The necessity of presenting in conferences forced me to focus on only one personal project, which in itself is already excellent. And added to that it also created the need to rehearse in meetups as practice, that is, I created cadences.
It’s essential to keep small, continuous deliveries, to have a notion of progress and a sense of reward. I continually released new versions of klo-gba.js to the Klonoa community, and thus obtained feedback from users, who commented, made videos, etc. That is motivating. Another fundamental aspect is to have a clear objective in mind, because only then you’ll be aware of what you can measure as progress. Since the beginning of klo-gba.js I had a clear objective in mind: I want to stretch this bridge. With this clear objective in mind I was able to measure how far I was progressing.

Okay… and exactly why did I choose to focus on reverse engineering a Gameboy Advance game? Simple: it’s a lot of fun! “Reverse engineering” is something that doesn’t apply in my day-to-day work, since in the end, I’m just a developer! I’m not a hacker who works for the KGB.
I really believe that, ideally, during work hours we should focus on studying topics related to work. In personal hours, we should focus on studying different things than what is applicable to work. That helps us to have better ideas for thinking outside the box and, eventually, for being able to change careers to one that we feel better about.

Wrapping a game into a heavy subject like reverse engineering makes the subject more palatable to work on and present in a talk (which, as I said, helps me study and create focus).
Adding to that, I like Klonoa. And there was nothing about reverse engineering using his games. Choosing it added more flavor since it was something unprecedented and more challenging. It’s not fun to make one more thing that already existed, such as yet another level editor for the Pokémon games.
In 2018 I spent day and night studying compilers. As a related project, I made a compiler that involved the online game Ragnarok. If you were born in the 90s, you probably played Ragnarok Online. Talking about compilers involving a nostalgic game like this one helps to make the subject more engaging and less boring. I’m sure that it helped me be selected to present at The Conf 2018 (watch the talk here 📽).

Did you note that I made a compiler project in the last year, and in this one, I did a project to edit levels? Because, like I already said, knowing yourself is fundamental. I found that I’m a guy who likes to create projects, create products, hands-on, and see something working and a user using. Just reading theories and more theories about compilers or reverse engineering is too boring for me. So learning on demand while I’m developing a project from beginning to end is the way that I found that works better for me.
I needed to spend much time reading books and benefitting too little to finally find out that I can work better doing projects. I know other guys who prefer other approaches, but this one is the best for me. The main point is to know what is best for you, so it’s necessary to test many ways.

Hey, and you also noted that both projects took ~1 year each? That was how long it took to have something cool enough to show to other people — and with a good depth of content to communicate with people at all seniority levels. It’s very challenging to convey interesting content in the same talk to junior, mid and senior levels. All these audiences are equally important and should be reached.

Okay, and why am I writing this manual that you are reading?
Because something that bothers me a lot is when I see someone just studying, studying, and never producing anything or having it as a goal! It’s useless just to study and never build something with that learning! You’ll only take that knowledge to the grave. So it’s important to do something. No matter the approach: it could be a video, blog, library, talk, meetup, podcast… what matters is to build something for other people. Strive to study until you can build something sleek enough to share.
Besides helping me review the subject and learn more, writing these posts is a way to contribute to the community — and to make the wheel spin.

Okay, let’s talk about the hard skills learned 🧱

Interestingly, this project involved many subjects, from using a little of a virtual machine to run No$GBA and IDA, as well as developing using WebAssembly, Canvas, WebGL, ARMv8, JS, React Hooks, monorepo architecture…

Although I think it unlikely that someday on my job I’ll need to develop using, let’s say, ARMv8, just the fact that I already know a little more about how it works helps me to have a broader view of computing itself.
Other aspects, such as WebGL and Canvas, are more likely that I’ll use on my job someday. So, since I already studied and applied them in a personal project, I anticipated an eventual job necessity.
And React Hooks and monorepo architecture are technologies that I got to study and apply a lot while developing klo-gba.js — and that helped me a lot when I needed to use them in real projects that I worked on for my job.

Using React Hooks as an example: when I started developing klo-gba.js’s frontend, the hooks had been released shortly before. Until then I’d never have used it, and it was new for everyone. With klo-gba.js I was able to test the hooks, explore their limits and uses, avoiding just doing a “Hello World”. Then, when I finally had an opportunity to use it on my job, I was already well prepared.
A nice instance is that after many hours suffering with hooks on klo-gba.js, I noticed that there really is no way for a functional component to hold a ref, and creating a class component was needed. Now that I already know it, I won’t need to spend time on this at work.
I still haven’t used WebAssembly professionally, but knowing that it’s growing and growing, I think that it’ll happen soon.

Beginning to use WebAssembly (or any other new technology) in a professional project is something that creates some insecurity. So being able to test it in a safe place, such as a personal project; is the ideal.
Eventually, some of the experiences may be useful professionally. Again: eventually, it may happen.
If you do not drive your personal project looking for what you could apply to your job, you’ll have more freedom to test different subjects. I picked many of these technologies because it’s fun to test new things. I was never driven by thinking about what I would be likely to use in my job. What matters is the path of developing and learning new random things, and not the purpose of what they can provide me in the unlikely future.
For instance, I really don’t know how No$GBA could be useful someday in my job, and it probably never will be, and I don’t care.

This approach helps me to study and improve my hard skills, and I’m sure that it could help you too: think less about the goal when deciding which technologies you want to study; and start to focus on enjoying the process, getting a taste of trying something new and studying it just because it’s fun.

Another important subject is the freedom in the roadmap. That one experience that I had suffering with Canvas and afterwards applying WebGL and confirming WebGL has better performance was interesting. I don’t know if I would have all this freedom to optimize what I would like to optimize in a project where I had to answer different customer requests. Also, I had a lot of freedom to make risky decisions, some of which later proved bad — and it was important to see they are bad and why!

That freedom is only possible in a purely personal project like klo-gba.js. It’s one reason why I always like to have a personal project, and I recommend everyone having one too, in order to also have this freedom in the roadmap.

Closing this long story with this music from Klonoa 😋

Thank you very much for reading to this point! If you could write a comment, I’ll be thrilled. You can write about what you think about this project, about these posts, how it helped you…

If you want to check out other my personal projects, see this compiler written in Elixir and my GitHub profile. You can also watch the lectures about klo-gba.js; it’s a different experience seeing these talks compared to reading these posts.

Oh, and follow me on Twitter! 🐦
Sometimes I write tweets about my personal projects as well as other subjects about computing.

See you later ~~ 🐠 👋