Git Product home page Git Product logo

lpthw3-ex-45's Introduction

LPTHW3-Ex-45

Run on Repl.it

This is exercise 45 from LPTHW3. It's a choose-your-own-adventure style game. I used the game I made in ex36 and switched it from function-based to OOP-based.

Getting Started

Prerequisites

You'll need these things to run the game:

Python 3.x
PlaySound
.WAV files for the game

Quick Start

Go to my repl. Then just hit the button up top that says Run with the forward arrow and the app will start up.

Starting from Scratch

Clone this repo. Then set your environment set up by running the following command in your terminal:

pip install -r requirements.txt

Run python3 ex45.py to start the game

If you download this library in your global environment, this game will work just fine.

If you do it in a virtual environment, you'll get an error that there's no 'gi' module. This has to do with where gi in installed in your global environment (usually usr/lib/python3/dist-packages/gi) compared to the particular python version you're using. When you create a virtual environment, you don't get all the packages in usr/lib/python3/dist-packages/. To fix this, just type the following command in your terminal when in your virtual envronment:

ln -s /usr/lib/python3/dist-packages/gi /home/'your user name'/'the game files you downloaded'/'your virtual environment'/lib/python3.6/site-packages/

It should work after that. See these two links below if you need more help or reach out to me if you need to: TaylorSMarks/playsound#24

https://stackoverflow.com/questions/37526026/how-to-install-gi-module-for-anaconda-python3

Acknowledgments

  • @TaylorSMarks for the PlaySound library; you're a real one
  • @jovalle for helping fix a bug with using PlaySound in a dir whose name has spaces in it
  • Zed Shaw for making LPTHW; you're 60% of why I'll get a job as an engineer one day

lpthw3-ex-45's People

Contributors

lito-frito avatar jovalle avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.