Upgrade to Pro — share decks privately, control downloads, hide ads and more …

My First Maker Project: Print Your Own Adventure Game

My First Maker Project: Print Your Own Adventure Game

By Vicky Twomey-Lee (@whykay/@eventgeek and founder of @PyLadiesDub)
PyLadies Dublin, Tue May 19 2020

Meetup page: https://www.meetup.com/PyLadiesDublin/events/dclgvlybchbzb/
Video of the project in action: https://flic.kr/p/2iNDPVF

PyLadies Dublin

May 19, 2020
Tweet

More Decks by PyLadies Dublin

Other Decks in Technology

Transcript

  1. Vicky Twomey-Lee
    My First Maker Project: Print
    Your Own Adventure Game
    PyLadies Dublin, Tue May 19 2020

    View Slide

  2. • Coder

    • Involved w/ Irish Tech Community

    • Advocates Diversity in Tech

    • Maker Advocate
    Who?
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  3. My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  4. @CodingGrace @PyLadiesDub @GlobalGameCraft
    @WWCodeDublin @DublinMaker
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  5. What…?
    Adventure Games
    https://www.flickr.com/photos/derekbruff/6373811675

    View Slide

  6. Search & Play

    “The Hitchhiker's Guide to the
    Galaxy Game 30th Anniversary”
    http://adarkroom.doublespeakgames.com/
    Try: A Dark Room

    (iOS/Android)
    Adventure games to check out - free!
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  7. What…?
    Raspberry Pi
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  8. What…?
    CircuitPython
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  9. What…?
    MicroPython
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  10. What…?
    CircuitPython
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  11. What…?
    Adafruit Industries
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  12. My Maker Project
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  13. *note: not extensive
    • Raspberry Pi with latest Circuit
    Python

    • Adafruit mini-thermal printer

    • Arcade buttons x3

    • Laptop with Python 3

    • Mu Editor

    • VNC Viewer
    Project Ingredients
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  14. What…?
    pi-top
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  15. Inspiration
    “Der Choosatron”
    Berlin Game Science Center
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  16. My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  17. • Case for thermal printer

    • Stand for the arcade buttons
    3D Printing
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  18. Printing an image
    with the thermal printer
    https://gph.is/g/ZPWWyjV
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  19. Printing an image
    Solution: Switched
    CircuitPython library
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  20. Switched to pi-top [4]
    Where’s the printer?
    https://gph.is/g/ZPWWyjV
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  21. My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  22. Spreadsheet -> JSON
    • Looked at Twine

    • Chose Spreadsheets export to
    CSV

    • Python convert CSV to JSON
    Sample data
    https://gph.is/2d8XnGR
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  23. Spreadsheet
    Sample
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  24. CSV to JSON
    Code

    View Slide

  25. Main code
    Setting up electronic-y
    bits & get game data
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  26. Main code
    Game class
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  27. Main code
    Playing the game

    View Slide

  28. my thoughts after the project
    • More refactoring

    • Improvements like case covering
    and make it look as one unit

    • Switch to Raspberry Pi 3 or even
    a Raspberry Pi Zero

    • Realise I found it hard writing
    stories, plot generators online
    are helpful for random data
    So…
    https://gph.is/1OhAIXM
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  29. Quick video of project
    My First Maker Project: Print Your Own Adventure Game | PyLadies Dublin | Vicky Twomey-Lee

    View Slide

  30. Video of project in action: https://flic.kr/p/2iNDPVF

    View Slide

  31. pexels.com/photo/big-red-heart-on-dark-background-6371/
    Thank You!
    @whykay | @eventgeekie
    My First Maker Project: Print Your Own Adventure Game
    PyLadies Dublin, Tue May 19, 2020
    https://github.com/whykay/text-based-game-thermal-printer

    View Slide

  32. UP NEXT
    How Python changed my life in 9 months - True Story
    by Débora Cornetta O'Brien

    View Slide