Follow

Dear Ruby devs and game devs. I have a crazy announcement I want to share. Please boost.

Last week I released A Dark Room to the Nintendo Switch. Within the game, I also shipped a Ruby interpreter and a code editor as an Easter Egg.

*This Easter Egg effectively turns every consumer spec-ed Nintendo Switch into a Ruby Machine.*

1. Download A Dark Room from the US/EU.
2. Connect a USB keyboard and press the “~” key.
3. Follow the onscreen instructions.

Here’s the proof. This is a Nintendo Switch, running A Dark Room, which allows you to execute Ruby code. The Ruby code in this video is a Quine that executes Ruby code.

@amirrajan nintendo developer agreement violation lawsuit in 4... 3... 2...
hackers exploiting switch trough this game in 2.. 1..
@hj @amirrajan
> hackers exploiting switch trough this game

don't they already have full unpatchable control through Nvidia Tegra BootRom?
@rin @amirrajan nintendo is said to release newer switch models so it could be patched, and current method is somewhat inconvenient.

@hj @rin stop with the knee jerk FUD. I've researched this. And again, let me worry about that. You go build cool stuff on the device. K?

@amirrajan @rin it's nintendo we're talking about. I'm not spreading FUD, but my switch got banned from all online services including e-shop for running CFW once for like 5 minutes and playing shareware DOOM on it :^)

@hj @rin friend. Take. A. Look. At. Fuze.

And again let me worry about this. You don't have to.

@hj @rin I'll take that as "I stand corrected. Sorry".

@hj @rin @amirrajan

Welp guess we saw who was right and who was wrong now.

@Norintha @hj @rin I'm baaacck in the eShop. Too soon to say who's right and who's wrong just yet. We haven't seen the ADR DLC that'll be coming soon ;-)

@rin @amirrajan @Norintha number 1: that's terror. Number 2: that's terror. Number three: pleromafe docs in pleroma when
@hj @amirrajan @Norintha uhhh, I should have an almost finished stash for that

@rin @hj @amirrajan They released a new hardware revision where this is fixed. If you buy a new switch it will be patched.

(Old switches are still unpatchable and good though 😄)

@hj there is precedence for this: take a look at Fuze: fuze.co.uk/nintendo-switch.htm

Also. Stop living in this world of fear. A kid's eyes would have lit up seeing this. And that is my intent/motivation.

PS: Let me worry about that. Go forth and create awesome crazy things.

@hj @amirrajan Well actually, you cannot do JIT on the Switch so apart if you find some bugs in the interpreter to give you read/write primitive (and a way to break ASLR), it's not going to be exploitable 🤷

And even if you get to this point, you will not have access to anything interesting from there.

@thog @hj correct. And all this runs in user land on top of it (yes, I did do an immense amount of pen testing).

And again. FUZE literally does this but with Q Basic. Go make magic happen with Ruby.

@amirrajan @hj I wonder if we could make mastodon run with that 🤔

@thog @hj I didn't expose any http methods to this Ruby runtime outside of http_get("some url") which returns plain text.

So mostly useless.

@amirrajan @hj ah well rip then but nice Easter egg anyway ^^

@hj none of this happened. I'm not an idiot and didn't expose anything that would have gotten me in trouble.

My intents were not malicious (think about why I would have done something like this).

So yea. No lawsuit. The game is back up on the eShop. And I have a DLC in the works that will be released "the right way".

In short: lol, you're wrong.

@hj and don't be offended.

Just shit posting myself 😛

@amirrajan Holy shit that's really fucking cool! Can't wait to mess with this!

@noirscape here is the source code for some of the stuff within the game. Feel free to monkey patch as needed: github.com/amirrajan/power-ove

@noirscape hope you had fun messing with the environment.

Here's the next iteration of it (coming soon to a Switch new you... as a DLC to ADR): fiddle.dragonruby.org

@amirrajan@ruby.social just tried it. one of the best easter eggs i've ever seen in a game :)

@glitch source code to help with your video game making journey: github.com/amirrajan/power-ove

I've included parts of A Dark Room source in there too so you can "mod" it.

@glitch and if you need anything else added to it, I'll throw it up there for reference.

@glitch I'm baaaccckkk.

Next iteration of the Easter Egg: fiddle.dragonruby.org

Coming soon as a DLC (this time "the right way") 😬

@amirrajan the browser version is very good for time killing, my respect

@vaartis yep! The Switch version is highly tuned for "active" play. Pacing is different and there is a much much deeper narrative (since it's assumed that the player is more attentive).

There is always a non-trivial decision to make or task to do on the Switch version.

@amirrajan does the ruby interpreter have graphics and input so one could make another game inside ruby?

@amirrajan don't have a way to connect a keyboard to an undocked switch, so no video, but here's a pic!

@amirrajan ill probably play the game, too, since it looks neat, i just heard ruby interpreter + engine on the switch and got excited

@boots sorry for taking so long to reply. Hope you had fun geeking around with it.

Here's the next iteration of the easter egg: fiddle.dragonruby.org

@amirrajan tried "$layout.toast 2+2" and...this doesn't seem right :<

@amirrajan (that white blob in the middle DOES say 4 for the record)

@amirrajan i love a dark room already and this is just next tier as hell, omg

@robin *really* appreciate the kind words you sent me back then.

They helped me weather the storm ^_^

ADR is back on the eShop. Spread the word <3

@amirrajan holy crap that’s awesome. I wonder if Nintendo will pull it?

@amirrajan Do you mind if I post about this on twitter or are you trying to keep it on the down low?

@debugninja keeping on the DL right now. But feel free to “carefully” spread the word

@debugninja you let me worry about that and go build awesome stuff

@amirrajan Oh my god I am downloading this the second I get home. Thank you for this!

@moritzheiber thank you for the kind words. And sorry for taking so long to reply (had to stay radio silent for a while).

Sign in to participate in the conversation
Ruby.social

A Mastodon instance for Rubyists & friends