GB Studio & BB Studio

GB Studio, by Chris Maltby, is fairly well-known now, isn’t it? It’s a free and open source solution to fairly easily making Gameboy roms on your own, that are properly termed not romhacks but homebrew. It has its own website and it’s available on itch.io. It was what Grimace’s Birthday, which we linked to last year, was made with.

GB Studio, from its platformer template

Now there’s a heavily-modified version of GB Studio, called BB Studio, that produces NES roms in a similar manner! It’s made by Michel Iwaniec, and can be gotten from Github here. It’s recommended that you be familiar with GB Studio first, and to read the list of caveats on the page. Particularly, the NES supports fewer sprites per scanline than the Gameboy hardware does, and runs at a slower clock speed. BB Studio is also “early alpha software,” meaning, it might or might not work well for you at the moment.

While we’re on the topic I should also mention NES Maker, which isn’t free, but it also isn’t “early alpha software,” and at $36 isn’t expensive either, and is custom-built for generating runnable NES games.

Score Keeping on the NES

Sometimes I feel like I should put a content warning here when the technical level of a post is higher than usual. This one would probably be a five out of five for geekery. It’s a video from NESHacker on counting score on the Nintendo Entertainment System. But I don’t want to discourage you from watching it! It’s nine minutes long, and it contains a definition of the term double dabble.

Human-readable numbers are tracked by computers in a number of different ways. Nowadays we basically just do a printf or some version of it, but on a 1 megahertz platform, optimization really matters. It’s easy to think of computers as being impossibly fast, but in truth speed only ever counts relative to the efficiency of the algorithm you use. Computers are fast, but they aren’t all that fast.

One of the big tradeoffs in processor design is, fewer complex instructions that do a lot but take a lot of cycles, and processor complexity, to execute, or many simple instructions, each doing little and being relatively simple, and not needing a complex processor design to implement.

The 6502 microprocessor generally follows the latter design philosophy. It made some important tradeoffs to keep costs down. For example, it doesn’t have hardware that can multiply arbitrary numbers together. It relies on the programmer, or else a library author, to use the instructions given to code their own multiplication algorithm, if they need one. The result is going to be slower, probably, that if the chip had the circuits to do this automatically in silicon, but it reduced the cost of the chip, basically allowing more to be made, or else increasing the profits for the manufacturer.

Personally I’m a fan of just storing the score as a series of digits that match up to their positions in the character set. Gain 1,000 points? Just bump the 1000s-place up by one, and if it goes past 9, subtract 10 and bump the 10,000s place. That’s a tried-and-true system that many games use, and works well if all you ever have to do is add numbers. Comparing values, like for detecting extra life award levels, make things slightly more complex, but not by much. There’s sometimes other factors involved though, and that may explain why Super Mario Bros. uses different systems for its counters, as explained by NESHacker.

The End of Masahiro Sakurai on Creating Games

He mentions that it’s possible that he might dust off the channel from time to time, but that he feels it has accomplished its mission. Here it is (46 minutes):

To remind everyone: Sakurai is the famed creator of Kirby, Meteos and Smash Bros. In the video, he relates the surprising fact that no only did he write out nearly every script, 256 in all, before the first episode even aired, but he also filmed them all in advance too! That’s why he looks older in this video: it’s the first time he’s been before the camera, with just three exceptions, since it started. The video, in fact, is mostly about how the series itself was made, which as it turns out was done without a camera crew, and in a residence of his too, outside of a recording studio and without soundproofing, so production had to pause if am ambulance drove by outside, and couldn’t happen at all if it was raining.

I have no doubt that these videos will be an important document in the coming years, not just as a guide to making video games, but also preserving the processes of current-day game development, and the words and thoughts off one of the foremost game designers of our age. BTW, note the split second of Rogue at 18:58!

The video has always had a feel like maybe Nintendo was helping out with it, but as it turns out, other than approving the use of their game footage, they weren’t greatly involved. The similar feel may be due to the use to HIKE, a.k.a. QBIST, a production company that Nintendo also uses for some of their videos.

To close this out, I’ll link a short bit from earlier on, at a mere 2 1/2 minutes, the video about Sakurai’s cat, Fukurashi. Meow, or perhaps, nya!

Ed Logg on Creating Gauntet

Recently I’ve been working on a getting-started guide on what I think is one of the most interesting games in UFO 50, Pilot Quest. (Other games I’ve really enjoyed, though I’ve by no means tried every game in the collection yet: Magic Garden, Waldorf’s Journey, Planet Zoldath, Attactics, Kick Club, Onion Delivery, Porgy, Valbrace, Grimstone and Mini & Max.)

Guides take time, so in the meantime here’s an hour-long talk by Ed Logg on the creation of Gauntlet, from GDC 2012!

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

Kaze Emanuar’s Adventures in Mario 64 Optimization: Calculating Sine

I’ve mentioned Kaze Emanuar’s efforts to make the best Mario 64 there can possibly be on its native hardware. He’s compiled it with optimization flags turned on, made its platforming engine much more efficient, and worked hard to minimize cache misses, which was a major source of slowdowns in the game’s code. Under his efforts, he’s gotten the engine running at 60fps (although not yet in a playable version of the original). While these optimizations are not the kind of thing that can keep being found indefinitely, he’s bound to run out of ways to tune up the code, currently he’s still finding new ways to speed it up.

I hope you’re ready for some F-U-N (approximation FUNctions)

He made a Youtube video detailing his most recent optimization find: getting the game’s trigonometric functions executing at their speediest. What is interesting is that the Mario 64 code already uses a couple of tricks to get sine and cosine results in a rapid manner: the game only uses 4096 discrete angles of movement direction, and contains a lookup table that covers each of those angles. But it turns out that this optimization is actually a mis-optimization, because the RAM bus hits incurred to read the values into the cache are actually more expensive than just figuring out the values in code on the N64’s hardware!

