Hammerwatch Forum

Custom mapping and Mods => Custom Maps => Topic started by: Negative on August 31, 2013, 03:05:27 AM

Title: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Negative on August 31, 2013, 03:05:27 AM
I thought Hammerwatch would be great as a rogue-like game with randomly generated levels.  So I made a random campaign generator, in Java!

(http://s8.postimg.org/xfcguv0px/dungeon_screen.jpg)

Features:

Wishlist (I may or may not get around to including these)

Get it here: (includes a sample randomly generated campaign)

https://www.dropbox.com/s/1s222xzttv70jb3/DungeonGen.rar (https://www.dropbox.com/s/1s222xzttv70jb3/DungeonGen.rar)

Usage:
Must have Java installed - simply extract everything into a single folder (anywhere) and run the included GenerateCampaign.bat and it will create a random campaign in the Hammerwatch levels folder automatically.

Note: If you have a non-standard C: drive steam installation you will have to update the path in parameters.txt.

v1.1 changes:
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: Xeronkar on August 31, 2013, 03:18:53 AM
I think you should place your post in Editor discussion :3

Then, you really made an amazing job, congrats !!
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: Heretic on August 31, 2013, 03:51:42 AM
Simply awesome, great job and thanks!
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: ejh1990 on August 31, 2013, 02:08:19 PM
I think I love you. <3

This is exactly the sort of thing Hammerwatch needed to be that little bit better.

The only issue with this generator is that it's not Linux friendly:

Quote
java.io.IOException: Cannot run program "/home/edward/.local/share/Steam/SteamApps/common/Hammerwatch\editor\LevelPacker.exe": error=2, No such file or directory

It's the "\editor\LevelPacker.exe" that's the culprit, as it would be "/editor/LevelPacker.exe" in Linux land. Unfortunately, that part you can't control in the params txt file. :P

Anyhow, minor point aside this project shows real promise. Will definitely love to see how this matures further. :)

Mac users will also probably be affected by the same issue for the same reason. I don't use a Mac, but as far as I am aware, being of the *nix family it'd also likely separate files with "/" rather than "\".

-----

final edit: I have managed to get it working fully with Linux. It involves working with a hex editor, though. I am torn whether or not to share what values I edited to get it working though. On one hand, it'd help Mac/Linux users like myself. But on the other, it's not all that different than if I were to just redistribute the file (which isn't exactly ethical - I don't have permission to do that). And not to mention that it'd bite me on the bum if something went wrong.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: Linaru on August 31, 2013, 05:45:54 PM
looks interesting, tough judging by the picture its pretty basic at the moment, i hope you continue to improve it so it will generate fancyer dungeons.

however i have not been able to get it to work yet but some toughts based ony our sample map:

would be good to have some balancing so that difficulty progresses evenly, sample map has too many bat spawners piled up making hard mode impposible.

door areas may be too big ? whole party seems to teleport back to beginning of the map when one of us gets near the door instead of waiting for everyone

would be nice to load from a custom assets folder. for example if you put a new image into a folder it would replace player graphics with custom ones.

I think you should place your post in Editor discussion :3

i think this is the right discussion since it is essentially sharing a map.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: ejh1990 on August 31, 2013, 06:00:47 PM
door areas may be too big ? whole party seems to teleport back to beginning of the map when one of us gets near the door instead of waiting for everyone

I experienced that issue on one random generation too. On the same map, I also had an error where there was a bronze door but no bronze key. There was a gold key, but gold keys generally work best on gold doors. :P
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: Negative on August 31, 2013, 06:17:54 PM
Thanks for the feedback!  I will see about fixing some of these problems soon. 
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: ejh1990 on August 31, 2013, 06:22:35 PM
I reloaded the map that had the exit glitch in single player mode and... The glitch doesn't occur. I believe it might only be affecting multiplayer mode. That said, I am not using a clean version of the generator, so it'd need someone with Windows to verify this. :)
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.0
Post by: Myran on August 31, 2013, 06:26:04 PM
Very impressive! A couple of issues though, first of all it doesn't work on a computer with a locale that outputs , instead of . as a decimal separator, an easy fix is just to add "-Duser.language=en -Duser.country=US" to the java command in the bat file.
A bigger issue is the level change scripts you're placing, you do a LevelExitArea which is right, but the AreaTrigger->RespawnPlayers means you can't switch levels in multiplayer since as soon as someone enters the area everyone respawns at the level start. You should be able to make a GlobalEventTrigger(LevelLoaded)->RespawnPlayers on every level for the same effect though.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: ejh1990 on August 31, 2013, 07:40:09 PM
So I noticed that you updated the generator. I tried it out, and yep... It does now indeed work for Mac/Linux. Well, Linux at least. Thank you for addressing that. You are an awesome person. :)

