1. 35

    1. 13

      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.

      1. 2

        This is so cool! Thank you for making this. I look forward to playing this with my daughters.

        1. 3

          BTW, the whole thing started with Snakes And Ladders kind of game, you have 5 instructions per turn, but on certain places you have to roll a dice and follow the branch: https://punkx.org/overflow/build/snakes-and-ladders.pdf

          I think the snakes and ladders game is nice way to onboard into executing instructions, it has very few instructions and only one variable and also kids are very familiar with zero choice games and there is no pressure in ‘doing something wrong’ because the dice dictates the fate of the player.

          1. 1

            Thanks, this is great. I’ve just been browsing the card decks on your site: you have some cool stuff there.

            I recently took my children to Bletchley Park so we’ve been doing a lot of manual coding and ciphering: it turns out that 5-bit paper tape and Vernam ciphers are way more fun for children than I was expecting :)

            1. 2


              I agree, kids are surprisingly receptive to ciphers and puzzles. Its really nice what you are doing! You know what Bruce Lee said: Instead of buying your children all the things you never had, you should teach them all the things you were never taught.

              In the same time, to teach now I think is much more difficult than before, there are soo many abstractions between you and your machine code.

              I dont think I can get 5 bit paper easily, but maybe I can do some good scavenger hunt with some old punch cards. Kids seem to be very receptive of adventures as well :)

    2. 2

      This is very cool, looking forward to trying it out. Reminds me of playing Core War with friends ages ago.

    3. 1

      Well this is neat, I may adapt part of this for a ttrpg mini game @jackdoe.

    4. 1

      The author also has a host of other programming themed card games: https://shop.punkx.org/

      (Full disclosure: I worked with them and think they’re one of the more brilliant people I know.)

      1. 2

        <3 GUNN!

        btw all the cards you can print yourself, and also i have a deck of pranks you could print yourself https://github.com/jackdoe/programming-for-kids/blob/master/projects/panic/cards-small.pdf that you can use to teach your kids how to have some fun with computers (there are some pure evil cards there, like randomly rotating the screen every minute, or randomly inserting space or backspace every 30 seconds, or stopping half the internet or