The video starts out decently comprehensible, but eventually descends into the process of figuring out sine and cosine on the fly, and the virtues of the various ways this can be done, so you can’t be faulted for bailing before the end, possibly at the moment the dreaded words “Taylor series” are mentioned. But it’s a fairly interesting watch until then!

Turbo Rascal

Turbo Rascal, more fully known as “Turbo Rascal Syntax Error” or TRSE, is a multiplatform game and demo development system, including a compiler, afull IDE and some miscellaneous utilities like an image editor. It’s based on Pascal, which might be annoying to people who have the conventions of C burnt into their brainmeat, but is easier on newbies on the whole, since its language idioms tend to be more readable for intent, and it doesn’t include structures like the ternary operator: (a ==0) ? isequal() : isnotequal();

While it supports a lot of different classic computing devices, TRSE’s “native” platforms, those it has the most support for, are the 8-bit Commodore machines. Using it, you can pretty rapidly put together a program to display an image on the C64’s hi-res screen:

It comes with a lot of example projects too, including a number of technically proficient demos that show off its capabilities. After you install a C64 emulator (VICE is recommended), the following can get up and running in less than a minute:

Turbo Rascal Syntax Error

The Arcade Blogger on the Development of Xevious

December 30th of last year, The Arcade Blogger did a piece on the creation of Namco’s classic vertical shooter Xevious.

Xevious was modestly successful in the US, where it was produced by Atari, but it Japan it did amazing numbers. Jeremy Parish (in his NES Works and related series) has mentioned several times that it was a vastly influential game in Japan, inspiring a whole generation of designers, and a whole bunch of clones and similar games. Its US release was around the time of the arcade crash, which was mostly an American thing. If it hadn’t had happened, maybe now we’d think about Xevious the way we consider Pac-Man.

The team behind Xevious

Xevious basically invented the vertical scrolling shooter where your ship has free movement of the screen. It also included a Bomb button to attack objects on the ground, displayed on the game’s background layer. It was a concept that would later be iterated upon in Konami’s Twinbee games.

Revealed in the article is an interesting fact. The scrolling background is stored in ROM as a huge 1024×2048 bitmapped image. That’s much wider than the screen is though. What the game does is send the player into a vertical portion of it 224 pixels wide.

When the player reaches the top, they wrap around to the bottom of another vertical stripe of the game world. In a complete loop, the player will travel from the bottom to the top 16 times. You can tell when you’re about to start another loop because the background will reach a place with trees all the way across!

You always start off a life in a tree-filled area because it begins you at the bottom of a stripe; each vertical pass over the map functions as a checkpoint. The stripes overlap somewhat, so you sometimes pass over an area you’ve seen before but offset by a bit.

For more facts on Xevious and its development, be sure to click through to the article!

The Arcade Blogger: The Development of Xevious

Classic Game Dev Andrew Braybook On Computer Conversions

Andred Braybrook is a legendary computer game dev from the Commodore 64 age, and before and after. In addition to the classic C64 games Uridium and Paradroid, which perform feats of scrolling that machine are really not designed for, he went on to many several other games, including the excellent computer ports of Taito’s sequel to Bubble Bobble, Rainbow Islands.

(Although Braybrook mentions that Taito hadn’t told him about the three secret islands that can appear at the end, so they got left out. They didn’t know about them either!)

Image from Braybrook’s blog

He has a blog post that details many aspects of he and his co-workers’ process back then that is fascinating to anyone with knowledge of these platforms, and even someone who doesn’t. Thanks to @acb@mastodon.social for the link!

Andrew Braybrook: How We Made Computer Game Conversions, from his blog

Breath of the Wild Cel Shading Break Glitch

The Legend of Zelda: Breath of the Wild is a gigantic game, and where content proliferates, so too do bugs. Many of these bugs are highly entertaining (my favorite is the bullet time bounce), but there are some that are just head-scratching, leaving one to wonder why does this happen? That the occur pulls back the curtain on the many technically complex things a big game like BotW does behind the scenes to realize its world, for, every step of a process that a system must go through is one more opportunity for something to go wrong.

Image from Nintendo Everything

Youtuber Jasper has made a 35 minute video about why, if Link stands in a specific spot in BotW, inside the broken corner of a stone wall, the cel shading usually applied to his model goes away, and he appears with normal light shading. In the way of Youtubers, the explanation is contained within a 35-minute discursive video that goes into the history of game lighting, why some older 3D games have graphics that have aged well while others don’t, the basics of cel shading, and still other topics. Here is that video, embedded:

The whole video is pretty interesting, and if you have the time and interest you should watch the whole thing. However, in the event that this is all tl;dw, allow me to summarize.

  1. Because Breath of the Wild is both a huge game and has a dynamic world, baking lighting in into textures would consume way too much storage and memory, so lighting has to be done dynamically.
  2. As an optimization measure, the more complex steps of cel shading are deferred to later in each frame’s rendering. The main rendering is done, then the cel shading is applied afterward, when the visibility of the area has been determined, so this effort-expensive process is only done for visible pixels.
  3. One of the deferred steps of rendering marks which of nine different kinds of material will be applied to each pixel. Terrain in BotW is not cel shaded, while characters link Link are, so they have different types of material that determine whether that shading is applied to them.
  4. In the location where Link’s cel shading disappears, there is a decal applied to the crumbling bridge that erroneously extends over the corner, and overwrites Link’s character material type with the terrain material, causing the cel shading not to be applied to him.