Quick question... Will there be tower flowers and gargoyles added at a later date? It's not in the wishlist, but it would be something awesome to have. :D
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Negative on August 31, 2013, 08:23:42 PM
Awesome, I'm glad it worked :).  I will be sure to slip in those tower flowers and gargoyles in the next update.  I'll be honest though, I plan on taking a break from this project for a bit.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Psyborg on September 01, 2013, 08:02:07 PM
This looks awesome!! Lufia 2 Ancient Cave!!

Honestly, I haven't had time to try it yet but I'm definitely going to! Definitely don't burn yourself out on the project...I burnt myself out on mine and found out I really don't have the time and energy to spend every day for the next multiple months working on what I had planned, so I will probably just release the unfinished project and resources for anyone who wants...
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Juschlan on September 02, 2013, 10:40:19 AM
This is a fantastic idea! Thank you for putting this up, will help some people.
But a thing I don't like is, that the items and characters are placed randomly in the room. I know, that characters are near spawns, barrels close to walls in groups etc.
The wall placement is good, but I miss the secrets, where you need to destroy a wall or something. Also I really enjoy the arches so you walk through a "tunnel" or something. Hope you add your wishlist features, will look much much better.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Keefachu on September 05, 2013, 03:36:40 AM
Although it's pretty basic, this is tons of fun. I like to mess around with the parameters and spawn a bunch of enemies and gold, hehe..
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: KptnKook on September 05, 2013, 12:50:41 PM
i will be putting your generator in my custom world. so after or while playing campaign/story mode, you can always go and check randomgenerated dngns for "new" amusement or loot!  8)
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: machao on September 18, 2013, 06:11:27 PM
I would love to try but it is not working, game crash. I guess because of the last update :/
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: creptiss on September 22, 2013, 08:59:21 PM
Great job! But regrettably my game also crash when trying to load maps from the latest update.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Fmasca on September 24, 2013, 03:11:21 PM
Well, the idea is fantastic, downloaded the generator, but i didn't get my level. Not sure about wjat i'm doing wrong, because the window pop out very quick. someone can help me?  :-\
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Naddox on September 28, 2013, 10:52:26 PM
Couple issues I have with it after generating a dungeon and playing all the way through it.

1: I didn't come across a shop for Health/Mana Pool & Speed increase until the very end and it was after I found the orb to win the level.

2: Four of the floors didn't have all the keys needed for the doors while 1 door had a hall way a little off the side of it that went to the room it locked O_o

