Hacker News new | past | comments | ask | show | jobs | submit login
GB Studio: Drag and drop retro game creator for GameBoy (gbstudio.dev)
376 points by CharlesW on June 17, 2023 | hide | past | favorite | 48 comments



I haven't really looked into it in detail, but AFAICT GB Studio is honestly incredible. I program the Game Boy as a hobby; this machine has basically no RAM and a CPU that's - depending on how you measure a "cycle" - either ~1MHz or ~4MHz, with a shockingly limited and non-orthogonal instruction set (and don't even get me started on dealing with bank switching). Historically games for it have been almost exclusively coded in assembly. And yet someone's come along and built a seemingly fairly flexible WYSIWYG game engine for it? If it didn't exist I would've told you it was impossible. I still don't quite believe it's possible, despite the proof being right in front of me.


Thanks, one of the things I’ve always tried to do (at work, before I started on GB Studio) is make difficult things seem easy and accessible. Though I’d have also told you this was probably impossible before starting too!

I just built it up slowly, making small tools to help me make sense of what was going on while learning GBDK, before I knew it pretty much had something I could package up. I’ve had a lot of help along the way though, untoxa’s [0] engine rewrite, and the work pau-tomas [1] did on the music editor have been especially helpful to the project.

Been a bit absent from the community recently, not had the time, but hoping to get back on it again soon!

I’m always amazed at how many awesome games people keep making though, it makes me really happy as this the first of many failed side projects that I pushed on through to completion.

[0] https://github.com/untoxa

[1] https://github.com/pau-tomas


Thanks for the incredible tool!


I love GB Studio. I plan to use it to make a movie but will release my “games” too. Are you active on Mastodon or Bluesky?


The gameboy had extensible RAM and flash - ie. a game cartridge could provide more of both if it wanted to.

I assume GB studio uses this to make it easier to make decent gameboy games without manually allocating every byte of ram in handwritten assembly.


GBStudio does use cart ROM banking (for code and assets), but extensible cart RAM (SRAM) is typically only used for save data if I remember correctly.

In general for Game Boy games the constraining factors are most often CPU and ROM (for large worlds and lots of graphics) and less so RAM.

Some of GBStudio's core is in C and some is in asm. The underlying compiler (SDCC) has been making noticeable gains in recent years, which helps. Plenty of room for SDCC to improve still, but very usable for projects.

FWIW, There is a large Game Boy homebrew competition put on by the community that just started this past week and runs for 3 months. (disclaimer: I'm one of the organizers)

Many participants (of all skill levels) will submit games written in GBStudio, and some will also write games in ASM and C.

https://gbdev.io/gbcompo23.html

https://itch.io/jam/gbcompo23


GB Studio is a great way to mess around with making a gameboy game! It exports a rom that can be flashed onto a blank cart, and played on real hardware—with recent versions adding gameboy color support. The recently hyped McDonald’s Grimace game was reportedly made with GB studio: https://gbstudiocentral.com/news/mcdonalds-celebrates-grimac...


Is there a recommended blank cartridge and flashing tool? I'm totally new to this.

Edit: to turn my own question, here's an article that goes over all the options: https://gbstudiocentral.com/tips/getting-your-gb-studio-game...


Oh! That page is a great resource! From the options listed there I’ve used the stuff from https://www.gbxcart.com/

It took a bit of reading to make sure I was getting the right cart for the job, but the flasher hardware worked well.


I made my third book’s cover with GB Studio to make sure I had the perfect look.

Gameboyessentials.com/book


I've been making a game using GBDK (C) and a little engine called ZGB for the past several years, but the work that Chris and the team have done on GB Studio makes me want to switch to the platform. I'll still finish my game using C because I'm so far into development now there's no point in starting over, but if I was starting fresh, GB Studio would be the way to go.

That said, I'm glad I made my game in C because I've learned so much more about coding. I feel like I get better every day. Not sure I would have that same experience using GB Studio.

One day I want to try using ASM...


It's amazing that this software exists. And any game you can make with it can be played on a range of new emulator hardware.

There's the Pocket Analogue, which is the high-end option that runs games directly from cartridges using two FPGAs, no emulation at all. https://www.analogue.co/pocket

And there's the cheap Miyoo Mini and the Anbernic handle-helds that let you run everything up to PS1 games on a tiny handheld. They have SP-style (vertical) and PSP-style (horizontal) versions.

It would be so cool to make a game and flash it onto one of these to show to your friends.


A nitpick: FPGAs aren't based on the hardware-descriptions used to create the original chips, they're based on the community's best guesses, so they're still emulation. They're just not software emulation. They might even be less accurate than software emulators, if the community has done more research since the last time the FPGA was updated.


Gotcha, that makes sense! I wonder if there’s any difference in latency/jitter. Or maybe the GameBoy is so old that it’s easily possible to run games without any lag at all.


Surely making a browser game would have the same benefits with fewer limitations?


It's the opposite. A browser game will stop running in few years due to the never ending browser standards. An actual GB ROM will be playable for as long as emulators exist - which is forever.


Are there tools for making browser based games that make it as easy as this does?

Also it looks like the ROMs that GB Studio generates can be run in an emulator on the web.


Construct 3 would be my suggestion.


That does look cool, but $20/month or $120/year =-\


Try GDevelop, that one is free but not quite as capable.


Most people don’t have good controllers for the devices running their browser.


I know firsthand that standard Xbox controllers work with all mainstream OSes (Windows, macOS, iOS, Android, iPadOS). The same's probably true for PlayStation ones as well :)


Absolutely. Still most people don’t have them. And do they just-work in a browser?


Once I paired it with my device, yeah :) I was pretty impressed with the seamlessness across all those different OSes!


Just in case anyone doesn't read deep enough to run into it:

> You can generate ROM files that can be run in an emulator, on a web page or on real Game Boy hardware.

Being able to play these on the web is very, very cool.


WOW. What’s the compile pipeline to get to valid ROMs?!

I need to dig deep when I get home. This is frankly astounding.


If you want to program the Gameboy or Gameboy color with C the SDCC compiler toolchain is typically used: https://sdcc.sourceforge.net/ There's a ton of good info and dev tools here: https://github.com/gbdk-2020/gbdk-2020


I used to contribute to the project back in v1 days. I'm not sure if the architecture has changed since then, but basically it worked by compiling the game logic as a kind of byte code that got interpreted at run time.


Like on top of the CPU’s opcodes? I imagine you mean the opcodes. That CPU probably can’t handle much abstraction. What impresses me the most is that to get performance out of these games, they’re often very carefully coded in the Sharp/Z80/8080 assembly. This compiler must be quite something.


It actually does interpret bytecode, you can see the opcode definitions here https://github.com/chrismaltby/gb-studio/blob/1f995a976bd3aa...

The trick is that a lot of the heavier stuff is implemented in assembly and this is mostly used for scripting (from what I understand).


Yes exactly. It's not a zero cost abstraction, but it's a very simple format, each byte code oppose maps directly to function and passes its args. So it's basically just a conditional jump


Oh wow. So surprised this is viable on a 4 (1, really) MHz processor. Thanks for clarifying and sharing, you both!


You might also like the fact that the Apollo Guidance Computer (which ran at a similar speed) was also programmed using something like bytecodes. It didn't have to drive a graphical display though, only a spaceship.


“Only a space ship.” yawns

Ahahaha. But my understanding was that they wanted it to be somewhat field programmable? You can tediously write in a program with all the VERB NOUN stuff?


The verb/noun stuff I understand was the UI for the astronauts (the DSKY). There was also the native instruction set for the CPU as well as an interpreter with a richer instruction set built on top of that, and they used this to more easily write complex navigation programs. Wikipedia mentions some of this at https://en.wikipedia.org/wiki/Apollo_Guidance_Computer around the phrase "virtual machine." I'm not sure it being interpreted code would aid in field reprogrammability, since it would have been woven into the rope memory just like the rest of the software.



Yeah, I assume this is posted again because of the buzz over the Gameboy Çolor game that was created using it that McDonald's released in a recent promotion

https://news.ycombinator.com/item?id=36311378


Are there any projects/tools for ripping existing game boy sounds/music and importing them into this format? It would be a great way to learn how various effects are produced, remixing them, etc.

It seems do-able: essentially an emulator whose APU implementation records a time series of the data/config passed to each of the four channels.


Oh cool GB Studio is still going. Good for them.


I’m hoping somebody ports Pokémon Colosseum to GBA/GBC


What does this have to do with GB Studio? Was Pokemon Colosseum made with it?


I think it's more that the game would be more fun as a 2D pokémon instead of the 3D it was.

It's a niche request by GP for sure!


Thanks homie. Not everyone gets it. Pokemon Colosseum is the Deep Space Nine of the Pokemon games.


Hm I haven’t played it but I did really enjoy DS9. Is it similar because the colosseum devs had more room to experiment, or grittier or something?


I would say both? It's gritty by Pokémon standards (it's no Pokémon Reborn, which blows canon Pokémon out of the water). But gameplay-wise:

- Doubles-only

- No capturing wild pokémon. You steal shadow pokémon and heal them.

- I found it generally more difficult than normal pokémon games.

I'm sure GP has more to say :)


It’s the “anti-Pokémon”. I’d say stealing Pokémon instead of catching them in the wild is the main difference, but the soundtrack was very “unlike the others” (strong rock vibes), the mechanics of doubles battles and colosseum “tournaments”. That you yourself were a criminal was unique too.


Have you ever played the Reborn fangame? It sounds like you may like it.


[flagged]


No, the game development is “drag and drop” not the game mechanics.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: