4 ms·
Reposting my post from lobsters, to give brief description of the game and why I made it: I made this game to teach my daughter how buffer overflows work. Look
by throwaway71271 3y ago
Reposting my post from lobsters, to give brief description of the game and why I made it:
I made this game to teach my daughter how buffer overflows work. Looking at programs as something you can play with, and poke and twist and make it do something else is my favourite part of modern computing. And also I think its the right way to look at programs. When your microwave oven gets an update and starts crashing, you can hack it. Or when your keyboard controller’s firmware is bad, you can hack it (looking at you vortex pok3r) . She is 12 yo now but her assembler skills are getting better and better, hopefully one day she will be able to hack her own keyboard :)
The game is about creating a small shellcode in memory by copying existing instructions and then exploiting a buffer overflow to jump into it, so that you can overwrite your opponent’s return address to force them to go to the game_over() function.
There are other mechanics as well and more layers of strategy (like setting the exception handler or monkeypatching).
The you can print the game yourself on a3/a4 or play it in the browser (but on paper is nicer I think).
The code is compiled with gcc with -O0 so it is a bit redundant, but I think its more straightforward and easier to execute by hand. I disassemble it with objdump and then generate svg.
- dang 3y agoThis is great! Can you please email hn@ycombinator.com so we can send you a repost invite? (Invited reposts go in HN's second-chance pool (https://news.ycombinator.com/pool https://news.ycombinator.com/pool, explained at https://news.ycombinator.com/item?id=26998308 https://news.ycombinator.com/item?id=26998308), meaning they get a random placement on HN's front page.)
- PMunch 3y agoThis is really cool! Have you play-tested it with people who aren't familiar with programming at all? I guess this could be a fun activity at a CS student party, but maybe a bit tough to pull out for casual games night..
- throwaway71271 3y agoI can barely play with people who are very familiar with programming :) For some reason people think assembler is made by the devil himself. I did try to teach it to a friend who is super into board games and doesnt code, but it was really hard for him, I think its doable, but I think I have to create 'levels' of the game that are simpler, for example I started teaching my daughter with: https://punkx.org/overflow/build/snakes-and-ladders.pdf https://punkx.org/overflow/build/snakes-and-ladders.pdf which is a snakes and ladder zero choice game with very few instructions.
- PMunch 3y agoIf the only goal was to make an enjoyable game I believe moving it away from actual RISC instructions and over to something even simpler and possibly more visual could be a way to go. The logic would still be the same, but the text and number based system might just be too foreign to people not used to programming. Might print it out and give it a go though, seems quite fun.