Git Product home page Git Product logo

productive-jump-python-project's Introduction

Productive-Jump- Python Project

Our project aims to combine the idea of productivity and task management with the concept of gamification. We tried to create a reward based system which encourages users to finish their tasks and as a break and motivation , play a fun runner game. The application starts with a main menu, which includes buttons to the task list, the game and an option to exit it. The task list is built using the user-friendly interface tools provided by the tkinter library in Python. Upon completion of a task the user gets coins. These coins can be used to play the fun runner game. This game serves the purpose of motivating the users to complete their tasks and also is a good break from work. The game is built using the pygame library. We have also used the importlib library to handle the circular imports in the application. The sys library is also used to exit the application. Apart from that, to store the high score and number of coins we have used the file handling concept to read and write updated values into text files in the backend. We have used the openpyxl library to store the tasklist in a .xlsx file in the backend. This was made as a group project for a Programming skills Development Lab(Python)

Componenets of the project -

Module 1 : The main menu-

Methods created: Methods created:

  • init(): to initialise all variables of the class.
  • update(): to apply underlying image to button.
  • checkforInput(): to check if the coordinates of the mouse are within the bounds of the button’s rectangle. If it is, then it returns the boolean value “True”.
  • changeColour(): to change the colour of the text on the button when the mouse hovers over it.

The Button class is stored in a user defined button.py module. It’s init() function is used to initialise all the requisite variables. The button is created such that it has an underlying image, and the text written on top of it. If no underlying image is provided, the text is displayed atop a transparent surface. On hovering the mouse over a button object of this class, the text changes colour to show that it has been detected.

Module 2 : The to-do list-

Libraries used - Tkinter , messagebox from tkinter, importlib, openpyxl User defined modules imported - coins class Methods created -

  • doing_main()-creates a window and all its components and contains the main loop
  • new_task() - add a task
  • deleteTask() - used to remove a task from the list after its completion. Will also display total coins earned upon completion of a task.
  • goBack() - go back to the main menu Description - This module is used to create an interface between the user and their to-do list. The to-do list is stored in an Excel file in the back-end, and using this interface, the user can add and remove tasks. When the user wishes to close the tasklist, they can click on the “Return to menu” button, which will destroy the tasklist window.

Module 3 : The game-

Libraries used - Pygame, importlib Methods created - game_main() - contains entire game , load_high_score(), save_high_score(), display_score(), obstacle_movement(), player_animation(), collisions()

Description - The game is primarily built by making surfaces and rectangles of the images of- the background, foreground, the player, the obstacles(snail and fly). The score is incremented

by using a simple counter variable and the high score is stored in a text file. After each play the score is compared with the file and stored if greater than the high score. Every time we press the game button in the main class, we check if the player has 100 or more coins. Only then the game starts. After completion of the game, 100 coins are deducted from the coins text file. The collisions are detected using the inbuilt functions of the library.

Module 4: The Button class-

Methods created: - init(): to initialise all variables of the class

  • update(): to apply underlying image to button -checkforInput(): to check if the coordinates of the mouse are within the bounds of the button’s rectangle. If it is, then it returns the boolean value “True”.
  • changeColour(): to change the colour of the text on the button when the mouse hovers over it The Button class is stored in a user defined button.py module. It’s init() function is used to initialise all the requisite variables. The button is created such that it has an underlying image, and the text written on top of it. If no underlying image is provided, the text is displayed atop a transparent surface. On hovering the mouse over a button object of this class, the text changes colour to show that it has been detected.

Module 5: The coins Tracker-

In this module, we have 2 methods- coins_increase() and coins_decrease()

  • coins_increase() gets activated once we finish a task in the task-list module.The user gets 100 coins and this also gets written in a text file in the backend.
  • Similarly, the coins_decrease() method gets activated once we click on play game and the user has 100 or more coins. The coins are decremented by 100 and this also gets stored in the backend. In both these cases, a message box made by using the tkinter library informs the user of the changes in their coins.

productive-jump-python-project's People

Contributors

sanikanikam2003 avatar

Watchers

 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.