Also,
2026 web dev: 4MB of JavaScript to render a button. 2026 N64 dev: entire FPS in 1MB
Their previous console had an edition made of the same metal as Anduril's lethal drones.
[1]: https://www.timeextension.com/news/2025/12/site-news-why-we-... [2]: https://kotaku.com/modretro-anduril-chromatic-attack-drone-m...
Anyone know what Nintendo's stance is on the companies making these kind of "brand inspired" retro products?
Here’s what I’m working on - it contains a comprehensive retail game metadata library & cheats database, can screenshot running games and execute frame-perfect tool-assisted speedruns: https://youtu.be/UyqtU0hgGRA?si=_YisdNOrQrSpdpNT
https://youtube.com/watch?v=bNN9XhGZ3Yw
(Also The Centre for Computing History YouTube channel is seriously underrated)
This makes me want to jump in. But also, I wonder how many people will ever buy and play your game.
Does Modretro's target market buy this type of stuff? Or are they the type to just download and emulator and ROM.
References: [1] https://en.wikipedia.org/wiki/Palmer_Luckey
Modern toolchains, programming languages, dev cartridges and libraries from the community makes all the difference. Outside of some niceties like ICE (gotta write that GDB stub for target hardware at some point), it's not that different from what you'd experience with modern embedded work.
But in general, the thing that really impresses me is what people come up with working within these various constraints. Less is more.
Megadrive / genesis homebrew is where it's at for me. But tbh I am honestly kind of clueless when it comes to this stuff. Still trying to get parallax scrolling and foreground occlusion figured out for my "game."
I got it to write a skill for driving the Ares emulator via GDB Remote Serial Protocol and it uses that for its feedback loop.
Speaking as someone who spent all weekend playing his new M64: Yes, the target market often does buy the cartridge. I've got a brand new copy of Xeno Crisis sitting on my shelf, although Xibalba was a close 2nd. (Tied with Buck Bumble ;) )
That said, there's definitely a crowd that would rather buy a summercart and pirate all their roms. Personally, I'm interested in more thoughtful and intentional electronics, so I'm attracted to the idea of old school "buy the game on a cartridge" mentality.
I mean, that's just defense companies in general now. Would you rather have your own soldiers dying in a war, rather than robots? Ukraine is using AI in their targeting, is that something you condemn?
This is no different from the invention of machine guns or artillery. Yes, it's sad that these things will be used in war to kill (more) people. But intentionally avoiding that technology means you're just handicapping your own military and sacrificing others' lives for your principles.
Your claim is similar to saying nobody should own a gun, because it should be illegal to defend yourself or others. So everyone who owns any kind of weapon is evil and bad? Only bad people are allowed to own weapons and we should just roll over?
Nobody should defend Ukraine from Russia? Anduril has been helping Ukraine since very early on.
Let the guy have his little side modding hobby.
Undoubtedly their legal team is at work 24/7 finding every angle at which to unleash legal hell upon it.
But yes, the N64 isn't particularly well suited for this type of game (or anything 2D, really). I didn't know that when I started the project.
Of course, getting working code that actually does anything useful is a much different story (it's taking multiple days just to write the wrappers for RDP commands, for example; lots of cross-referencing between N64Brew wiki pages v. official SGI docs v. libdragon source code v. Peter Lemon's assembly code to figure out what all the different bitpacked fields really mean and how to best represent them), but it still feels magical that I can just use an ordinary toolchain and not some ancient proprietary monstrosity.
I bought a MiSTer for me and my son and we played the heck out of Mario Kart 64 and Mario Golf. I think he picked up my "gaming is dead now" outlook since he doesn't really have any interest in new systems or games anymore
[1] https://github.com/spicyjpeg/ps1-bare-metal
[2] https://github.com/grumpycoders/pcsx-redux/tree/main/src/mip...
They've all become war profiteers and fascist enablers.
The only way to live with my conscience was to choose not to be complicit.
The point isn't just to be a novelty throwback aesthetic. It's the most accessible way for indie devs to make a 3D game without needing to worry about particularly high quality 3D models and animation.
I'm really looking forward to the Epilogue 64 Operator. I have the GB Operator, and it's been amazing to be able to flash romhacks onto carts and play on bona-fide hardware.
It's ironic, in another world HN commenters would be lauding Luckey and ModRetro for all these virtues.
The article says the game is published by ModRetro.
"Peace through strength" is a fine motto, but you can't claim that motto and then turn around and base your business on selling to an entity that routinely starts non-defensive wars.
It is a decision to start producing regardless of how well-intentioned it is. You will be profiting off of people being maimed and killed. Various people thought they solved war through new weapons only to create more effective killing machines. That's what WW1 was.
Palmer does not have to work on weapons nor justify making them. Building tech that will be used to murder people (and yes, it will happen) is a decision. Not funding his other hobby when he's getting money off US military contracts is hardly breaking his bank. He wants to build weapons? I don't want to buy his products. Easy.
Building more efficient weapons does not make us safer. Every dollar saved through "strength" and better weapons matters little to the parents who lost their kid when the most precise weapon in the world kills a bunch of schoolchildren like it did at the start of the Iran war. If you can't gaurantee your weapons won't get used for that, why would you build them? You cannot.
I thought Tony Stark already made this point.
The cartridges from Modretro only work on NTSC N64s, though. I'm told the next production run should work on PAL, too.
For the same reason it wasn't possible at the time for a third-party to make N64 cartridges themselves to avoid Nintendo's fees. But I assume these lockout chips are replicated or circumvented by now.
I always felt the same about the look of PS2 games
They provide the devkit hardware, the specification technical documentation and the tool chain to compile the binary.
I've seen this astroturfing and spreading of lies increase since he delivered weapons to Taiwan so they can defend themselves. Probably the CCP amping up their influence campaign against him.
Sony however decided to provide a full C toolchain based on GCC as well as a set of very high level libraries that abstracted away basically all aspects of the PS1 [1], all the way up to implementing a ready-to-go 3D engine and MIDI sequencer. This was an unpopular move as the libraries were slow, inefficient and most game developers were used to having full control over the hardware, but it also allowed inexperienced devs to get started quickly (as proven by the thousands of low budget PS1 titles that used the high level APIs) and eventually contributed to the popularity of the console over its peers with worse tooling.
Sony would eventually go on to release some slightly lower level documentation for certain aspects of the console as well as APIs that better mapped to how the hardware actually worked under the hood. It wasn't however until years later that the hardware would be fully reverse engineered at the register level [2], and it took even longer for most homebrew to move away from the official SDK (which only really started happening a few years ago as accurate emulators and homebrew SDKs started popping up).
This is interesting, as I was about to say that gaming has never been more alive than it is now - but it's true that at least the developments in hardware are not nearly as exciting as they used to be in the past. Maybe that's what he's feeling?
One gets the impression that gaming is dead when one's only contact with modern gaming consists of reading headlines about a handful of AAA games.
In reality, the gaming landscape has never been better, as game production has expanded in several directions:
- The barrier to entry into game development has been lowered; People who are talented in design but not programming now have the opportunity to create games
- AAA budgets have increased; those who enjoy large-scale productions will find increasingly large games
- There is still a market for old-school games, so plenty of (especially smaller) companies produce retromodern games
Heck, they even still produce commercial Commodore 64 games o_O
Of course, there is less room for radical innovation, but people do not play only radically innovative games. And regardless, innovation still exists today, especially in smaller-scale productions.
I hope it works out. I can see it working in the reverse: I play n64/ps1/ps2/gamecube games with my kid, they go to school and their friends are playing fortnight or valorant, and then you become the bad guy for trying to be an obstacle in that.
Until then, only arcades had already made the switch.
On PS2, PS2Linux, Dreamcast there was already C++ support, by the way.
Isn't it strange that commentors focus on the other, less palatable, aspect of his life?
As the meme goes, "you do not, under any circumstances, 'gotta hand it to them.'"
You have so many tools at your disposal for learning, you really have no reason to just have no idea what is going on unless you just don't prioritize your time that way. In which case, it's ok to understand that you don't know, but why hold your opinion so strongly then?
If nobody in the world was manufacturing any weapons and it was fully observable from space, nobody would have cause to manufacture these kinds of weapons. We do not live in that world.
At some point, any reasonable person should agree that if a country exists in an environment that contains many threats it might need to defend itself or others from, then it makes complete sense for it to develop weapons towards that aim. Countries are not people, people are people. So people make the weapons.
It just so happens that Palmer Luckey is a person. He can't sell weapons to any random person or country he wants, he can only sell them to the US or with permission of the US to a country that the US has a strategic interest in defending.
Precision weapons have helped reduce casualties. This is a fact. Please try to contradict this fact in the face of napalm bombing and nuclear bombs of yesteryears. Please try to tell me that precision weapons aren't better than just randomly aiming artillery at the sky and letting'er rip. Please do. I want to hear your well founded argument for this.
Lot's of HN (and "social" media) commenters in this world evidently are; nothing ironic about it.
It's just many people have a radically different set of ethics which, once they become principles, can't be easily, or at all, compromised on. And just to be fair, it's not just the what, but the how (which extends not just to Luckey & Friends, but to Anduril & Friends).
My point is, people get enjoyment out of game design too. It’s not just about nerding out on technical specs.
Nintendo's boot code is under copyright and thus cannot be used. So the boot code distributed with Libdragon is signed by finding a hash collision with a brute force tool running on the GPU[1]. Fun stuff!
[1] https://github.com/DragonMinded/libdragon/tree/trunk/boot#bu...
AAA you know what you are getting, big brash but usually really polished cutting edge stuff but also designed by commitment.
Then you have indie games that are high ambition but also very limited in what they can achieve. So you get a lot of things with brilliant ideas but dont always stick the landing. Two recent ones I have been going through are Skate story and Gecko gods. Both have wonder ambition but you keep hitting those issues when you realise, yeah it is an indie title.
There is a middle ground but it is so hard to find in between those two extremes.
Come to think of it, it must have, because the bit-perfect recompilation projects are using the exact compilers from the SDK.
I think as adults we get locked into a few things. I remember as a kid I would play anything I had access to and liked. Now it's more of one or two games at a time.
My oldest is 7, and my youngest almost 5, and they came into gaming in a round-about way. My sister was visiting when the oldest was 3 or 4, and asked to play "an old Sonic 3D game". So, I pulled the Dreamcast out of storage, hooked everything up, and she played for all of 15 minutes before getting bored. However, my daughter was enamored. Immediately asked to play and even knowing how janky old Sonic was, I obliged.
Honestly, the rest is history. I'm not exaggerating when I say that our living room TV currently has a Dreamcast, a Gamecube, an Xbox One, PS3, PS4, and Switch hooked up to it. Both girls are huge Sonic fans, and play everything from rereleases of the Genesis games, to every brand new Sonic game that comes out, along with a whole mix of other age appropriate games (3D Marios, Animal Crossing, Smash Bros, and Mario Kart all being staples in our household).
My point in all of this is that if you expose them to the older stuff at a young age and it clicks, they'll explore the gaming landscape in their own way. I've also got an 11 year old brother that plays Fortnite with his friends every day, but also is trying to collect every single Lego game that's come out since they started the Lego Star Wars, Harry Potter, etc. series of games. Kids will like what they're going to like, but having parents that are enthusiastic about the breadth of what the medium has to offer will encourage them to dig being the modern offerings.
Is it more efficient than napalm? Great. It still will be used to kill people which I find to be gross, especially when innocents will die, too. If somebody has to build weapons and somebody has to fund said weapons maker, I'm glad it doesn't have to be me. Doesn't have to be Palmer either.
Now come on. The greybeard act was never believable nor interesting.
All we see out of mainstream AAA gaming is abused devs, private equity scalping, and mindless remaster regurgitation. Basically going through the same problems as Hollywood is with major films. You get a massive banger of a production every few years, and the rest is just endless money burning and developer harm.
Meanwhile the good indie devs are a dice roll on if they are gonna get recognized by the world at large and find success, just like small budget films.
My game library gets older by the day and I prefer it that way, but love it when an indie game bubbles to the surface and gets beloved by enough fans to break into the news cycle. Itch.io is the only place I look for games anymore unless something I need for the collection hits GoG finally.
I suppose what I'm trying to say is that it's ironic that the one guy providing these consumer-friendly features is considered anathema by many of the people clamoring for those features. You, yourself even mention downthread that you'd otherwise be interested in the M64 Pro controller, but won't consider it.
I was just trying to make a genuine comment remarking on the dichotomy, but I guess people are more interested in making quippy one-liners.
Pop in a game on N64/Gamecube and you're controlling the character within 10 seconds every time.
The modern upgrades for those generations really make them great - the 8BitDo kit to make an N64 controller wireless, N64 Summercarts, replacing the optical drive in Gamecubes with a memory card reader...
- Physical logic gate era of gaming.
- Assembly era
- C era
- OOP era
- Interpreted languages and game logic living in scripts on top of c++ engines
- Fully Gen-AI era?
There's a time and place for everything.
And on top of that, libdragon's IPL3 doesn't just blindly copy the first megabyte of ROM code into RDRAM like the official Nintendo one does, but actually expects the ROM data after it to be a full-blown ELF executable, which it parses out and copies pieces of to the specified places.
Pretty slick stuff.
The plot-twist here is: The game design is made by Claude too :)
Yeah, I got that. I just don't think the fact that a to me detestable individual can have, or work for, an outfit that produces (some) good, interesting, or even highly impactful merchandise is at all remarkable. History is littered with such people, especially in the tech sector (e. g. Ford, von Braun, etc.).
> All we see out of mainstream AAA gaming is abused devs, private equity scalping, and mindless remaster regurgitation. Basically going through the same problems as Hollywood is with major films. You get a massive banger of a production every few years, and the rest is just endless money burning and developer harm.
The production ethics and the product are two distinct aspects.
Regarding the product itself, definitely the AAA gaming industry is, like Hollywood, a dysfunctional production model, but that doesn't mean that it's dead in terms of quality - some franchises do maintain high quality (Doom has been exceptional in this sense) but even in terms of new IP, in average, there at least couple of high quality entries in average, every year. Things could go better, but they're certainly far from "dead".
Sadly, this is just an average online take.
Yeah, no.
Your historic accounting is not to be trusted by any means if “gen-AI era” is something that you really believe is happening.
Go look up the development of Sonic Xtreme in the 90s. A brutal development process in the 90s that led to more thsn half the development team camping out in Redwood City Sega office building for months until they all got so sick half the team went on medical leave. Or Quake, where the game development process literally broke the team.
That's what pisses off the mostly straight hetrosexual male crowd that make up most of the gaming market.
A big reason why many east asian game studios are doing so well by rejecting that tried and failed formula from the West.
ModRetro produces one thing I do have an interest in. A partly aluminium-cast version of the, to me, most ergonomic gamepad made so far: the classic trimaran-style N64 controller. But that marriage ain't gonna happen. And that goes for every other (future) product of theirs as well.
I don't disagree, but I don't see it as a positive, looking at the current game releases and their performance being shockingly unoptimised, there is a lot of lost real world value in knowing the lower level details, it's like anything really, sometimes you have to do the hard/unappealing work to create your best work.
Honestly, the hell kinda remark is that?
It’s nothing to do with sexuality or “companies telling you what you want” but everything to do with companies putting out complete and utter slop and people ACTUALLY buying it all. They wouldn’t waste all that time and investment money if they knew there wasn’t a market for it, but guess what? There is.
Gamers seem to have the memory span of a goldfish. Horse armour? Bad. GTA VI at 80 bucks and no physical release on consoles? OMG YAAAAAASSSS GIVE ME MORE OF THE SAME HOOKER-SEX SIMULATOR WITH CRIMINAL ACTS SPRINKLED ON TOP!!!
Don’t complain about gaming companies’ behaviour if you keep giving your money to them.
Nevermind that he literally was equating the two and explicitly says so.
Going by interviews with the team over the decades, they had clashing personalities and poor leadership.
> AAA game development was far more brutal in the 90s.
Honestly it's probably always been brutal going back even to the early days of Atari. Companies like EA have spent three decades destroying beloved studios for profit, only to now be chewed up and spit out by PE/VC bastards themselves. A fitting end really.
I've been a low level engine programmer in video games all my working life. I worked on a few AAA games that sold 20M+ copies, I'm not saying this to boast, I'm saying this to say I know how the sausage is made. My literal day to day job is fixing issues like "The RHI thread on the Switch takes 0.5ms longer than it should" and optimizing things as much as possible.
I think if you asked me few years ago, I would have also taken the same stance you did - that these tools make it "too easy" and we get unoptimized crap out there.
But you know what, nowadays I feel like I mellowed out a lot. A lot of these so called "friendslop" games are horrible in terms of technical work. And you know what? They still bring joy to people. They still make people laugh and have a great time with the people they like. One of my favourite memories from a game I worked on was reading comments from people who said they were looking forward to just playing the game after work in the evening with their friends. Was optimizing the IO performance on PS4 essential to make the game happen? Sure. But what mattered more was that the game was actually fun to play.
Nowadays I see the improvement in tooling as nothing but a positive. There will always be hardcore engine programmers who know how to do this stuff, I have zero doubt about it. But allowing people to just download an engine and make the thing is absolutely fantastic. To say that it's bad - to me personally - that's gatekeeping. Saying you can't make a game unless you know how to write a renderer or a physics system is so offputting to people who want to make a game but just don't know how - we should be encouraging them, not chastising them for it. Little Big Planet did it well as one of the first games of that kind, if you recall that - just saying, here's a sandbox, make a thing that brings joy to other people. Isn't that what gaming is about?
And on a more serious, business side - it's kinda crazy that Epic lets you use UE for FREE until you start making serious money on the game that you made. You can start a company, hire people, and just start making the game you want to make without paying anything for the tooling. Very few other companies in the world let you do this.
Is it about the idea of the platform having limited capabilities (e.g. akin to Game Bub or MiSTer) or about tactile aesthetics (e.g. possibly vaguely comparable - though not really - to r36t or play.date) or something different entirely.
Certainly one of the most devisive controller designs, but the lack of two thumbsticks is precisely what I like about it. The pad centers one thumbstick and the trigger on opposite sides of the "main hull", with the rest of the inputs divided along two (remappable) zones, i. e. the outriggers. I have never held a controller in my hand with better ergonomics and holding adaptability. Even the size is just right for my hands.
It's the only pad that ever made FPS games on a console a joy to play for me; put in two analog sticks and you fuck with that formula. Its only serious weaknesses are the cheap plastic, especially for the thumbstick, and the weight (too light). Make a full metal version out of it, with some thumbstick material mods known from the PvP fighting game community, and it's the best. Well, at least for me.
> it's kinda crazy that Epic lets you use UE for FREE until you start making serious money on the game that you made.
Thinking about how powerfull UE is, it is kind of insane.
— Tuesday, August 4th 2026
Two years ago, I was Porting my JavaScript Game Engine to C for No Reason. I have since found a reason: making a new N64 game!
The result is Xibalba 64 – a Wolfenstein 3D-like FPS. Modretro agreed to publish the game as a physical launch title for their M64 (a modern N64 clone), complete with cartridge, packaging and manual!

