Dear Reader:

You are viewing a story from GN Version 5.0. Time may not have been kind to formatting, integrity of links, images, information, etc.

Digital Eclipse details one of the many struggles they faced bringing Minecraft to the New 3DS

by rawmeatcowboy
15 December 2017
GN Version 5.0

Wondering how Digital Eclipse managed to get Minecraft on the New 3DS? Seems like something that should have been impossible, right? Well the process was certainly a trying one. There were a lot of hiccups along the way, but the dev team involved was dedicated to making it happen. Sometimes it involved coming up with custom solutions along the way. You can read about one of those examples below. The info comes from Keith Kaisershot, a Programmer at Digital Eclipse.

Throughout the development of Minecraft for 3DS we were hurting for memory, even on the more powerful New 3DS. So we wanted to play around with some of the texture formats the 3DS supported. The 3DS's internal texture format is weird. It's tile-based, organized in a zig-zag pattern of zig-zag patterns, but then organized linearly at the highest level.

Unfortunately, nobody on the team was familiar enough with the compressed formats to write a conversion utility. Another programmer, Ian, had previously written a texture converter for Mega Man Legacy Collection, but that was more about uncompressed pixel data.

That custom texture converter of his took a .png and spit out a ".3dst" file with a custom format that he invented – it was essentially a minimal header plus raw data we could just blast into memory ready to go ("3dst" stands for "3DS Texture"-- pretty clever, eh?).

Nintendo provided their own conversion utility but it only exported images into a "package" file which you had to use Nintendo's library to parse and load at runtime. That was too much overhead for us. Unfortunately again, that file format was undocumented by Nintendo and this appeared to be the only way to get compressed images arranged in the format the 3DS expected.

So I decided to get my hands dirty in a hex editor. I fed Nintendo's utility various images of different sizes and formats and made note of what changed in the header of their files until I had identified enough fields to rustle out the data I needed. I threw together a quick utility to extract the raw data from Nintendo's package files, then put together a batch script to apply this process to the textures we needed. It wasn't fast, and it certainly wasn't elegant, but it worked.

[Link]