Soup Raiders:

Jailbreak

Elias Farhan, Pixel Coder

Elias Farhan

Co-Founder of Team KwaKwa
EXTREME GAME JAM HUNTER
Spiritual Animal: Cat
Bachelor in Computer Science
Master in Game Design

Disclaimer

I am not a super programmer of the past.

I was even born after the Game Boy came out!

Game Boy Jam

  • 10 days
  • No theme
  • Resolution: 160x144px
  • 4 colors palette
  • Sort of the same input than the GB

Why the hell would I do a game boy game?!?

  • Challenge
  • Out of my comfort zone
  • Full nostalgia
  • Put the Soup Raiders universe to practice

Todo list before the jam

  • How to show a sprite and animate it
  • How to show a tiled background
  • How to put music in the game
  • How to put sounds
  • How to use rom banks AAAARRRRGGGG
  • How am I going to be able to do that in 10 days?!?!
  • KIIIIIIILLLLLLL MEEEEEEEEE

Game boy specifics

  • 8 bits system, 8kB RAM, 8kB VRAM
  • no floating point number, no multiplication and no division
  • Assembly or C programming (no class :((((( )
  • 4 channels (2 pulse waves, 1 PCM 4bits wave sample, 1 noise generator)
  • 59.7 FPS
  • 2 bits color, 4 shades of "grey"
  • No palette color switch like in the game boy color

The Soup Raiders Universe

A whole world in a soup.

A family at table, two godly children, Kevin and Bruno.

Kevin, the destroyer of worlds, eating before anyone say "Bon appétit".

Bruno the benevolent is not so hungry and is watching his own soup.

In the soup, a tempest near the occidental soup.

A simple game to create...

A platformer is probably one of the simplest game genre to create a game for.

A dungeon platformer would be perfect for a more puzzly effect.

Ref: Crazy Castle for GB

Soup Raiders: Jailbreak

You control Black Whiskers, who was captured with his friend, White Fur, and who was locked up in the deepest cell from Mr. Whale.

Escape by finding the keys, while White Fur is patiently standing still. Come on, she won't wait all day!

Gameplay

  • Move
  • Jump
    • On enemies
  • Climb
  • Crawl
  • Get Keys
  • Open doors

Disclaimer

Most of my code is a big chunk of hack to make everything work.

Available here: https://github.com/EliasFarhan/GBDev

Getting the movement right

Moving at 1 pixel per frame,

Jumping at 3 pixels per frames and with a gravity of 1 pixels per frame per 5 frames (THIIIISS IS PHYSICS),

Crawl into holes to go on the other side,

Climb walls and platforms to go higher (every box are climbable).

Box physics

Everything is box!

Each panel ("level"), each enemy, and the player character have a box around them.

If the player comes from the side it pushes back.

If the player comes vertically, it pushes back too.

Consequence: Speed-run mode :D

Level Design… in the code...

At the end, the game is just a binary, so your level design has to be in the binary and written by hand in C.

It literally means to put numbers in arrays…

:'(

Plus placing the platform box at the right place.

Sprite vs Background

Sprites can be moved, but only 40 sprites maximum on the screen and 10 per line.

Background are set in stone and set in a tilemap.

Both are generated from the same software: GBTD.EXE

Your artists will love it :-*

And it works on wine for Linux and MacOSX lovers.

Big Images

Typically for Logos or Title Screen, you can use a .bmp image and directly put it on the screen.

GBTK.EXE allows to translate from BMP to the GameBoy Binary format.

Be ready to put the images in other ROM banks :(

Rom banks

Allows to extend your rom memory from the very limited 32kB main rom memory to 8mB.

BUT… You can only access the main rom memory + one other rom bank at the same time. And you have to switch manually…

KIIIIIILLLLLLL MEEEEEEEEEE

Crashes

When you write C code on your computer, you can eventually break thinks, then SegFault and you open GDB to see where it crashes.

When you write for GB, you see a blank screen and you have no idea where it crashed...

Cat Programming

Change a value, check?

Change an other value, check?

Change back, check?

Change something, check?

It works, I have no idea why… BUT LET'S NEVER TOUCH THIS VALUE AGAIN.

Music

Use a tracker to make the music in .mod

Use a simple C script to convert the .mod to gb format.

Use gbt-player to play the music in background in game.

You probably want to put the music in another bank again D:

Sound

You can use .wav, but you freeze the whole game for your sound to play ;) (for example pokemon sounds)

You can use things that I still don't know how to use… I just looked other homebrew and sort of copy-paste…

DDDD:

In short

The game boy system is really hard to fully master. If you want to jam on it, take the time to implement things before the jam.

And be ready to multiply the time you normally implement a feature by 10.

Arduboy

An "easier" alternative.

Arduino "C++"

2kB of RAM with 1.2kB used by the system (GB: 4kB)

32kB of ROM (GB: up to 8Mb with ROM banks) with 12kB used by the system

1bit color

Next project?

Kirboy's Dreamland on Arduboy

Should be done for 1st of August for the 25th birthday of Kirby.

Thanks!

Soup Raiders: Jailbreak - Google Slides