Live data from Hacker News

Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

ofrak.com

41–50 of 56 posts

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#43
post #32

This is so clever, I couldn't help but smile when I saw "Your score is stored in memory at the address pointed to by R12" :) Thanks for sharing, it does makes me miss DEFCON, maybe next year...

> Your score is stored in memory at the address pointed to by R12 As someone who has very little idea of what instructions or addresses are, what is this a reference to? Edit: I had the page loaded before your reply, so I didn't see it until I replied, reloading the page lol

It's not a reference, it's just a really neat game mechanic. Normally the high score is guarded by the game and changes only if the game deems it fit to change it. In this game, because the high score is accessible within the game and you can execute arbitrary instructions, you can use that to modify the high score.

It's as if in a more normal game the high score was kept in a big chest somewhere in the game world and once discovered you can start messing with the contents of it all within the rules of the world itself.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#44
post #29
post #22

Before trying it I hit “About” and it opened a new page which says: > By continuing to use this site, you agree to the use of cookies. You seem to be in violation of the GDPR. There must be a way to refuse the cookies that is as simple as accepting them. Especially since yours are not needed for the site to function: > The Services use cookies and similar technologies such as pixel tags, web beacons, clear GIFs and J…

Telling site visitors to disable cookies via their browser is precisely how apple.com does it.

GDPR doesn't care about cookies. It depends on what they're used for. If they're not used for tracking or storing personal information, GDPR doesn't apply.

It's easy to read the original comment as if you need to ask permission for any cookie usage. But that's not what they're saying. They're saying it applies for this site's cookies, as the site specify they use cookies in a way that GDPR would say you need consent for.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#45
I really like the concept!

The key to achieve high scores seems to be writing 0 to PC. The reason is the binary code of new instructions will be "added" to the memory region that is visible on the right, then we can manipulate R12 to maximize the score.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#47
post #7

I'm computer literate (and know some basic assembly) but wow I did not get it

Hey, any specific questions? I'd be happy to explain anything that needs clarification. More broadly, any thoughts on how to make the game clearer? I know that a manual describing the instructions would help. But other ideas are welcome as well!

i code frontend and backend web apps in javascript and typescript, very comfy with cloud stufd

but oh boy these assembly stuff these are heiroglyphs to me haha

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#50
post #40

So far, I've used two good strategies: - Spray PC into as many registers as possible, try to add those registers together as many times as possible, and store the sum at zero (or wherever the score ends up) - Load an assembled instruction from an old value of PC as an int into a register, then do some subtraction to make it non-negative (since it's usually negative in my experience), then store in the score location…

I've had a lot of success segfaulting the game, as I don't know any assembly.
Post reply on HN