Indie Interview With Lee Easson and Odd Infinitum

For this perceptive podcast, I interviewed self-taught indie developer Lee Easson about working on his first game Odd Infinitum. We discussed what it’s like to learn game dev today and how that has changed over the years and the challenges it brings to indie developers.

On Super Mario World’s Score Display

Awesome Mario trivia blog Supper Mario Broth noted on Mastodon that Super Mario World is extremely inefficient in displaying Mario’s score.

There is more information on SWMspeedruns.com, but in brief, SMW stores the player’s score as a 24-bit value as hexadecimal digits, and converts that value to decimal when it’s time to display it. There is no good way to do that that doesn’t involve figuring out the entire arithmetic, but Super Mario World does it particularly slowly: it starts with a copy of the score, then sees if it’s over 1,000,000. If it is, it increases the millions digit of the displayed score by 1, subtracts a million from the work value, then repeats. When it runs out of millions it repeats with the hundred-thousands, and repeats until it finishes with the tens. At least it doesn’t try it with the 1s, seeing as how nothing in the game awards single points!

In a worse-case scenario, with a score of 9,999,990, the code goes through this whole process every frame, consuming up to 8% of the time available for game logic.

What could the game have done to accomplish this better? It could have found out how many of each digit there was once instead of looping and incrementing. It could only figure out the score when the value changes. Or it could save the value as the digits themselves in decimal, just increment them by the right values when its needed, and then copy that figure to the screen. That’s largely what 8-bit games would do.

Even worse, if Luigi is the active character, the game does this twice: it figures out and prints Mario’s score, then it does it again for Luigi’s score, placing it onscreen in the same place.

While printing the score is just one thing the game does each frame, the effect is great enough that complex scores can lag the game, enough that speedrunners take the score into account to avoid it.

This adds to the evidence that Super Mario World development was rushed. It’s already known that a lot of the code in SMW is buggy, allowing for some truly heroic exploits like programming a text editor in SRAM purely by manipulating objects in an early level.

More From Displaced Gamers on Dr. Jekyll and Mr Hyde

We presented Displaced Gamers’/Behind the Code’s video on the jankiness of kusoge disgrace Dr. Jekyll and Mr. Hyde back on Saturday. They did another video on that game, that delves into why the game’s frame rate is so inconsistent. In summary, its engine throttles its framerate in a terrible way, using long delay loops. It’s a pretty awful idea! It’s 19 1/2 minutes long. The video claims it’s even geekier than their first video on the game, but I think it’s actually slightly less technical, at least it doesn’t fill the screen with as much 6502 assembly code.

Another fact about J&H: the Japanese version had two full levels that were cut from the U.S. version, which replaced them with replays of other levels. It made a bad game even worse!

Now, because of Behind The Code, you know more about the Dr. Jekyll and Mr. Hyde game than many much better NES titles. Congratulations!

Behind the Code: Dr Jekyll and Mr. Hyde

For some reason there’s been a lot of Youtube videos lately that fit our eclectic purview, so here’s a code-heavy dive into infamous NES disasterpiece Dr. Jekyll and Mr. Hyde.

It’s 19 minutes long, and is even geekier than is usual for us, going into a disassembly of the game’s machine code in its quest to make the game marginally less awful.

As long as we’re on the topic, here’s Jeremy Parish’s NES Works episode on Dr. J & Hyde, which is also 19 minutes, and also covers the somewhat better (but not hugely so) game Amagon:

While we’re on the subject, did you know that Jekyll & Hyde has a secret ending? Both endings are shown here (4 minutes):

The “bad” ending is the normal one, and shorter, but is arguably a happier conclusion to the story. To get it, all you have to do is get to the end of Stage 6 with Jekyll. That’s all.

To get the other ending, get to Stage 6 with Jekyll, then turn into Hyde and get to the end of his version of the stage. Usually, if Hyde gets as far into his level as Jekyll has gotten into his, he’s struck by lightning and dies. But in this level he’ll be allowed to reach the end of his version of the level for some reason, where there’s a boss! Beat it, and when you return to Jekyll’s world the enemies will be gone, and he’ll be free to finish the level without harassment. However, ending events will be different….

SjASMplus

No image this time. There’s nothing to take a screenshot of! SjASMplus is, simply, a cross-platform assembler targeting the Z80 platform, the processor that runs many classic arcade games. (I refuse to say “powers,” that’s not what that word means!) If you have interest in writing new games for old arcade platforms, it’s something you’ll need.

It’s the holidays still, and I’m trying to unwind a bit. I’m failing, but at least the effort is there: the effort to reduce effort. Maybe someday.

Godot 4.2 Released

Events often resist efforts to package them up and stamp a Convenient Narrative on them, but it’s really tempting to me to say the history of the internet in this era is that of many people rejecting the hegemony of large corporations and doing things for themselves.

Social media has seen the rejection of Twitter, for reasons I really don’t want to hash out again here, and while some ran directly to Threads or Bluesky, a good number realized it was eventually just going to happen all over again, and that helped to increase the update of open source, federated work-alike Mastodon.

Another piece of this narrative vase that we might be able to fit into place, with creative thinking and a whole lot of glue, is the downfall of Unity and how it helped the effort to create the free open source gamedev replacement Godot. And lo, after a fairly recent release of 4.0, yesterday they already released 4.2. The changelog is here. Here is GDQuest’s rundown of the changes (22 minutes), and here are Lukky’s five favorite new features (3m), which are:

  • FSR 2.0 support (upscaling higher resolution output from lower resolution rendering)
  • Color-coding of folders in the file hierarchy within Godot’s UI
  • The ability to “bake 2D navmeshes”
  • When resizing 3D objects, the UI no longer resizes symmetrically around the object’s origin by default, but instead only the side you’re changing is modified
  • And, within the code editor, you can now create special comments to define a code region, which can be independently collapsed to reduce clutter, and expanded when you need access to its contents. And the Ctrl-K Comment Out feature works better now.

To get back to talking about software philosophy…. There are unique problems with using fully open tools to create games. Console manufacturer devtools are still locked in a mode where the maker hands you proprietary libraries, which they are unwilling to make freely available because of their economic desire to preserve trade secrets and control their platform. Most developers get around this by going through a third party, who has independently created a system of working between the open development framework and the publisher’s libraries, and then licenses it to a studio so they can get their project working on consumer hardware.

Godot is subject to this limitation, with 4.2 being no exception. But there is a sense, with it, that it’s the brightest hope for free and open game development going right now. They don’t ask for any license fees, they don’t try to count how many installs you have and they don’t track user behavior. But because they don’t try to claw in income through direct means, fair or foul, they must survive off of contributions. If you find Godot useful to your work, please consider using their donation link and signing up for an entirely voluntary plan.

Pixelfont

Pixelfont is a neat web tool that will take an image you provide, laid out in the proper format (which you have some control over, like character width and height) and will turn it into a pixel TrueType font for you to use! The gamedev applications of this should be obvious.

This isn’t the first free online font-building tool of this nature. The classic in the field is Fontstruct, which can also produce pixels that aren’t square, and can even extend outside of their cells, but also shows ads (although unobtrusive ones) and doesn’t let you import an image. Still, both are rather of use, or at least are fun to play with!

PixelfontFontstruct

New Super Mario Bros. Wii’s Exception Handler Code

Codes are largely a forgotten element of video gaming. They started out as debug features that didn’t get removed before release, then they became easter eggs to reveal to favored players, ways to dispense unlockables, ways to provide extra difficulty balancing, and even publicity tools, before the age of DLC gave developers a way to profit off of bonus features. Why have players enter up-up-down-down-left-right-left-right when you could just sell them play advantages outright. I’m simplifying the situation a bit, sure, but I’m not simplifying by much.

Codes still exist, once in a while, but it seems like they’ve gone back to being development aids. One of them crept into New Super Mario Bros. Wii, but only becomes usable if the game crashes. The code is: Home, Minus, Plus, Minus, Plus, 1, 2, 1, 2, A. It brings up a scrollable register dump and stack trace, and other assorted information. It doesn’t let you continue playing. For players, it’s just a curiosity, but it’s a thing that is interesting.

This video shows it off:

New Super Mario Bros. Wii Exception Handler (Youtube, two minutes)

A Forum Post About the Dithering in Return of the Obra Dinn

Dithering is a method (actually, several methods) of simulating more shades or colors than the hardware is capable of, by producing an array of dots that generally match the colors. One of the qualities of the classic, original Macintosh platform, which used a black-and-white monitor, was the way that it used dithering to give the impression of grayscale shading.

Nowadays most display devices are capable of, in Mac terminology, “millions of colors.” Macs are far from the only devices to have used dithering, but it’s a quality particularly distinctive to them.

There is an excellent article, here, written for developers but clear enough that many non-coders can understand it, that explains how its done, and demonstrates many styles of dithering. Interested readers may also enjoy this article, also on dithering. These pieces, all by themselves, are enough reason to make this post, but they’re not really the things that I want to draw attention to today.

