Giter Club home page Giter Club logo

dungen-unity's Introduction

Dungeon Generator Plugin for Unity

Plugin for Unity3d to procedurally generate dungeons with three methods:

  • full meshes generation, or
  • providing assets to dinamically compose the dungeon, or
  • mixing provided assets and mesh generation.

How it works

The procedural generation algorithm is based on Cellular Automata model, mixed with concept of Room and Corridor. By this, it is possible to benefict of the dynamicity of cellular automata (in terms of shape variations) but having full control over rooms and corridors generated (something that is not really feasible using only cellular automata model).

The algorithm implemented can be customized through Unity Inspector with a good set of input parameters, and can handle different kind of "rendering” such castle like, cave like or desert/forest like, by tuning input parameters and applying proper graphical assets. Generation is seed based in order to reproduce the same dungeon if same input parameters are used.

Usage Examples

Import the project in Unity3D and under the Scenes/ folder the are three sample scenes demostrating different dungeon generation:

  • CastleGen: using castle-like assets (example)
  • CaveGen: meshes created dinamically (example)
  • ForestGen: mixed, using assets and mesh created dynamically (example)

To check it out, open one of the scenes described above e click Play button. You can tweak the parameters in real time using the Inspector. To regenerate the dungeon (while in Play mode) just click on the Game view.

Build and Test

If you use Visual Studio:

  • Open the project in Unity3D
  • Open a .cs script and let Unity generate VS project
  • In the VS project make sure to have installed NUnit and NUnit3TestAdapter to enable unit test discovery
  • Use VS Test Runner to execute all the unit tests.

dungen-unity's People

Contributors

fdefelici avatar

Watchers

 avatar  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.