This, to my knowledge, is only the second physical release of any new N64 game since the end of the console's original commercial life. The infamous Xeno Crisis by Bitmap Bureau – originally a new game for the Sega Mega Drive and subsequently released on many, many more consoles – came to the N64 in 2023. No other new games have been published for the N64 since Tony Hawk's Pro Skater 3 in 2002.
Impact was a JavaScript game engine I developed back in 2010. It was tailored for 2D action games, handling tile sheets, background maps, sprites and collision detection. It's very simple, but still a sound foundation for whatever you want to throw at it.
Two years ago I rewrote Impact in C. Why? I don't know. It was fun.
This C port, high_impact, has a notion of a “platform backend”. The platform handles the low-level plumbing – opening a window, creating a drawing surface, reading input, etc. Out of the box, high_impact comes with two platform backends (SDL2 and Sokol), and you can compile your game for either one. This already enables high_impact games to run on many different devices.
The rendering backend in high_impact is also modular. You can compile your game with a software renderer, OpenGL or Metal (for iOS/macOS). Support for new platform backends or rendering backends can be added without modifying any other part of the engine.
A perfect starting point for an N64 game.
The N64 is a quirky beast. In addition to the 93 MHz MIPS CPU (big-endian!), it has two coprocessors for handling graphics, sound and more:
Both of these live in the same physical package, commonly called the “Reality Coprocessor” (RCP).
Image from the N64Brew Wiki
For the first few years of the N64's life, Nintendo closely guarded access to the RSP. It was exclusively used by Nintendo's officially sanctioned platform library, “libultra”. Only later did Nintendo allow game studios to write custom “microcode” (actually just MIPS assembly) for the RSP.
Keeping the hardware happy is no simple feat, and the instructions for the RDP are quirky and complicated. Programming your game on bare metal is pretty much out of the question. In recent years, Nintendo's official “libultra” has made its way onto the internet, but using it would risk a copyright lawsuit.
Luckily, the N64 homebrew scene has picked up a lot of steam in the last few years and we have a very capable alternative now: Libdragon.
Libdragon is basically SDL for the N64. It provides facilities for drawing sprites and triangles, sound output, controller input and much more.
It took me only a few evenings to build a new platform backend for high_impact on top of libdragon. I tested this with Biolab Disaster. The game code remained unmodified; performance was meh, but I was using the N64 hardware in the most naive way possible.
Libdragon provides the compilers and everything else that's necessary to build a ROM file for the N64. The installation instructions and all other documentation are comprehensive and well-written. The library comes with many examples to get you started.
In general, it was a pleasure to work with Libdragon. Just a heads up: you probably want to use the preview branch as the “stable” trunk branch has hopelessly fallen behind.
For testing, a good emulator is invaluable. For the longest time, N64 emulation was extremely inaccurate. Lackluster emulation of the RSP and RDP coprocessors, in particular, was the cause of most problems.
Most emulators just emulated Nintendo's platform library, libultra. They emulated the intent to draw a triangle, not what the hardware would actually do. While inaccurate, this made emulation possible at all in the early days. Famously, UltraHLE (“Ultra High Level Emulator”) was released well within the lifetime of the N64 and caused a lot of headaches and subsequent lawsuits.
These days the N64 core in Ares is much closer to the actual hardware – the RDP and RSP are fully emulated, including accurate timing for the RSP. The infamous slow memory bandwidth of the N64, however, can still only be tested on real hardware (which recently caused me some disappointment).
So you need a real N64 and a cartridge that lets you play arbitrary .z64 ROM files. The open-source SummerCart64 is excellent and available from many different manufacturers. Be aware: some manufacturers (especially on AliExpress) cheap out on the components of the board.
SummerCart64 has the usual SD card slot to store your ROMs, but what makes it great for development is its USB-C port: you can directly connect it to your PC and upload a ROM as part of your build process using sc64deployer.
I ended up with the N64 next to my PC, connected via USB, and used a cheap $10 USB analog capture card to display its video output in a window on my desktop. On Linux, it took some fiddling with mpv to get low-latency output; here's the script I used.
With this setup, iterating on real hardware was just a matter of compiling and pushing the N64 reset button.
I originally made Xibalba as a demo for my JavaScript game engine in 2014. WebGL was still the hot new thing back then; a 3D game in a browser was quite a novelty. The game was very short, featuring only a handful of levels, weapons and enemy types.
In contrast, I wanted Xibalba 64 to be a real game, not just a demo. So I not only needed to port the game to C and high_impact, but also expand on it with more levels, more enemy types and more weapons.
high_impact is a 2D game engine, but Xibalba 64 is clearly 3D. Well, not quite. Since the game has no elevation, it can be mostly treated as 2D. You could conceptually play Xibalba 64 from a 2D top-down perspective. Of course, that wouldn't be as exciting, but all the physics, movement and shooting would work the same way. In this regard, the game is very similar to Wolfenstein 3D.
Many of high_impact's physics functions expect a vec2_t argument with .x and .y components. But for drawing, I absolutely needed a 3D position, so I came up with this definition for a vec3_t type and changed the entity_t type:
typedef struct {
float x, y;
} vec2_t;
typedef union {
vec2_t xy;
struct {
float x, y, z;
};
} vec3_t;
typedef struct {
// ...
vec3_t pos;
vec3_t vel;
// ...
} entity_t;
Now, whenever I need to call a function that accepts a vec2_t, I can “convert” from vec3_t for free:
trace_t res = trace(collision_map, entity->pos.xy, entity->vel.xy);
Since the inner vec3_t struct is “anonymous”, I can still access all values directly; i.e., entity->pos.z works just fine.
The initial port of the existing levels and enemy types went quite smoothly and was finished in about two weeks. I then spent another few months on extending the game and optimizing the renderer.
Most of Libdragon's functions fit naturally into a new platform and rendering backend, though I had to change some other parts of high_impact to bypass its mixer (Libdragon has its own, accelerated by the RSP) and image loader.
Throughout the whole process, I retained the ability to build the game with the SDL2 or Sokol backends. This was great for playtesting game logic and enemy behavior. To make levels, I also implemented a simple hot-reload mechanism triggered whenever a level file changed.
The level editor, bundled with high_impact, is a single self-contained HTML file. I ended up extending it quite a bit to add better support for lightmaps, display actual sprites for entities (instead of just boxes), add descriptions for entity settings and provide other small features. The single source of truth is still the C source code – the level editor reads it and extracts the entity types and supported settings automatically.

Since the level editor still works with JSON files, I built a small map compiler that reads the JSON and emits binary data. While loading JSON on the N64 is of course possible, it added some unnecessary ~100 ms of load time. So during the build process, each JSON level file is converted into a struct that essentially looks like this:
typedef struct {
uint16_t magic;
uint16_t entities_len;
uint16_t map_width;
uint16_t map_height;
struct {
uint16_t type_id;
uint16_t x;
uint16_t y;
uint16_t settings_len;
struct {
uint16_t setting_type; // such as "name", "target", "size", ...
union {
float16_t float_value;
int16_t int_value;
struct {
int16_t string_len;
char string_value;
};
} value;
} settings[settings_len];
} entities[entities_len];
uint16_t collision_map[map_width * map_height];
uint16_t floor_map[map_width * map_height];
uint16_t wall_map[map_width * map_height];
uint16_t ceiling_map[map_width * map_height];
uint16_t light_map[map_width * map_height];
} level_t;
The level compiler writes those values in big-endian format for the N64 and little-endian format for x86 (SDL2, Sokol, WASM), so we can easily read everything on all platforms without byte swapping.
Libdragon itself has a function for drawing triangles: rdpq_triangle() inserts a single triangle draw call into the RDP queue. While this works, what you really want to do is submit your draw calls to the RSP, have some custom microcode to perform transformations, lighting, depth calculations, etc., and then let the RSP instruct the RDP to ultimately draw the triangle.
The intricacies of the RDP and RSP were still new to me, but luckily another outstanding open-source library, Tiny3D, handles all this and more with a simple-to-use API. Getting something on the screen was the easy part; making it performant was a whole other endeavor.
The N64 infamously only has 4 KB of texture memory. The largest textures you can upload are just a meager 64×64 pixels. Even worse, the memory latency for a texture upload is atrocious. One solution, used by Mario 64 and many other titles, is to render untextured polygons whenever you can.
This wouldn't really fly with the style of my game, so instead I had to be really careful with the draw order of level tiles to minimize texture uploads. On top of that, Tiny3D can load and submit up to 17 quads at once, and it would be wasteful not to use that. So I ended up collecting batches of triangles with the same texture in 64-bit draw calls:
typedef union render_call {
uint64_t packed;
uint32_t hashable;
uint64_t ident : 46;
struct {
uint64_t translucent : 1;
uint64_t texture_index : 9;
uint64_t x : 10;
uint64_t y : 10;
uint64_t w : 8;
uint64_t h : 8;
uint64_t vbi : 14;
uint64_t len : 4;
};
} render_call_t;
Here vbi is the accompanying vertex buffer index, and len is the number of quads in this call. Since every call is just 64 bits wide, we can efficiently sort them at the end of the frame and issue them to Tiny3D.
But before I could do all this, I had to first figure out which parts of a level are actually visible. The original JavaScript Xibalba used a portal system, dividing each level into sectors and precomputing which sectors were visible from the current one. This worked fine, but produced a bit more overdraw than I would have liked.
So I opted for another approach: raycasting. Yes, the game is just casting 320 rays into the scene, covering the whole field of view. Each ray marks traversed tiles in a bitmap for submission to the renderer.
Later, I optimized the raycasting a bit more by recursively dividing the 320-pixel field of view until two rays hit the same tile. In this process, I also check whether any of the traversed tiles are missing a ceiling – if so, we have to draw a skybox.
Fun fact: the skybox in Xibalba 64 is just a single 32×32-pixel texture that is beautifully smeared across the horizon.

