Live data from Hacker News

Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

github.com

71–80 of 108 posts

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#71

Avid millennial gamer here. Wasn't raised with games. Can someone recommend a good classic game to try?

For the original GameBoy, without a doubt: Zelda Link's Awakening.

But get the DX edition for the GBC.

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#72

Earlier quoted context omitted.

For me it runs at full speed in both stable and developer versions of Firefox (but even then, audio is bad at times). But still, I looked at performance out of curiosity. After running it under FF's profiler for a moment, it looks like a sync executed after every opcode recalculates the framebuffer (`step_until_next_audio_buffer -> cpu::microops::read_byte_from_memory -> emulator::sync -> gpu::scanline::write_scanlin…

Yeah, still being on Windows 10, I almost didn't put the complaint in the comment. Lots of reasons it might just be an environment issue for me. But, in my development experience with firefox, the issues it seems to have always seem performance related (or compliance with web standards related), and I figured that even if others weren't seeing the issue, there was still probably something underlying that could be fig…

FWIW, the thing I've found as the slowest single factor on my machine, might not be the slowest on yours; I might have not noticed the real cause of slowdowns on your machine at all, and you may be the only one able to diagnose it.

(and for the record, I'm on W10 too.)

Also, my personal experience from optimizing https://ruffle.rs/ is that in many cases Firefox's wasm runtime can behave slightly faster than on Chrome for some reason; and performance issues are often instead caused by other APIs like the canvas.

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#73
post #27

Earlier quoted context omitted.

There are definitely limitations, but later games have a lot more depth than these. Link's Awakening feels like it shouldn't be possible in a single megabyte of mask ROM, for example. The fact that it was makes it almost more impressive by today's standards.

> Link's Awakening feels like it shouldn't be possible in a single megabyte of mask ROM Half a megabyte, even! (For the original monochrome game - the later color version is a full megabyte.)

Ah, right, I fortunately slept on it long enough to get the DX version right away! The photographer side plot was amazing, especially with a Game Boy Printer :)

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#74

Earlier quoted context omitted.

Can I inquire as to why you feel so negatively about Firefox?

burn a lot of fcking goodwill for measly 4% web user, turn out eating google money literally make you the next "google" chromium edge literally surpass firefox and with new policy it would eat more to the marketshare

Is it that surprising that Edge is surpassing Firefox given Firefox doesn't have the onboarding ramp of Microsoft and Google? Microsoft shoves Edge in your face every chance it gets, as does Google. What can Mozilla do to compete against that? Unfair to use market share as an argument.

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#75

Avid millennial gamer here. Wasn't raised with games. Can someone recommend a good classic game to try?

Super Mario Land is a good place to start. The music is great, and it is very short and pretty easy.

Link's Awakening is my favorite Zelda game.

The original Pokemon games (Red/Blue, Gold/Silver) that others are recommending are pretty rough these days, but it's fun to see where it all started if you have the patience for them.

If you want something a little less well-known, Bubble Ghost is a fun little puzzler.

Regardless of what you try, remember that this is the era when game manuals were required reading since they rarely were able to fit tutorials & instructions in-game. It's good to scan through the manual first before you play something or you might be missing some critical information.

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#78
post #22

Avid millennial gamer here. Wasn't raised with games. Can someone recommend a good classic game to try?

Kirby's Dream Land is pretty fun too (esp after watching https://www.youtube.com/watch?v=PBRt2D2YN44 which is where the creator talks about the concepts of the game)

I always played games growing up but didn't play Kirby until much later in life. Kirby is easily my favorite platformer, even ahead of Mario and Sonic. I wish there were more like it.

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#79
post #60

Earlier quoted context omitted.

Because people are interested in how technology is built, and if they’re interested in rust they might be interested in seeing how it’s used in other projects

sure that "being written in C" or in "PHP" would have gathered far less interest

A GameBoy emulator written in PHP would certainly piqued my interest, but more like a morbid curiosity than anything else. :)

Re: Retro Boy: simple Game Boy emulator written in Rust, can be played on the web

#80
post #9
post #3

This is awesome! Very nicely done. I hear a few problems with the audio emulation, (mostly clicks that shouldn't be there) but it's been a long while since I had my head wrapped around Gameboy emulation. I'm not sure I know what's going wrong exactly. I love how Rust+WASM is an enabler for showing off applications like this which would traditionally be restricted to a desktop environment. Here's my own, an NES emulat…

> I hear a few problems with the audio emulation, (mostly clicks that shouldn't be there) Almost anything WASM+Audio seems to do that in browsers today, unless you're really really careful about what you're doing and leverage multiple threads. I think the issue is mostly around single-thread contexts, where it has to switch between playing audio and other things. I hit the very same issue myself with Bevy not too lon…

I've had the same issue in my engine.

What I've found is that essentially WebAudio has such a terrible performance that the audio buffers need to be at minimum 100ms. And if you have a bad frame or any jank in your RAF is likely to glitch at least occasionally.

Compare this to when running natively 20ms audio buffers are fine.

I've settled on a design where I run all the audio graphs and audio decoding in a separate thread and then queue the audio buffers for the main JS thread to pick up and make the WebAudio calls. The same has to be done for the graphics (WebGL) as well. This can be major paradigm shift if the initial design has been done around doing stuff independently on the background. On the web.. no can do.

Bonus tip, if you're planning to use the OpenAL implementation that Emscripten provides my only advice is.. don't.

Post reply on HN