Luomu's Forum Posts

  • Well. There seems to be some problem with the entrance/exit coordinates. It's because of this internal calculation in JBDungeon that the initial size you enter is multiplied by 2 plus 1 tile. I didn't want to confuse users with this so if you set size 10 the plugin sees it as 5 and the generator in turn multiplies it again... but the end result is that the start/exit coordinates are unreliable.

  • HI

    Is there any way to set an entrance to these dungeons? or get the entrance from the generated map or something like that?

    se actions "Set starting point" for entrance and "Set ending point" for exit. I'll add it to the example today...

  • What's the license on this baby?

    'm a big fan of the "do whatever you want" license. Jamis Buck's dnd generator is public domain so I would feel guilty for being more restrictive.

  • <img src="http://paahdin.com/projects/dungeongen/img/compact.PNG">

    Between last weekend and this weekend I made an Easy To Use Dungeon and Maze Generator plugin. See Completed Addons for release.

  • This plugin can easily build a maze or a "dungeon" (called so for RPG traditions, you do not actually have to imprison dudes there). Based on Jamis Buck's dnd-dungeon. We used this system in a game called

    Subscribe to Construct videos now

    a long time ago, but I did not release the plugin as it was quite messy. I have now after a week's of work recreated the plugin, but better.

    Download zip (990 KB). Contains plugin, example .cap and exe.

    Source code

    <img src="http://paahdin.com/projects/dungeongen/img/maze.PNG">

    This is a basic maze. Yum, I picked a chocolatey color scheme.

    <img src="http://paahdin.com/projects/dungeongen/img/expanded.PNG">

    This is a maze with rooms, aka dungeon. It's built "expanded" to get thicker walls and better door placement.

    The normal workflow is as follows:

    • Set object mapping
    • Set parameters
    • Generate
    • Build to layer

    If you want more control over the process, you need to build to layer yourself using events or Python.

    Parameters--

    Size: dungeon width/height in tiles. Actual size can be +-1 tile to accommodate walls.

    Tile size: Width/height of one tile in pixels

    Seed: Number to base the randomization on. Same number = always same result.

    Randomness: 0 - very straight corridors, 100 - lots of twists

    Sparseness: 0 - very tight density, 100 - very sparse density

    Dead end removal: percentage of dead ends the generator does its best to remove.

    Room count: max/min.

    Room dimensions: max/min height/width in tiles.

    Expressions available for all of the above. In addition you can fetch tile type (rock, tunnel, room) at pos x/y, room top left x/y, bottom right x/y and a thin wall type between two tiles (none, wall, door).

    For mazes (and other game purposes too) you can se the starting point and goal point of a maze.

    Build to layout:

    The dungeon is built to the layer of your choosing.

    Build to layout (expanded):

    To ensure all walls are at least one tile in size and to allow better door placement, the map size is epanded to x2 + 1 tiles. All corridors stay one tile wide.

    Set object mapping:

    Set (sprite) objects to use with the "build to layer" action. There's only rock, tunnel, room, (thin) wall and door tiles.

    That should be all, see the example .cap and experiment!

  • Since the "thin walls" were sort of tricky, I added a "build to layout (expanded)" action that enlarges your maze so that all walls are at least 1 tile width. It makes door placement better too. As before, the "build" actions are not mandatory but you can loop + build the blocks with events, or Python.

    <img src="http://paahdin.com/projects/dungeongen/img/fatwalls.PNG">

    Almost done with this I would say.

  • With the the latest version of Construct(0.99.93) you can reference a newly created object in python like so:

    System.Create('Sprite',1,0,0)
    objRef=SOL.Sprite  #this gets the reference of the new Sprite. 
    
    objRef.x=400
    objRef.y=300
    objRef.angle=30
    objRef.skewy=20[/code:1w1dg6o9]
    

    Excellent! Any caveats to this? I assume you can do

    System.Create('Sprite', 1, 0, 0)
    objRef = SOL.Sprite
    objRef.x = 300
    System.Create('Sprite', 1, 0, 0)
    objRef = SOL.sprite
    objRef.x = 600
    [/code:1w1dg6o9]
  • Imagemagick is the all-purpose command line tool for graphics manipulation:

    http://www.imagemagick.org/script/index.php

    You only have to type

    [quote:32gntlah]

    convert large.png -crop 32x32 tiles.png

    And it will split your large.png into 32x32 pixel tiles01.png, tiles02.png etc.

  • Updated download. I added things like "get tile at" and "get wall between two points" so now you don't have to use the "auto-build to layout" feature.

    Here is the plugin in use with the example platform "game". Guide the little guy from start to finish.

    <img src="http://paahdin.com/projects/dungeongen/img/grassfloors.png">

    Silent Cacophony, if you (or anyone else) would like to modify the generator to be more varied, that would be welcome

  • Do you have to use external files for this plug to work?

    es, that is one of the main ideas. I guess you could use the resource plugin to unpack files on the fly. I could probably also add "Set string..." type action but it could get confusing with complex patterns.

  • I wish I had a better algorithm. JBDungeon is a classic but it hasn't really changed since 2003. It has problems like one-dimensional (or zero thickness) walls that look good on paper but are tricky to get right for games. This web-based one is nice but it is not publicly available.

    Anyway, this is not going to be a gigantic project but the goal is simplicity... it fits Construct.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Some progress with walls and doors...

    <img src="http://paahdin.com/projects/dungeongen/img/wallsdoors.png">

  • Early last year for a game called

    Subscribe to Construct videos now

    I made a plugin for generating random levels (called "Dungeons" for RPG traditions). Not to take credit for other people's work, it was based on Jamis Buck's somewhat famous D&D dungeon generator. I didn't release the plugin as it was messy and also had many other functions for our game.

    Let's fix that mistake, fresh start!

    Download Plugin, .cap, and demo exe all in one happy package.

    Source code

    It can do this:

    <img src="http://paahdin.com/projects/dungeongen/img/sshot.PNG">

    And many variations of course, preferably with a better tileset. Unlike the last version, this one can create the tile objects on the layout automatically (after you tell it what object is what). I haven't added the traditional "for each tile... get tile at pos" actions/expressions yet.

    The action workflow is.

    • Set object mapping (currently only 0 = empty space, 1 = wall)
    • Set parameters
    • Generate
    • Build to layer

    Parameters:

    Tile size: Width/height of one tile in pixels

    Seed: Number to base the randomization on. Same number = always same result.

    Randomness: 0 - very straight corridors, 100 - lots of twists

    Sparseness: 0 - very tight density, 100 - very sparse density

    Dead end removal: percentage of dead ends the generator does its best to remove.

    Room count: max/min.

    Room dimensions: max/min height/width in tiles.

    Size: dungeon width/height in tiles.

    Expressions available for all of the above. For mazes (and other purposes too) you can also set a starting point and a ending point.

    Jamis' generator is public domain, my license is also "do what you want".

    Not complete! This was just today's work. Updates to follow.

  • Between the release and the demo game I forgot - maybe it would be good to have a very simple example to quickly show how this plugin is used.

    Here.

  • Bullet Heaven! (I'm tired of "bullet hell" )

    I haven't looked through the .cap yet so what was the most time-consuming part of making your demo? Was it getting the bullet patterns *just right* or was it the general stuff related to making most games?

    For the patterns I had a separate simple .cap that made developing them easier. I think testing the level flow was the most time consuming. Add a couple of enemy waves, test, tweak, test. Much respect for actual arcade shoot'em up devs who have to balance everything. Something like fire power-ups went through numerous changes - at first they just increased damage 2x and 3x but combined with a three-way fire it made bosses go down in seconds.

    I think after this point it would be fairly easy to add more length. I would also like more variety in boss movements, or some nice background effects.