Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2017-06-30 23:08:32

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Bubble Factory - a new game!

Hi everyone!

I just finished my second Game Boy game!

http://donaldhays.com/projects/bubble-factory/img/screen.png

Webpage | ROM Direct Download | Source

For this game, I decided to use C instead of Z80 Assembly. But I didn't want to use GBDK, because I tried GBDK when I first started programming Game Boy, and found a few too many situations where it compiled to code that was semantically different from what I entered for me to have confidence in it. I considered using GBDK-N, but instead decided to just program directly to modern SDCC. I didn't have a strong justification not to use GBDK-N, just that I wanted to roll everything myself.

Speaking of rolling everything myself, I didn't use SDCC's makebin utility at the final stage of the compile pipeline. Instead, I wrote a script called ihx2gb, which is bundled in the repo. I was partially motivated to do so because I wanted a bit more command-line control of the ROM's header fields than makebin offers, and, more importantly, because I think I can add support for banking on modern SDCC in that script. This game doesn't use banking (it's less than 32KB), and ihx2gb doesn't support banking yet, but I think I can add it. If I can, I think that could be very helpful for people on GBDK-N.

Offline

 

#2 2017-07-01 05:21:21

svendahlstrand
Member
Registered: 2016-12-07
Posts: 17
Website

Re: Bubble Factory - a new game!

Wow, this game is polished. I love the Game & Watch style, great work! I get the feeling that pressing the A button isn't needed to pop the bubbles tough, is that the case?

I've played some with gbdk-n but I will take a look at your "vanilla sdcc" approach. Thanks a bunch for keeping the source open! Are you planning to release it under a free license as well?

https://i.imgur.com/oCOYO5Q.jpg

Offline

 

#3 2017-07-01 11:57:50

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Re: Bubble Factory - a new game!

Thanks! Game & Watch was a very direct inspiration for the game. One-screen, high score gameplay, gets tougher as you go, 3 misses and you're out, opportunity to erase misses at 200, 500, and 900 points, etc.

You're right that the A button isn't necessary, you can also push the d-pad in the direction of a bubble to pop. There's lots of little details in things to try to make it "feel" good, including buffered input (if you press up and then right while you're still moving up, the game will remember you pushed right and send you to the right once you finish moving up), if you try to pop a bubble and there's two bubbles in popping range it'll pop the one that's closer to the end of the path, and the collision boxes on the guards are pretty small so you never feel like you were caught by a guard but shouldn't have been.

I hadn't thought about attaching a license to the code, but I really probably should. I have no problem with people harvesting anything from my code that they find useful, so if I attach a license it'll be on the very permissive end of free licenses (can be used free or commercially (I mean, this is the Game Boy we're talking about, but still, one can dream), no need to open source derived code, no need to attribute credit).

Offline

 

#4 2017-07-01 18:29:40

Jonas
Member
From: Frankfurt, Germany
Registered: 2016-06-06
Posts: 112
Website

Re: Bubble Factory - a new game!

Nice game. smile The graphics look really good and it's easy to understand and to control. Music would improve the overall impression.

I wonder why you use C if you're able to use assembly. I started with C and am currently teaching myself assembly, and the more I learn the less reasons I see to return to C.

Offline

 

#5 2017-07-01 21:15:09

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Re: Bubble Factory - a new game!

While there is a very real CPU speed and compiled code size advantage to Assembly, I found myself to be far more productive in C, because I wasn't needing to juggle registers or write many basic low-level routines (like, for starters, 8-bit multiply or divide). Instead, I was able to focus more on just writing the game itself, and it really surprised me how quickly it went. I started this project only about a month and a half ago, and only spent a few hours per week on it. I can't imagine I spent more than 40 hours total. There were only a few spots where the performance became problematic enough for me to write a routine in ASM (in particular: updating the tiles for the machines and belts during vblank). But for everything else, the performance and compiled size was reasonable enough that I consider the productivity gains I enjoyed to make the use of C a win.

It's not that I couldn't have done the game in Assembly, it's just that I was having more fun and moving faster developing it in C.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson