DungeonGenerator | Procedural Dungeon Generation with Python and Pygame

 by   JnyJny Python Version: Current License: MIT

kandi X-RAY | DungeonGenerator Summary

kandi X-RAY | DungeonGenerator Summary

DungeonGenerator is a Python library typically used in Manufacturing, Utilities, Energy, Utilities applications. DungeonGenerator has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However DungeonGenerator build file is not available. You can download it from GitHub.

Procedural Dungeon Generation with Python and Pygame. I wrote this after reading an article on "Procedural Dungeon Generation Algorithm". To be honest, I'm a sucker for graph paper dungeons and the word 'algorithm' so it was impossible for me to avoid implementing the dungeon generator described in the article. This code is very dependent on the excellent pygame framework. The Generate module will put up a window and draw each phase of the algorithm as described in the article with it's animated gifs. The StateMachine module was something I reused from my pacman implementation to help keep everything from happening at once. Dungeon is the interesting part, describing a Dungeon class that manages Room objects. The biggest diversion between the article and my implementation is my failure to implement a Delauny triangulation to build a guarunteed connected graph. My graph uses a closest neighbor function that mostly generates connected graphs but sometimes results in two islands. A lesser diversion is the hallway construction where I admit I got lazy. My only defense is it looks like a more "Dwarven" dungeon to my eye, so I kept it. I hope this provides someone some amusement, I enjoyed writing it.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              DungeonGenerator has a low active ecosystem.
              It has 44 star(s) with 12 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              DungeonGenerator has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of DungeonGenerator is current.

            kandi-Quality Quality

              DungeonGenerator has 0 bugs and 0 code smells.

            kandi-Security Security

              DungeonGenerator has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              DungeonGenerator code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              DungeonGenerator is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              DungeonGenerator releases are not available. You will need to build from source code and install.
              DungeonGenerator has no build file. You will be need to create the build yourself to build the component from source.
              DungeonGenerator saves you 220 person hours of effort in developing the same functionality from scratch.
              It has 539 lines of code, 90 functions and 3 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed DungeonGenerator and discovered the below as its top functions. This is intended to give you an instant insight into DungeonGenerator implemented functionality, and help decide if they suit your requirements.
            • Generate a random dungeon
            • Connect rooms to rooms
            • Center the rectangle in a rectangle
            • Adds a random room
            • Check if two rooms collide
            • Repulse another point
            • Check if two rooms collide
            • Process state action
            • Dispatch the pressed key
            • Dispatch all registered events
            • Snap a rectangle to a grid
            • Check the state of the game
            • Dispatch events
            • Convert a screen coordinate to a grid
            • Dispatch the game
            • Called when entering main room
            • Renders the main room
            Get all kandi verified functions for this library.

            DungeonGenerator Key Features

            No Key Features are available at this moment for DungeonGenerator.

            DungeonGenerator Examples and Code Snippets

            No Code Snippets are available at this moment for DungeonGenerator.

            Community Discussions

            Trending Discussions on DungeonGenerator

            QUESTION

            Unity Dungeon Generation
            Asked 2021-Oct-01 at 04:14

            I'm attempting to generate random dungeons using prefabs.

            I have it working to where it will pick a random doorway from a list of doorways and spawn a new room. I then have a script on the bounding box to update the room script for when it intersects another room.

            The issue that I am currently having is that I'm not entirely sure on how to wait or delay to check and see if the onTriggerEvent has been called.

            I'm currently checking to see if there was a collision, and setting a boolean variable to true when that happens otherwise it's false. This always results with the variable being false even though there is collision occurring.

            Edit:
            This is currently how i'm checking to see if a room is valid:

            DungeonGenerator.cs:

            ...

            ANSWER

            Answered 2021-Sep-20 at 18:25

            You can use OnTriggerStay() if I understand correctly, as it returns true if there is something in the trigger and false otherwise. If you are using 2d, use OnTriggerStay2D(). To use it, just define it as a function like you would normally, with an argument of Collider other, with Collider being the type, and other being the other collider.. Then, you can check details about the collider(for example you can check if it's the player) and then do stuff to the other collider(and by extension, the entire object) and the object the script is attached to. Here is an example, but it may require tweaking to perfectly fit what you want to do.

            Source https://stackoverflow.com/questions/69248026

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install DungeonGenerator

            You can download it from GitHub.
            You can use DungeonGenerator like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/JnyJny/DungeonGenerator.git

          • CLI

            gh repo clone JnyJny/DungeonGenerator

          • sshUrl

            git@github.com:JnyJny/DungeonGenerator.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link