GameCube Framework


A Devlog from start to finish


October 24, 2025 - Tommy Dräger


  1. Introduction
  2. Setting Up
  3. Devlog

Prologue

If you found this article, chances are high that we are from the same generation growing up when games made the jump from 2D to 3D. Game Developers back then were simply another breed. I don't wanna start another console war, but I found the gameCube to be one of the most fascinating platforms to develop for since the technology was pretty mature for its time. I always wanted to develop my own game for one of Nintendo's Consoles but I was born too late to be a part of it and these days we have unreal and unity so why bother? Because it is not just me who wants to give their tribute. I want to understand the machine and give something back to the community. The goal of this GameCube Engine is to be useable by everyone. Most of the engines and frameworks I come along are a complete mess: terrible documentation, inconsistent, horrible formatted and structured. And I know exactly one framework that is doing everything right and that is three.js! A flawless documentation, tons of examples and a class hierarchy that just makes sense. My framework is using the same class names and methods like Object3d, BasicMaterial, Vector3 etc. Cause the goal of this project is to provide an intuitive and easy to use SDK for developers who wanna focus on what is most important: developing the actual game by giving them a tool that feels familiar!

Existing Toolchains

Nothing is easier than developing a game for the Nintendo GameCube. Just build a time machine and travel back in to become an officially licensed developer. You would have to fill out tons of forms in order to get Nintendo to ship you a giant devkit with the official “Dolphin SDK” with proprietary compilers, low-level GX graphics API and barely any documentation unless you had internal connections. Finally, make it run on the real hardware, then you submit it to Nintendo where they’d simply cancel it. That might be one of the many reasons why the GameCube became a flop commercially speaking.

If the first method is not to your liking then you have one more choice, and that is to use DevkitPPC / DevkitPro which is an open-source toolkit which uses a gcc-based powerpc compiler. A huge reverse-engineering effort made that project a reality. Notice that the developers would not use leaked files, since it would mean the end of that project. So devkitPPC (libogc) is the absolute minimum you need in order to put some lines and triangles onto your screen.

I for myself decided to go with the second method and use libogc as the base foundation. libogc is pretty comparable to open-gl. But printing red triangles are only the very first baby steps when it comes to ship a usable framework for other people.

PowerPC Architecture Overview

The fact that I had to create my own PowerPC Instruction Reference is saying a lot of how deep I had to dive in order to fully grasp the whole scope of the system. I have been reverse engineering “The Legend Of Zelda - Twilight Princess” for years now and building an Online Level Viewer for it and my understanding gets less blurry over time. I highly recommend you to join a decompile community since they build a lot of useful tools that I ended up using myself too.

Compilers and Assemblers

As written above dekitPPC is used as the primary development toolkit, which provides a PowerPC GCC cross-compiler specifically designed for the PowerPC 750CXe processor. The tool collection also includes the most essential library libogc.

Debugging Tools and Emulators (Dolphin, etc.)

In the current state I heavily rely on the usage of custom make scripts. I have scripts that build the dol file from the cross compile elf file. I have scripts that can generate a banner file and place it into a iso file which will then get packed with a filetree for external file access via DVD mount. For quick testing I rely heavily on Dolphin emulator which is a whole topic on its own. The project integrates Dolphin's GDB server for remote debugging, allowing developers to set breakpoints, inspect variables, and step through C++ code using powerpc-eabi-gdb. I also added in-game console log overlay to make debugging more convenient when it’s tested on the real hardware.

Hello Cube

August 17, 2025