The indie hit Return of the Obra Dinn, from five years ago, is notable because it’s a 3D game, but it uses black-and-white dithering, applied in real time, to do its shading as an aesthetic choice, and the effect is striking. Not just for the dithering, but because the dithering is stable; its dots don’t jump around in a randomish manner, but tends to look like an applied texture, even though it’s generated by an algorithm. You can see for yourself in this trailer:

The cool thing is (and I think it’s linked from one of the articles I presented above), the creator of Return of the Obra Dinn, Lucas Pope, wrote about dithering in a post on TIGsource while the game was in development, and he explains the experiments he ran to get the shading to work and be stable. I recommend graphics programmers to it without hesitation, and others might find it interesting to. I know I do! Have a look!

One of Lucas Pope’s dithering experiments

Forum post describing dither experiments done for Return of the Obra Dinn (TIGsource)

The Lost Sound Code of Sinistar

Sinistar was a game that had quite an impressive sound design. It borrowed a bunch of its sound effects from earlier Williams games, with which it shared common hardware that was originally design for pinball machines. A cockpit version of Sinistar, of which only around 200 units were made, was the first arcade game to have stereo sound. And of course all versions of the game have the Sinistar’s famous digitized threats and taunts.

While Sinistar’s main program source code was found and made available on Github, the source of the code that drove its sound hardware has long been lost. Youtube user SynaMax has done the best he could at recreating that code, and has made a video talking about the process, the sound design of Sinistar and other early Williams games, and even found unused sounds in the code.

Contained within the code is the revelation that the sound chip that drove the rear speakers in the cockpit version ran slightly different code than contained within the main sound ROM. The data from that version of the game was only dumped this year, meaning that the game running in MAME was somewhat incorrect.

Now that the right version of the chip has been dumped, the cockpit version of Sinistar now sounds properly in MAME. Although this does mean that users running up-to-date MAME have to refresh their romset for this version of the game. Such are the tradeoffs of MAME emulation.

Another revelation of the video was that the parametric sound generators used by Williams arcade games from that time often produced interesting noises if it was fed with random data. Sound programmers sought out different sets of numbers to give them, including by asking passers-by for numbers off the top of their heads and garbage values found in RAM when dev systems were powered up, in order to produce strange sound effects.

Devs using more recent parametric generators like bfxr, LabChrip, ChipTone, sfxia, rFXGen, wafxr and jfxr can produce noises by similar means using those programs’ Mutate or Randomize buttons!

I feel like I should warn however, near the end of the video is mention of a bit of drama concerning the MAME developers, in getting code supporting the change integrated into the software. I’m not weighing in on this, not the least reason being I don’t know enough about it. But I feel like you should know it’s coming, ahead of time, before embarking on the 51-minute journey.

Rescuing the Lost Code and Stereo Sound to Sinistar (Youtube, 51 minutes)

More on the Terribleness of NES Strider’s Programming

A while ago Displaced Gamers, as part of their great Behind The Code series, did a video about how awful NES Strider’s sprite updating was. Arcade Strider was huge hit and outright masterpiece, a great arcade platformer released right before fighting games took over game rooms around the world, but NES Strider was a wretched thing, full of big ideas but with code woefully unable to live up to them. Imagine a puppy trying to do your taxes. It might put up an adorable effort, but it’s just not going to get the job done.

We linked to their last video examining its malformed construction. Well, Strider is the well of crap that keeps on gushing, and so Displaced Gamers has another video on the subject of the flaws in its programming, this time about its player physics. Walking into walls causes Strider Hiryu to shudder in place; jumping beneath a low ceiling causes him to bump his head repeatedly as his jump continues even though there’s no room to ascent; and his infamous “triangle” wall jump is so wonky that it literally requires a frame-perfect input to pull off, and not even the right frame. You have to jump the frame before you contact the wall!

Here is the new video, which explicates the entire cruddy system. It goes into exquisite/excruciating detail, including tracing the code and examining Hiryu’s X and Y coordinates on a frame-by-frame basis. It’s the kind of deep geekery that I just know you love/hate! Enjoy/despair!

The Physics Nightmare and Bizarre Jumping of Strider (NES) – Behind The Code (19 minutes)

OpenGameArt

It’s just a pointer to a useful site today. OpenGameArt has been around since at least 2009, a place where people can upload game assets they’ve created and make them available to developers, with a variety of licenses. Back in 2013 I used music from it for my own Gamemaker game Octropolis, properly credited of course.

Games made with freely-available resources sometimes get a bad rep, but they can be invaluable for small-team and single developer projects, or anyone trying to get their project off the ground.

OpenGameArt