Stuff I Make:
I Explore:
Music:
Me:
Other Junk:
|
tags:
C++catskulldevdotsdots.cogameboygameboy colorhand-held legendhomebrewlow levelnintendoprogramming
Recently I applied to work for the Dots game company, and part of the interview process is to recreate their classic DOTs game in the Unity game engine. I had no problem doing that, so with my extra time I also made their Dots game for the GameBoy Color! This is my second GameBoy Color project, and it was fun to get back in the low-level C programming groove. The compiler is a fork of LCC if I understand correctly, and it works with the GBDK library, for GameBoy development. GBDK works both for the original grayscale (greenscale) GameBoys, as well as GameBoy Color. The compiler seems to be slightly glitchy due to the limited number of registers on the Z80-based GameBoy processor. Thus, sometimes perfectly valid code will fail to compile if the stack of operations gets too high for the compiler to turn into assembly. After I got the ROM compiled and working, my friend who works at Dots convinced me it needed to be a real physical cartridge. I did some research and found that Catskull Games will sell a custom flashed cartridge for $10, as long as the ROM size is 32KB or less. I made sure my ROM was under the size limit and just barely made it. Towards the end of development I started getting memory errors and I had to go back and optimize some code to make enough space to finish the game under 32KB. The cartridges that Catskull sells are compatible with both the original GameBoy and GameBoy Color, however I wrote Dots to only work on the GameBoy Color, since it’s a color based game. Back in the day, games that only worked on GBC were in special clear shells, unlike the ones CatSkull provided. I found some Clear GameBoy color shells available from Hand-Held Legend, and swapped the circuit boards to the new clear shell. After some time in Photoshop, I designed some Box Art, Cartridge Labels, and Instruction Booklets. The final product is below, and looks like an official Nintendo product: I had the boxes and cartridge labels printed at the Internet Garage. But they were closed for Easter, so I had the instruction booklets printed at TwinsPrint. Both print shops were super helpful making sure my templates printed to correct scale and all. If you want, you can read the instruction manual here: http://gmiller.net/assets/Dots_Instruction_Booklet.pdf The guys at TwinsPrint had a nice glossy paper that felt like the original Nintendo Instruction Booklets, and their machine was even smart enough to crease them automatically. All I had to do was cut them out carefully with a razor and straight edge. I used a single staple right in the middle just like the official booklets. At the bottom of this post there’s a quick video of the game in action, but below are some screen shots. The title screen was based on the older Dots logo for a couple reasons. First, it’s the logo the dots.co website uses when describing their classic game. But for technical reasons, this logo is smaller and easier to reproduce on the GameBoy Hardware without taking too much memory. Since the game was already close tot he 32KB limit, using their newer logo might have pushed it over the limit. I do like their newer logo, so I used that for the box art, labels, and instruction manuals. Since the original game was designed for touch-screen smartphones, I adapted the game to work with a D-PAD instead. The cursor can be moved around the grid of dots, and after selecting a Dot, you can chain to neighboring dots by pushing up, down, left, or right. As seen above, arrows appear next to the dot indicating your next available moves. After the 60 seconds runs out, a simple results screen appears showing your final score and your best score. The score is how many dots you cleared, so a score of 120 is pretty good – that’s two dots cleared per second. There is no battery-backup in the cartridge, so the best score resets every time you turn the GBC on and off. Below you can watch a video of the game in action: You can download the source code and ROM here: Source and ROM Below is a video describing the making-of dots for GBC. April 10, 2019 at 8:27 am | Code, Code Projects |