At this point I had a vague understanding of how GX (Nintendo's Version of OpenGL) is working. So I tried to make a few hardcoded triangles with some vertex colors. Remember back then GLSL wasn't a thing yet. Creating a camera and a triangle is the hello world project everyone is starting with I guess.

Basic and Lambert Material, Direct Light, Geometry

August 18, 2025

As you can see I already started to tackle some of the primitive Geometries like Box. So I already had BufferGeometry, Light, DirectLight, BoxGeometry, TorusGeometry, SphereGeometry and PlaneGeometry. But the focus here was the Basic and Lambert Material Classes which was a huge load of work. At this point I wouldn't know how often I had to refactor that Material Class.

More Geometry

August 19, 2025

If you check out the Geometries section in the threejs documentation you can see that there are like 21 different Geometry classes I have no intention of implementing all of them but I really try my best to come as close as possible. I had to really do my homework again on Polyhedron again. A week of hard work for 15 Likes felt quite rewarding also^^.

Point Lights & Light Attenuation

August 19, 2025

At this point I only had a single directional light in my scenes. The GameCube however is providing 8 Light Channels that I could make use of. I also wanted to have a cornell box this time. At this point of development everything went quite smooth and without big blockers. Something that would change in the next Step.

Textures and Loaders

August 24, 2025

When I had to deal with Textures I had to come up with a solution to load files. Up until now I could only build a dol file (the equivalent to an exe file). The only things you would put into an executable would be your program code and let the program load the external data later from png. Fortunately devkitPPC had some examples where I could find a compromise. At that point I didn't had a disc image and file tree. Also the image format had to be in tpl format (a custom format for GameCube). So I did the following: I created a folder /data for embedded files. I then converted it to tpl when building it with make. I made a script that would create an obj and header file from that tpl image. This way I could load small embedded files that would get directly baked into the dol file. After I was able to load the file into memory I could finally focus on the most important part: creating a texture and enhancing my material classes to actually project that image onto the mesh.

Deployment with a Custom Banner

August 27, 2025

I had to compromise with the file loader by only using embedded files, cause I couldn't deploy a disc image yet. I had to try multiple methods that were legally okay to distribute. I struggled pretty hard with this. I could create an gcm iso file with mkisofs. But I realized that the banner file would not be shown inside the dolphin emulator. Also the file tree was completely missing. Most of the toold used by the community are in a grey area by injecting / replacing stuff from an already existing image file (which is not what I wanted!). In the end I found a good and legal solution by using makegcn from the nodtool collection.

Benchmark Polycount

August 29, 2025

This time, I wanted to kinda test if the promise of a maximum polycount of 8 million faces would hold true. You can really crank up the number of cubes in this demo until the FPS finally starts to drop.

ObjLoader, MtlLoader, Transparency, AlphaMaps

September 14, 2025

This update introduced support for loading wavefront object using OBJLoader and MTLLoader. With these classes, it finally became possible to import external models and materials beyond hardcoded geometry. This was definitly a huge and important step that I was looking forward to a long time. In the end transparency and alpha map support gave me real headaches. But I have the feeling this is not the last time that I have to refactor the Material class.

Box3Helper, AxesHelper, GridHelper, Box3, Line & Points

September 14, 2025

Helper classes like Box3Helper, AxesHelper, and GridHelper were actually super fun to implement. When it comes to collider or trigger boxes those classes will come in handy. Basic geometric helpers like Line and Points were also implemented (of course since GridHelper etc are based on the Line class).

Object2D, GUI Elements, Fonts & GDB Debugger

September 20, 2025

I always wondered why threejs would never add a Object2D class to handle UI elements separate from the 3D scenes. Methods and members are pretty similar to Object3D. I also made sure to include a fallback font for the text elements. I will definitely add kana later. For now we can use Logging functions like Console::log, Console::error, and Console::info to directly display an in-game Overlay. GDB remote debugging support was integrated through USB Gecko and BBA using Dolphin’s ports (55020 & 2828), giving proper breakpoint and inspection support while running code on hardware or emulator. I kinda like those "Borland Cpp Turbo Vision Aeasthetics" ^^ (have a look at my Adlib Editor and then you know why.

KeyframeTrack and Interpolators

September 24, 2025

At this point I covered everything so far you needed for a simple car game without any characters, because one important part is still missing: Animation! the groundwork was laid by adding KeyframeTrack and three interpolation modes. This enables smooth animations for properties like position, rotation, and scale. It’s a crucial advanced animation systems like character rigs and skeletal animations.

AnimationClip, Action and Mixer

September 25, 2025

AnimationClip, Action, and Mixer is coming straight from the threejs documentation! The framework is now capable of managing and blending multiple animations! AnimationClip stores keyframe data, Action represents a running instance of an animation, and Mixer coordinates playback and blending of those actions. This brought the system closer to supporting skeletal animation.

Wireframe Geometry

September 25, 2025

At this point I already had a lot of HelperGeometry classes, but WireframeGeometry was skipped until now. It was a nice and straight forward implementation, cause the SkinnedMesh and GLBImporter class is giving me a real headaches right now.