Skip to content

Instantly share code, notes, and snippets.

@txaume79
Created November 27, 2026 01:13
Show Gist options
  • Select an option

  • Save txaume79/d6d86006690a092b1a954f95bcbc23db to your computer and use it in GitHub Desktop.

Select an option

Save txaume79/d6d86006690a092b1a954f95bcbc23db to your computer and use it in GitHub Desktop.
SGDK video codec: ramblings of a crazy guy

SGDK video codec: ramblings of a crazy guy

It's a very humble attempt, for sure. I don't want to look like a state-of-the-art developer, and I never will. That title belongs to only a few, and anyway it's not something I care about. But I want to be clear: I'm nobody, just a crazy, stupid guy.

If someone who's starting to code now (without AI) thinks otherwise about me, man, go for it: if I could do this, anybody can. I'm not special. Never lose sight of the fact that I'm just a rookie still growing, if that process ever ends for anyone, but I guess you get the idea.


Thanks

I've been so lucky to meet some of those state-of-the-art coders and "tutorialers" XD who are humble and approachable as hell, way more than I'd love to be. Being a small part of this community from a faraway corner of the Atlantic, and having people love what I share, is something I never thought could happen, even though it was never a dream.

Why not?

I hate what the internet has become at every level, and I hate even more that I can't get away from it 100%. I quit all my personal social media accounts and activity in 2013, when I realized it was poisoning me more than I wanted to admit and I couldn't handle it like a rational being.

So when I started sharing progress on YouTube, it was because I'd been spamming my best friends' phones with Telegram video trash, and YT was the first place I found to stop doing that. No other purpose. Just share the link, etc... Then that YT account started getting visits from strangers. I'm sure SGDK has enough interested newbie coders like me (looking for anything that shows them what they can dream of) for the algorithm to start showing my videos in their searches...

Next, some of those crazy guys started writing comments. One of them was from the Spanish community and introduced me to the Spanish MD Telegram chats, so thanks a lot, guys. And even more awesome, some of those heaven-touched devs (I didn't know they were) made the mistake of interacting too...

Since then, they've put up with my verbosity and been so kind, constructive and patient. We Spaniards (or at least I) have a talent for writing a lot without saying anything, or at least not as much as the length suggests XD. You know who you are, so thanks a lot to you too. Believe me, I took a course at a company to learn to write shorter emails, and it worked, but... in the end... this isn't work, and you guys aren't work, fellas XDD


A bit of background

Speaking of verbosity, just a bit more to put into perspective how hard this project has been for me.

  • Embedded (2005–2010): My CV says I started as a coder back in 2005, specializing in embedded systems in the pre-iPhone/Android era, but ARM-based: Texas Instruments DACs and all kinds of devices that used JTAG, bootloaders, rootfs, Qt frontends and uClinux... I learned LFS back then... U-Boot, etc., for industrial purposes, mostly factory automation, the car industry and toll maintenance. Yes, 386 systems, there, in 2010.
  • The wild, wild internet: Then I moved to the era of ads, toolbars and smoke-screen websites, dodging MS Defender checks with nothing but MFC apps on fake download repos... Not so proud of it, but it sharpened my skills, so... Things like running code downloaded straight to RAM, not to disk. Let's also say some kinds of trojans, but just to make your PC slower, not to spy. I do know how the AV industry operated back then, but I won't share that. I'm afraid some very powerful countries are or were involved, and in the end I want to live in peace XD. I did find out that on Windows 8, M$ had a virtual environment for running downloaded binaries that always used HAL9000 and JOHNDOE as the machine name and username, so... an exit 0 at the very beginning did the trick.
  • Sysadmin → *Ops: Then I switched to a sysadmin role right when git CI/CD was starting (good lord, I still remember FTP and SVN). Nagios and Jenkins, legacy forever lol. I evolved with Agile and the cloud into the *Ops roles: K8s, monitoring, serverless, streaming... Give me crack and call me a whore, I also coded in JS and Node.js. Forgive me, Father, for I have sinned.

But man, I love computers. I was lucky to be in the middle of the whole mess until July 2025, when I got fired, and I haven't had a position since.

I was around when WASM started to become something remarkable, and (I still have to open the PR on a couple of repos) I modified the QEMU WASM build to support a 64-bit address space, so now I can run x86 QEMU VMs with 12–14 GB of RAM running Arch Linux in Chrome tabs and... I'm saying too much haha. I'm working on it again now (I left it frozen for 6 months or so, and with the current AI craze maybe it's almost done already) to make it multicore using workers, because that's the last issue left before another project that uses it is finished.

I guess you get what my background is... I'm not the best in any field, but I know most of them. Still need to learn Rust.


So: the codec

As a new architecture and a new way of thinking, this video codec made it the hardest project I've ever worked on. There was:

  • the low level involved,
  • my lack of deep knowledge of how a tile-based system can be used to compress and decompress video and audio,
  • what the hell quantization was,
  • k-means and lots of other clustering stuff.

I'm not posting it here to show off the state of the art... or to show that my guts are bigger than anyone else's and my dick longer. I'm not saying they aren't, of course, but that's not why xDD

It's just that I'm happy to have met all of you. People who share the same interests in the same little corner of technology, people it's impossible (or almost) to meet in the Real World™. I'm happy to be able to share what I've done, and to share what an idiot like me can do without AI nowadays.

I confess I'm planning to use it to help me write the documentation and the wiki for the repo. I want to share the repo as soon as:

  • the testing pipelines are built,
  • the code is cleaned up,
  • the API is SGDK-compatible and as bug-free as I can make it.

I hope it'll be before Christmas... but you know, spare time is gold.

I truly believe that helping others, even if it's just showing how not to do stuff, is mandatory. I learned from others who did the same, above all from all those pals who take the time to make tutorials, documentation, blogs, ports with devlogs... An incredible task, and doing even a little of the same is my way of paying back my gratitude.


To the people starting now, in the AI era

I'm not against it. It's an awesome tool, but like many other things in life, power without control is worthless. I do use it to speed up boring tasks, but never as the base of a project. And I confess I only use it because I know how to do things by hand and I need to know what it's capable of. That's the only way to talk about it without sounding stupid, though I know that in this "my opinion is as good as yours" era, that's worth nothing.

So guys, first of all, think about why you're starting whatever your project is with AI. Think about who you are, what skills you have and which ones you want to have. That choice will forge you for years to come.

I'm not a hypocrite: I know that if AI had been around when I was 20, I'd have used it to make games, ports and whatever else I could. The illusion of achieving the hard things you've dreamed of since you were a kid is a very strong motivation. But think twice: this is the path to the dark side. Think of AI as the Force in Star Wars. Taking the shortcut is how you become a Sith XD

Using it as a senior coder with at least the minimum knowledge to build what you want is one thing. Using it without any skills will only hurt you, and in the end it'll kill your dream of growing as a coder or game designer or whatever you want to be. One of the best parts of starting that career is that it's as hard as your goal, but when you almost touch that goal, it gives you a feeling that can't be faked with anything else.

That's the case with this video project. You could make it with AI from start to finish, but it would work against your career. It could also hurt people who've been working hard on the same thing for a long time.

In the end, most of you aren't making commercial software. You're doing it for fun. What will happen when the AI project is done and shown on social media with your name on it? Just ask yourself the right questions.

And of course, in the end, do whatever you want. You're free and I'm not your father. I'm just a guy who wants others to feel the same joy he had along the way. It's up to you how to proceed, and as for me, at that level, I won't judge you.


Salud, anarquía y birra fría.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment