I am experimenting with random dungeon/world generation. The algoritm creates rooms in a 2d grid. When a room is created there is a chance that new rooms spawn in an adjacent empty spot. I used recursive code to implement this.
Looks pretty sweet. Maybe you can release the algorithm and allow user to make dungeons with it?
Very nice work. I am curious if you plan to use this in Herocore? How large is the program? It would be interesting if this could be made into a BASIC lib or something for people who wants to make Rogue-like games. :)
Quote from: Cumred_Snektron on August 13, 2015, 09:59:59 PM
Looks pretty sweet. Maybe you can release the algorithm and allow user to make dungeons with it?
Here is the AXE source code and executable attached down below.
Quote from: DJ Omnimaga on August 14, 2015, 11:28:15 AM
Very nice work. I am curious if you plan to use this in Herocore? How large is the program? It would be interesting if this could be made into a BASIC lib or something for people who wants to make Rogue-like games. :)
For Hero Core the algorithm would have to be expanded with item rooms and save rooms, barriers and bosses. This is very complex and it's probably better to make a world manually in a level editor. The program is smaller than 2k with absolutely no optimizations and fast compilation. It could probably be coded in BASIC as well. No need to make a library for it.
Edit: made a screenshot:
(https://codewalr.us/index.php?action=dlattach;topic=658.0;attach=491;image)
Looks very nice. As for BASIC I bet it would be extremely slow, though lol.
Maybe some sort of Zelda game with random dungeons and item placements for maximum replay value?
I read an article about zelda-like dungeon generation after I wrote my algorithm. It incorporates item-based puzzles in the generator.
http://bytten-studio.com/devlog//2012/01/21/procedural-dungeon-generation-part-i/
THis would be great if you could implement items in your map generator :P
Wow this is awesome, I can't wait to see the code.
Quote from: DJ Omnimaga on August 15, 2015, 07:14:49 PM
THis would be great if you could implement items in your map generator :P
What you would typically do is put items in dead ends: rooms with just one entrance. You can seal these entrances with puzzles and locks that require other items. It's up to another algorithm to generate the contents of the rooms.
Quote from: CKH4 on August 15, 2015, 07:25:44 PM
Wow this is awesome, I can't wait to see the code.
Good news. You already could!
I finally had time to look at the source and wow, I get about none of it. Maybe I'll be able to decifer some of it later. The speed is fantastic though. Good job on it.
Quote from: Keoni29 on August 19, 2015, 07:29:32 AM
Quote from: DJ Omnimaga on August 15, 2015, 07:14:49 PM
THis would be great if you could implement items in your map generator :P
What you would typically do is put items in dead ends: rooms with just one entrance. You can seal these entrances with puzzles and locks that require other items. It's up to another algorithm to generate the contents of the rooms.
Quote from: CKH4 on August 15, 2015, 07:25:44 PM
Wow this is awesome, I can't wait to see the code.
Good news. You already could!
Yep, items in dead ends is what I thought. You also have to make sure that related items are not too close to each others, though, such as for example if you scatter locked chests that can be only opened with 1 key, then scatter keys around. You would need to ensure that the keys are not right next to the chests they can open.
Quote from: DJ Omnimaga on August 15, 2015, 06:13:35 PM
Looks very nice. As for BASIC I bet it would be extremely slow, though lol.l
Nope, I made a basic one using a map of random points (although it doesn't use path based but that could be added or faked easily).
(http://imgur.com/7UFOqrZ.jpg)
This takes about 10 seconds.
OOh that's not bad. I thought such stuff would be much slower. It would definitively be handy for people making BASIC Rogue-likes. Maybe
@123outerme could implement it in Solius?
He probably could, I'll make a thread and mention him in it in case he's interested but for now I can't do anymore work on it because I wrote it on my phone.
Also good luck keoni, I can't think of a way to encode the data for the keys and doors so hopefully you can.
So since we're talking about random generation anyway... A perlin noise function (and a world generated with that) on calc would be awesome O.O
Oh wow! A random dungeon generation would be possible, my only concern is that the list variable would get pretty large. I'll look at this more later.
What if the only randomly generated thing was the connection between rectangular rooms like the ones in FF and Solius?
Well
@123outerme the list could be a linked list or alternate x,y list or the room direction list (by far the smallest, up to half the size) so at least theres options. The other problem would be door position. It could be random each time or you could set it so that a saved room would generate the same doors if the room matches your own random function calculated by some aspect of the room. You could also have everything open and generate enemies to act as doors but this would either be random or your own random function. Hopefully you'll get the gist of what I'm saying. Also you should be able to see the code soon (I typed it wrong from my phone the other day).
Edit. Just to let you know the code is blatantly simple, it just draws and erases the walls that have another room next to them. (its probable like < 400b)
Oh right, you have it so that two rooms that aren't connected cannot be next to each others. In FF:MF doing this was possible due to the way map data was stored, but it made it hard to draw maps and editing maps was much harder. It allowed maps to be more compact, though.
Yeah but my preference for a game like this is that it's generated once at the beginning of each game and so editing wouldn't matter.
Yeah true. It's just the map data that would be harder to work with (eg in FF:MF there are many and/or commands in If instructions)