Video Game Coding

Zelda DS

Open Source


The source code and assets for Zelda DS are now available on Github:
https://github.com/amaiorano/ZeldaDS


History


The history of Zelda DS actually began way back in 1998, about a summer away from starting my Computer Science degree at university. At that time, I had learned Pascal from a book, and had just completed an introductory C/C++ course at school. By then, I knew that I had been deeply infected with the programming bug - that my future was to be a programmer, but more specifically, a video game programmer.

I had already programmed a game in Pascal named Luthendar, along with the help of my close friend and digital artist, Simon, but it was not a tile-mapped game, like the ones we grew up and loved so much on the Nintendo and Super NES. So our next project, we decided, would be a Zelda 1 inspired game named, aptly, Zelda PC. Pouring ourselves into making this game, I learned the wonders of Mode 13h programming, while Simon spent countless hours putting together tile and sprite sheets made up of both original and ripped art. By the time we started university, Zelda PC was in pretty good shape, at least outwardly. My inexperience with both the language and with programming in general brought me to a point where I could no longer add features to the game without rewriting large parts of it, or breaking others. And so, Zelda PC was left aside as we progressed in our studies, and worked on other games.

Many years passed, within which I got a job as a video game programmer at Electronic Arts, and Simon moved to Japan and was hired as a video game graphics artist at Arte Piazza, where he worked on contracts for Square Enix. Around September 2009, after having just finished up Spore Hero, I decided that it was time to work on a personal project again. I set a few goals for myself:

1) Limited Hardware: most of my programming experience had been on PC or modern consoles, which have a lot of memory, and don't impose serious constraints. Since I loved the Nintendo DS, and had just purchased a memory storage device for it, I decided the DS would be my platform of choice.

2) 2D Graphics: although I had only worked on 3D games at EA, my original passion for games was still rooted in old-school 2D; and perhaps most importantly, procuring 3D models and animations would be much more difficult than obtaining tiles and sprites.

3) Complete Game: despite having over a decade of programming experience, I had never completed a personal project before. I wanted to make a full game, including title screen, menus, ending credits, along with a full editor that could be used to build the game.

I realized that without Simon around to help me with graphics, I would have to settle on the graphics I already had. So I dug out the tiles and sprites Simon had made over 11 years prior for Zelda PC, and decided that the game I would work on would be Zelda DS!


Time

Along with having a full time job, and being married, I also have a young daughter, so time to work on Zelda DS is certainly hard to come by. For these reasons, most of the work on the game is done while I ride the train to and from work, which totals about one hour per day. Working on such a limited schedule has been interesting, as it has forced me to be less of an idealistic perfectionist, and focus more on tasks that are more tangible or visible.


Tools

To develop Zelda DS, I use the very mature and well-engineered set of homebrew development tools provided by devkitPro. Although I considered using some third-party wrappers to speed development, I decided to restrict myself to using only the libraries that come with devkitPro.

To run the game while developing, I use DeSmuME, easily the best Nintendo DS emulator available.

I use Visual Studio 2008 as my IDE, and in conjunction with the gdbstub feature offered by DeSmuME, I use the very powerful Visual Studio add-in, WinGDB, to debug my code within the comforts of the Visual Studio debugger environment. I will eventually share how I set this up on this blog some day.