All Projects → Lallassu → Dungeongenerator

Lallassu / Dungeongenerator

Licence: mit
Dungeon generator for games.

Programming Languages

perl
6916 projects

Projects that are alternatives of or similar to Dungeongenerator

Voxlords
VoxLords - ThreeJS WebGL game with a simple voxel engine
Stars: ✭ 154 (+133.33%)
Mutual labels:  indiedev, gamedev
Bytepath
A replayable arcade shooter with a focus on build theorycrafting made using Lua and LÖVE.
Stars: ✭ 1,119 (+1595.45%)
Mutual labels:  indiedev, gamedev
first-person-controller-for-unity
A First-Person Controller for Unity.
Stars: ✭ 18 (-72.73%)
Mutual labels:  gamedev, indiedev
Parrothunt
ParrotHunt - ThreeJS WebGL game (http://parrothunt.nergal.se)
Stars: ✭ 85 (+28.79%)
Mutual labels:  indiedev, gamedev
Bake
A build system that lets you clone, build and run C/C++ projects with a single command
Stars: ✭ 434 (+557.58%)
Mutual labels:  indiedev, gamedev
Badsanta
BadSanta - Multiplayer HTML5 Game (http://santa.qake.se)
Stars: ✭ 97 (+46.97%)
Mutual labels:  indiedev, gamedev
Dino3d
🦖 Google Chrome T-Rex Run! in 3D (WebGL experiment)
Stars: ✭ 263 (+298.48%)
Mutual labels:  indiedev, gamedev
ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (-72.73%)
Mutual labels:  gamedev, indiedev
Blog
gamedev blog
Stars: ✭ 3,076 (+4560.61%)
Mutual labels:  indiedev, gamedev
Awesome One Person Games
🎮 A curated list of successul games, made (quite) entirely by a lone gamedev.
Stars: ✭ 276 (+318.18%)
Mutual labels:  indiedev, gamedev
Raylib Games
Collection of games made with raylib
Stars: ✭ 78 (+18.18%)
Mutual labels:  indiedev, gamedev
Entt
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Stars: ✭ 6,017 (+9016.67%)
Mutual labels:  indiedev, gamedev
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+17624.24%)
Mutual labels:  indiedev, gamedev
Qake
Qake voxel-engine demo
Stars: ✭ 100 (+51.52%)
Mutual labels:  indiedev, gamedev
Wizardwarz
WebGL Multiplayer game with NodeJS backend
Stars: ✭ 270 (+309.09%)
Mutual labels:  indiedev, gamedev
Lambdahack
Haskell game engine library for roguelike dungeon crawlers; please offer feedback, e.g., after trying out the sample game with the web frontend at
Stars: ✭ 439 (+565.15%)
Mutual labels:  indiedev, gamedev
Voxelengine unity
Voxel engine made in C# for Unity
Stars: ✭ 25 (-62.12%)
Mutual labels:  indiedev, gamedev
Xgoap
Goal oriented action planning beyond GOAP
Stars: ✭ 40 (-39.39%)
Mutual labels:  gamedev
Pyxel
A retro game engine for Python
Stars: ✭ 9,133 (+13737.88%)
Mutual labels:  gamedev
Phaser Node Kit
Rapid Game Development with PhaserJS and Node for Modern Browsers
Stars: ✭ 39 (-40.91%)
Mutual labels:  gamedev

Dungeon Generator

Description

Dungeon generator that produces a 2D-array of different values that can be used to create a dungeon for a game. The script is written in Perl and generates a gif image of the dungeon.

The values used for the algorithm in the 2D array is the following:

  • 1 = room
  • 2 = road
  • 3 = Flood fill, temporary used, not used in the resulting map (array).
  • 4 = (not used)
  • 5 = Player spawn (adds a position in the middle of a room)
  • 6 = Boss spawn (adds a position in a room as far away as possible from player)

The image used in the script is just used to represent the actual dungeon. In a game, the 2D array would be used and the different values in the array would be parsed.

The result of the script can look like this: [dungeon.gif] alt tag

The dungeon generator will be used in Qake voxel-engine that can be found here: https://www.assetstore.unity3d.com/#!/content/68150

And the result implemented in Qake voxel engine using the output from the script (though ported to C#) can look like this: [qake_dungeon.png] alt tag

Run

perl genmap.pl && open dungeon.gif

Algorithm

The algorithm is very basic but produces very good random dungeons. The process is as follows.

  • Generate rooms of random sizes and make sure that they don't overlap and also got some distance between them.
  • Add doors in the middle of each room.
  • From each door, try to draw a road of a certain size outwards until it hits either a road or another room.
  • Flood fill each room of the map. Store the biggest flood filled map and remove the rest.

License

MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].