3: You can't go back up to a previous floor.

Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: domqc on October 29, 2013, 03:36:21 AM
hello look like fun but can you do it fo the gog version. because it dosent create a file when i follow your instruction thx
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Dithiannim on November 21, 2013, 05:04:37 PM
Hate to necro this thread, but can this random generator only handle 8 levels? I was hoping to make a many floored area. I have no issues making areas that are 4-8 floors, but anything above that does nothing.

Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Negative on December 06, 2013, 02:36:41 AM
Thanks for the feedback, but I have no plans to continue this project myself. I went back and included the source in the zip for those who may wish to continue with what I started.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: giftless on December 06, 2013, 09:49:36 AM
Greetings! Great job on the editor. Have you considered releasing the code on GitHub/BitBucket, so other people can submit patches and improvements? I, for one, would love to assist if you like the idea of shared effort.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Paiyn on January 12, 2014, 07:39:13 PM
I think this does not work any longer or am I mistaken? The program runs but nothing is added in the levels map and the path is correct though.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Xioric on March 10, 2014, 11:28:55 PM
Hi, I absolutely love your concept of a rogue random map generator. Are the maps limited to 8 levels? I am trying to generate a map with many more levels (for my enjoyment :) ) but it seems to be unable to complete the map generation. Please let me know when you get a moment! Thanks!
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Nixxen on May 22, 2014, 07:43:38 PM
Gave this a shot.
Installed JRE, gave it my gamefolder path and generated several worlds.
They all crash when loading in though.
I see Negative has abandoned the project, so I guess he won't be making any changes to it, but has there been any other takers on making it work again?
If so, is the system available for download?
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: james on June 05, 2014, 04:53:52 AM
Would you be willing to post the code on Github/open source it? I'd love to help tweak and improve this myself!

 My friends and I were using it and a nice tweaking interface would be good :)

EDIT: I'm an idiot, didn't look at the folder again 'til now and realized you included a src file. Do you mind if I post it on github and attribute you then? I just want to share any updates I make to it with others if I find the free time to work on it.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: LucidChameleon on June 24, 2014, 01:38:47 AM
Love the Generation! i only had one map out the 5-6 ive gen'd that actually had a problem. and it was that i got into a room and there was no exit. But other than that this is incredible. thank oyu so much!
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: devillol on June 24, 2014, 11:10:13 PM
Gave this a shot.
Installed JRE, gave it my gamefolder path and generated several worlds.
They all crash when loading in though.
I see Negative has abandoned the project, so I guess he won't be making any changes to it, but has there been any other takers on making it work again?
If so, is the system available for download?


Same here, my game crash too. ):

I'm on Windows 7 64bits, JRE7.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: AkaronIakaIleyis on June 29, 2014, 02:19:41 PM
whenever i try to load one of the generated dungeons the game crashes, dont know why, i do what im said to do, the file is in the right folder, everything should be fine, still crashes
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Linaru on July 03, 2014, 03:20:02 PM
i think the generator is just out of date, it hasn't been updated since the initial release of hammer-watch quite some time ago now
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: MrJanCraft on August 04, 2014, 03:12:05 PM
Doesn´t Work when i load the Custom generated map it crash

update????
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Phantom on September 21, 2014, 08:02:12 AM
This seems nice for a quick round. I heard people say it doesn't really work anymore? I tried it out and it still works without crashing for me.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Phantom on September 30, 2014, 05:13:48 AM
Hmm, I tried to edit the code for the new mobs, but I get a java array out of bound error on attempt (new to Java, have done Python before). I manage to get the new tilesets working from a-g, i (h doesn't follow suit so won't work).
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Phantom on September 30, 2014, 05:00:46 PM
Before I leave I guess I'll put up the archive of what I did to the code for Rogue-like Dungeon Generator, I didn't compile it with the newer monsters I attempted to add since that went a bit fubar on my attempt. I did put the source files in the zip.

Pretty much I just made it so the new themes from a-g & i works. I didn't for h since it doesn't follow the suit in the code. The endgame isn't an announcetext this time and is actually the gameend script. It still follows the same parameter suit.
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: vdchampion on June 08, 2015, 08:36:20 PM
Why is mine creating folders instead of .hwm files?Someone know why?Also is this going to be continued?ANSWER PLS!!
Title: Re: [Campaign] Rogue-like Dungeon Generator v1.1
Post by: Duiliath on February 01, 2016, 12:17:38 AM
Why is mine creating folders instead of .hwm files?Someone know why?Also is this going to be continued?ANSWER PLS!!
Spent a little time fussing with that problem also, you need to set the path directory to the hammerwatch folder which has the editor, levels and saves folder in it. It will utilize the editor folder and automatically place the random dungeon in the levels folder afterward. I thought the path should be to the levels folder and kept getting the empty editor folders.

Tried it with the V1.11 in Phantom's post and it is currently generating levels that are loading fine in version 1.31 of hammerwatch, haven't played enough to see if there are impassable dead ends yet.