Giter Site home page Giter Site logo

pathfinding-adventure's Introduction

Pathfinding Adventure

Description

Pathfinding Adventure is an educational game that teaches graph theory concepts through an engaging treasure hunt experience. The game is based on the rules of a treasure hunt but with its own unique twist.

Features

  • Generates a random tree subgraph using the Breadth-First Search (BFS) shortest path algorithm.
  • Player spawns at a random checkpoint on the map.
  • Progression to the next checkpoint requires correctly answering a question.
  • Scoring system: Correct answers award 100 points, incorrect answers deduct 50 points.
  • Game ends if the player answers five questions incorrectly.
  • Objective is to reach the destination checkpoint by following the shortest path.

Technologies Used

  • Python programming language
  • Pygame library for game development
  • Tiled Map Editor for creating the game map
  • Vector graphics and sprites for visual appeal

Question Generation

The game generates questions from various domains, including general knowledge, science, math, politics, and graph theory itself. These questions encourage players to learn and apply concepts to progress through the game.

Implementation

  • Developed using Python and the Pygame library.
  • Tiled Map Editor used for creating the city map.
  • Vector graphics and sprites enhance the visual appeal.
  • Pygame library handles the graphical user interface (GUI), including the map and checkpoint pillars.
  • Python implements the game logic, including graph theory concepts and algorithms.

Graph Theory Concepts

The game incorporates various graph theory concepts, such as:

  • Unweighted graphs
  • Directed graphs
  • Trees
  • Graph types (e.g., wheel graph, complete graph, bipartite graph)
  • Bridge (cut edge)
  • Cut vertex

The BFS shortest path algorithm is a key component of the game, determining the optimal path for the player to navigate through the checkpoints.

How to Play

  1. The game starts by spawning the player at a random checkpoint on the map.
  2. The player must answer a question correctly at the current checkpoint to receive the key to the next checkpoint.
  3. Answering correctly awards 100 points, while answering incorrectly deducts 50 points.
  4. The game ends if the player answers five questions incorrectly.
  5. The player must navigate through the checkpoints by following the shortest path determined by the BFS algorithm.
  6. The objective is to reach the destination checkpoint by answering questions correctly and following the optimal path.

(For more detailed gameplay information, please refer to the provided flowchart image.) Flowchart

Note

This game, "Pathfinding Adventure," is my original creation, and the copyright has been secured.

pathfinding-adventure's People

Contributors

darshan-padia 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.