Coder Social home page Coder Social logo

agfx_gd3_dungeonbuilder's Introduction

Godot 3.2 Dungeon builder

Spelunky inspired dungeon cell builder with option to create connected cells from user defined side:

  • from TOP

  • from LEFT

  • from RIGHT

  • from BOTTOM

  • or randomly selected side, if rndStartSide is set to true

  • DungeonBuilder

    • class: ProceduralDungeon
      • properties:
        • width
        • height
        • startSide ()
        • rndStartSide
        • add extended cell
        • extended cell probability
        • connect extended cell
      • method:
        • xyz.new(width,height)
        • xyz.Build()
        • xyz.Reset()
      • result:
        • is stored in 2D array of DungeonCell
        class DungeonCell:
	        var up:int = eSideType.EXIT
	        var right:int = eSideType.EXIT
	        var down:int = eSideType.EXIT
	        var left:int = eSideType.EXIT
	        var visited:int = 0
	        var cellType:int = eCellType.UNUSED_CELL
	        var nextCell:Vector2 = Vector2(0,0)
	        var currentCell:Vector2 = Vector2(0,0)
	        var prevCell:Vector2 = Vector2(0,0)
	        var userData:Dictionary = {}

Examples

Alt text Alt text Alt text

RED - unused cell GREEN - main dungeon cells BLUE - randomly added extended cells

agfx_gd3_dungeonbuilder's People

Contributors

andygfx avatar

Stargazers

 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.