As another optimization, I arranged each tile sheet that wouldn't fit in a single upload into a single column and tried to use just 4-bit indexed colors wherever possible. Using fewer colors allowed more pixels to fit into texture memory, and the column layout ensured that each tile could be uploaded as a single, continuous chunk of memory.
![]()
With all of this, the game runs at a stable 60 FPS. Something not many other N64 games can claim!
The four-player split-screen mode doesn't quite hit the 60 FPS mark at all times, but still remains fluid. In contrast, GoldenEye 007 infamously often dropped into single-digit frame rates here.

As with all my other games, my good friend Andreas Lösch produced some outstanding music. You can listen to the whole Xibalba 64 Soundtrack on Bandcamp.
The game itself also has a built-in music player that you can unlock in the single-player campaign.
Cartridge space is tight, and even compressed audio is typically either quite large or too expensive to decode.
In a heroic effort, Giovanni Bajo – one of the maintainers of Libdragon and an absolute wizard when it comes to anything N64 – implemented an RSP-accelerated Opus decoder. For context: Opus is an audio codec first published in 2012. That's 16 years(!) after the N64. It's a marvel that it works at all, but sadly it's still a bit too computationally expensive to be used during gameplay.
(Aside: Giovanni Bajo went on to implement a real-time H.264 decoder for the N64, too.)
The better option for now is a simple 4-bit VADPCM format that Libdragon transparently decodes on the RSP during playback. The compression ratio, of course, isn't great, but it's way better than uncompressed WAV. About 31 MB of the 32 MB ROM is used by sound and music.
After the release of Xibalba 64, I started to implement another audio compression format that would better address the space/quality/complexity trade-off. More on that in the next blog post!
Modretro previously made a Game Boy Color clone – the Chromatic – compatible with all existing Game Boy and Game Boy Color games, and they were quite eager to publish many new games by hobbyist developers, too.
When they announced the M64, I thought this would be a great chance to get on board. As soon as I had a working prototype ready and was confident that I would be able to build the whole game (and make it good), I wrote an email to the generic Modretro customer service address and, to my surprise, heard back from the head of publishing within a day.

Bureaucracy was minimal and the contract was straightforward. I requested some changes that would allow me to release the game engine as open source later on, which Modretro was happy to accommodate.
Of course, as it goes with these projects, there were some delays and I only received a pre-production M64 late in the development process. But it didn't matter – the M64 worked as advertised; no changes to the game for the M64 were necessary.
Modretro also offered help with the box art, but another friend of mine was eager to do this instead. He later told me that, back in the '90s, he was responsible for the packaging of many titles published by Sierra in Germany, including Half-Life. So it's no surprise that the Xibalba 64 box art turned out great!
For the manual, I supplied text and illustrations to Modretro, and they laid it out for print. Smooth sailing. You can have a look at the PDF manual on the Xibalba 64 store page.
I'm not able to talk about sales numbers or my contract with Modretro in detail, and the game was released only a few days ago, but so far it's looking quite good. Of course, making N64 games will probably not let you quit your job, but it looks like it will pay for a few nice holidays.
Huge thanks to Giovanni Bajo of Libdragon, Max Bebök of Tiny3D, the entire N64brew Discord community and, of course, the Modretro team for pulling this off!
Here's the final trailer for the game.
If you're looking to get started with N64 development, these resources may help: