Giter Site home page Giter Site logo

francislangit / zuckbot Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 8 MB

A virtual reincarnation of Mark Zuckerberg encapsulated in a desktop application built on Python.

License: MIT License

Python 100.00%
python python3 pygame pygame-text-input stanford stanford-university code-in-place code-in-place-2021 code-in-place-2021-project zuckerberg mark-zuckerberg facebook desktop desktop-app desktop-application

zuckbot's Introduction

Banner

zuckbot is a virtual reincarnation of Mark Zuckerberg encapsulated in a desktop application. Users are given the ability to ask zuckbot a question and be given one of over twenty different responses.

Background

zuckbot was made in partial completion of Stanford University's Code In Place 2021 submission requirements, serving as the author's final project. With the course's emphasis on learning the fundamentals of Python, this project well encompasses the usage of many of the language's best features and makes for a proper showcase of the skills learned throughout Code In Place's eight weeks.

It is also worth noting that the following external libraries were used in the creation of zuckbot:

  • pygame - Serves as development library on which zuckbot is primarily based on.
  • pygame-text-input - Used to generate the text input field that user enters question into.
  • pyttsx3 - Not present in actual code base, but was externally used to generate audio of zuckbot's answers.

Installation

  1. Install Python (if such is not already installed). Version 3.8.5 and above is recommended.

  2. Clone the repository with git clone https://github.com/FrancisLangit/zuckbot or download it as a .zip file and extract it.

  3. Navigate to wherever the repository is saved on you local machine and install its dependencies with:

    $ pip install -r requirements.txt

    If pip isn't already installed, install it by following these instructions.

  4. Navigate to the repository's /zuckbot folder and run main.py:

    $ python main.py
    

Usage

GIF showing usage of application

Users are given access to interacting with zuckbot upon pressing enter in the title screen. He responds well to any yes or no question but anyone is very welcome to input other strings that they may think he will find amusing. On that that note, zuckbot's personality is rather shy. You might find him going surfing or asking for legal counsel first before answering your question, so be patient.

Contributing

Pull requests are welcome for those that would like to make a contribution. If one would like to apply major changes to the repository please open up an issue first to discuss what you'd like to do.

License

MIT License

zuckbot's People

Contributors

francislangit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zuckbot's Issues

Construct gamestates

The application will be allowing users to switch between two gamestates:

  1. Title Screen - Shows title of the game and prompt telling user to press a key to move past it.
  2. Game Screen - Gamestate where the application is actually played. Such will feature most of the game's features. However, it will suffice for now to just have it display nothing.

It'll be best practice for both of the gamestates to each be represented by a class. Switching between such gamestates will be handled by a zuckbot.py file that will be built to be run by the user from the get go.

Prepare repository for publicity

  • Fill out README.md file.
    • Create a banner.
    • Create one or more usage GIF's.
    • Fill up the file with information related to the project.
  • Fill out and configure the side bar of the repository.
  • Add a social media banner on the repository's settings.

Construct Zuckbot's visual features

Here we'll construct the visual aspect of Zuckbot. He'll essentially such be represented by a picture of Mark Zuckerberg. There should be four main ways in which he can be displayed (dependent on his supposed "emotion"):

  • Neutral
  • Answering
    • Affirmative
    • Non-committal
    • Negative

It'll suffice that a total of four images will be used, with one for each of the above. If there's more time to spare we can add more to the array of pictures to choose from (at least for the "Answering" images).

If the user enters a non-empty string from the text input, Zuckbot's image should change in accordance to his randomly chosen auditory response. Othewise, Zuckbot's neutral image should be displayed.

Construct Zuckbot object and its auditory features

Here we'll construct the auditory aspect of Zuckbot. He should have available a total of 15 possible responses, split up in the following fashion:

  • 5 Affirmative
  • 5 Non-committal
  • 5 Negative

The audio to be picked should reflect the categorical responses above. Also take note that Zuckbot is only answering yes or no questions here.

Once the audio files have be collected, build out a feature such that when the user enters a non-empty string from the text field one of Zuckbot's responses is randomly chosen and played.

Construct input field in Game gamestate

In the main "Game" gamestate, user's should have the ability to input their yes or no question in a text field. Make one the does the following:

  • Input any ASCII character up to a max length of 50 characters.
  • Pressing ENTER key will make the text in the field disappear.

It is worth nothing that we need not save the actual data that the user inputs given that what Zuckbot will say will be chosen at random.

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.