Gameboy Game

Hello Gameboy.

This is part of our “How to make a …” Series.
I call this the “Hello Game” Tutorial (like Hello World Tutorials but for Retro Games).
Did you remember your childhood when you took your gameboy to shool or in the bus or whatever and could just play games everywhere you want ?
And maybe some of you (like me) thought : wouldnt it be cool to make your own Gameboy Game ?

Well i was a young boy and didnt had experience with programming or something.
Games like Mario Land, Amazing Spiderman, Balloon Kid, Zelda and Gargolyes Quest was inspiring me.

Years later now i could figure out how Game Boy Games are made so here we go.

What do you learn

In this Tutorial you will learn how to build a simple gameboy program.
Our goal is to print “Hello Gameboy!” on the Screen.

Prerequisite

 

Get Started

First extract the gbdk-2.94-win32.exe (it is an autoextract archive).
extract

So your files are now in c:\gbdk (if you didnt changed the path).
Open an explorer and move to c:\gbdk\bin folder and create a new file called : main.c .
Make sure that file extensions are visible in your folder settings (otherwise you wouldnt notice if you create main.c.txt for example).

mainc
Now lets start coding. Open main.c with your favorite editor.
Write the following Code in the Editor.

Save the file.

Now start a CMD and move to the gbdk\bin folder.

We want to compile now our Gameboy Programm so we write the following in the CMD.

If you have XP or below Windows 8 and you are not using Power shell just remove the .\

A file with game.gb should be now compiled in the bin folder.
So if you have downloaded bgb and extracted it somewhere you can now open the rom with it.
Right click your game.gb file select “Open With…” and then browse the folder to bgb.exe for your program.

If everything works as expected you should see this:

hellogameboy

Congratulation! You wrote your first Gameboy Program.

Sources for my research and Helpful Links: