Coder Social home page Coder Social logo

pathfinding-advanture's Introduction

Treasure Hunt Game

Introduction ๐ŸŽฎ

Treasure Hunt is an interactive and educational game designed to enhance your understanding of graph theory concepts. It combines graphical gameplay with quiz challenges related to graph theory.

Features ๐Ÿš€

  1. Graph Theory Challenges: Explore the world filled with nodes and edges, representing a graph. Solve graph theory questions to progress in the game.

  2. Interactive Map: Navigate through the game world, filled with obstacles and exciting graphical elements, using arrow keys or on-screen controls.

  3. Quiz Dialogs: Engage in dialogues with different characters represented by graph nodes. Answer graph theory questions correctly to unlock new areas and challenges.

  4. Dynamic Graphics: Enjoy visually appealing graphics, including grassy terrains, objects, and obstacles. Each element is strategically placed to create an immersive gaming experience.

  5. Graph Representation: The game uses a graphical representation of a graph, where nodes represent locations and edges represent connections between them. Explore the connections and find the treasure!

How to Play ๐Ÿ•น๏ธ

  1. Launch the game using main.py.
  2. Navigate the main menu to start playing or exit the game.
  3. Solve graph theory questions to progress through the game.
  4. Explore the map, answer questions from characters, and reach the treasure!

Algorithms Overview ๐Ÿง 

Shortest Path Algorithm

The game employs a breadth-first search algorithm to find the shortest path between nodes. This algorithm efficiently explores the graph, ensuring the player can navigate through the map and reach the treasure.

#inside the TH_terminal.py

def shortest_path(graph, node1, node2):

Graph Matching

Nodes in the graph are matched based on their connections (edges). The game uses NetworkX to represent the graph and find matches, ensuring proper traversal and interaction between nodes.

#inside the TH_terminal.py

import networkx as nx

# Create a graph using NetworkX
G = nx.Graph()

# Add edges to the graph
G.add_edges_from([(node1, node2), ...])

Dependencies ๐Ÿ”—

Ensure you have Python installed on your system. If not, download and install it from the official Python website.

Install the required Python libraries using the following command:

pip install pygame pillow networkx easygui

Technical Details ๐Ÿ”ง

The Treasure Hunt game is developed using Python and several key libraries for different functionalities:

Tkinter

  • Purpose: Tkinter is used for creating the main menu interface of the game.
  • Implementation: The main menu is initialized using Tkinter, allowing users to navigate through options such as starting the game or exiting.

Pygame

  • Purpose: Pygame is employed to manage the graphical aspects of the game, including player movement, rendering, and handling user input.
  • Implementation: Graphics such as terrains, objects, and characters are displayed using Pygame. Player controls are managed to navigate through the map.

PIL (Pillow)

  • Purpose: PIL (Python Imaging Library, or Pillow) is utilized for image processing and displaying graphics.
  • Implementation: Images, including background graphics and character sprites, are loaded, processed, and displayed using PIL.

NetworkX

  • Purpose: NetworkX is a powerful library for the creation, manipulation, and study of complex networks or graphs.
  • Implementation: The game uses NetworkX to represent the graph structure of the game world. Nodes represent locations, and edges represent connections between them. Graph algorithms, such as finding the shortest path, are implemented using NetworkX.

EasyGui

  • Purpose: EasyGui simplifies the creation of GUIs by providing easy-to-use dialog boxes for user interaction.
  • Implementation: Dialog boxes are used for quiz questions and answers, allowing users to engage with characters in the game. EasyGui enhances the interactive elements of the game.

These libraries collectively contribute to the functionality and aesthetics of the Treasure Hunt game, providing an engaging and educational gaming experience.

Copyright Information ๐Ÿ‡ฎ๐Ÿ‡ณ

This project is Copyrighted by the Govt. of India ๐Ÿ“œ

Explore the Certificate: Copyright Certificate

๐Ÿšซ Unauthorized use, reproduction, or distribution is strictly prohibited without permission from the authorities.

Your respect for intellectual property is appreciated! ๐Ÿ™

Enjoy the Treasure Hunt adventure! ๐ŸŒŸ

pathfinding-advanture's People

Contributors

mustafabharmal avatar

Stargazers

 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.