Chaosforge Forum

  • November 13, 2024, 21:35
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Random map idea  (Read 10719 times)

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Random map idea
« on: March 12, 2012, 17:24 »

I put together a level generator that would create a level with a little more variety than the typical block room layouts.  It's attached to this post.  Just unzip it to the modules folder in your DoomRL directory to put it in.

There is both a single level and an episodic version, so you can feel how it can play out as it's own level or in a (somewhat) regular game.

Comments, questions, concerns, and criticism all appreciated.
« Last Edit: March 16, 2012, 11:49 by shark20061 »
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

Uitë

  • Elder
  • First Sergeant
  • *
  • *
  • Offline Offline
  • Posts: 113
  • Lost Soul
    • View Profile
Re: Random map idea
« Reply #1 on: March 14, 2012, 04:26 »

I like the way these levels play. Because of all the nooks and crannies that are generated, it's a bit more unpredictable, so I feel more like I'm exploring, and it also gives a lot of opportunities to ambush. Of course, I haven't seen it with any actual enemies in it, and I'd love to see them added, to get an even better sense of the levels.

When I played, the sections you built the level out of became obvious fairly quickly, even before I looked at the code. I'm not sure if that's a bad or a good thing though.

Anyway, I'd love to see more level generators like this. It doesn't seem too hard to get the basics in, so maybe I'll try to make some myself.
Logged
Arch-Vile 1st Lieutenant
[26|12|6|1|0]

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Random map idea
« Reply #2 on: March 14, 2012, 20:16 »

Enemy generation is in the code, but it's commented out.  Just look at the comments I put in to find them.  A line near the top allows you to adjust which dlevel to mimic, and there are about 4 lines near the end to uncomment to get enemies, items, barrels, and the stairs in.

EDIT: There's also code to start you with a shotgun and 150 shells too, just above the 4 generation lines, also currently commented.
« Last Edit: March 14, 2012, 20:18 by shark20061 »
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

Shinji_Ikari_9th

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 375
  • Lock and load!
    • View Profile
Re: Random map idea
« Reply #3 on: March 14, 2012, 22:42 »

Enemy generation is in the code, but it's commented out.  Just look at the comments I put in to find them.  A line near the top allows you to adjust which dlevel to mimic, and there are about 4 lines near the end to uncomment to get enemies, items, barrels, and the stairs in.

EDIT: There's also code to start you with a shotgun and 150 shells too, just above the 4 generation lines, also currently commented.

nicely done now if it could be incorperated into an episode.
Logged
Over and Out!

RylandAlmanza

  • DiabloRL Beta Tester
  • Private FC
  • *
  • Offline Offline
  • Posts: 11
  • Lost Soul
    • View Profile
Re: Random map idea
« Reply #4 on: March 15, 2012, 12:09 »

When I started it, it told me "This mod was not designed with graphics support in mind (...)". I tried it with graphics anyways, though, and it worked perfectly. :) Nice work!
Logged

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Random map idea
« Reply #5 on: March 15, 2012, 13:08 »

Yeah, I can't seem to tell that graphics will be fine for the module.
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Random map idea
« Reply #6 on: March 16, 2012, 11:40 »

nicely done now if it could be incorperated into an episode.

Here you go then.  Also, here's an updated version of the single level so that you can have it generate various scenarios.  I hope the questions at the beginning aren't too annoying.  I also added more possibilities in the sections that could be generated, so it shouldn't feel as repetitive.

The barrackse.module is the episode version, the barracks.module is the updated single level.
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

RylandAlmanza

  • DiabloRL Beta Tester
  • Private FC
  • *
  • Offline Offline
  • Posts: 11
  • Lost Soul
    • View Profile
Re: Random map idea
« Reply #7 on: March 16, 2012, 13:48 »

Very nice, shark! Playing it right now.
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: Random map idea
« Reply #8 on: March 18, 2012, 19:34 »

Screenshots? I'm interested!
Logged
at your service,
Kornel Kisielewicz

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Random map idea
« Reply #9 on: March 18, 2012, 20:58 »

Screenshots? I'm interested!

But of course!

A few layouts as shown on console:


You open the door.                                                             
 You close the door.                                                           
 ##############################################################################
 #....................####..####.....##..##...................................#
 #.######.....###.....####..........##.==.##....##########...######.....###...#
 #.......#...#........##########......====.....##........##........#...#......#
 #........#########...#########.......====.....+....##....+.........#########.#
 #.#########..........#.............##.==.##...##........##..#########........#
 #......#...#.........+..............##..##.....##########........#...#.......#
 #...###.....######...#........................................###.....######.#
 #..................####......####.#...##...#.######..######..................#
 ####..###..##############..######..#.#..#.#..####......############..###..####
 ####..###..##############..######...#.@..#...####......############..###..####
 #..................####......####..#.#..#.#..######..######..................#
 #........#######.......#....#...............................####+###########.#
 #.########............##....##......##..##.....##########...#..#.#.........#.#
 #........#...........###....###....##.==.##...##.......>##..#.##.#.........#.#
 #...#############....................====.....+....##....+..#.........#.##.#.#
 #.........##.........###....###......====.....##........##..#.........#.#..#.#
 #..........#######....##....##.....##.==.##....##########...###########+####.#
 #......................#....#.......##..##...................................#
 ##############################################################################
  Shark                      Armor : none                                       
  Health: 100% Exp:  1/0%    Weapon: pistol (2d4) [6/6]                         
  cautious                                                    Test Map         


You open the door.                                                             
 You close the door.                                                           
 ##############################################################################
 #...........#######..####..####.....##==##.....#...........#######...........#
 #............#####.........####....##====##....+............#####............#
 #........##...###....##########....========....#..>..........###...##........#
 #.......####...#......#########....========....#########......#...####.......#
 #...#...####..................#....##====##....##########.........####...#...#
 #..###...##...................+.....##==##.....####................##...###..#
 #.#####.......................#.......##.......####..####..............#####.#
 ########...........######..#######...#..#...#######..######...........########
 ####..###..###..#######......####.###....###.#............####............####
 ####..###..###..#######......####.###..@.###.#............####............####
 #..................######..#######...#..#...#######..######..................#
 #.###########+####...#................##....................######.....###...#
 #.#.........#.#..#...+........................############........#...#......#
 #.#.........#.##.#...#........................#..........#.........#########.#
 #.#.##.#.........#...#########........##......+....##....+..#########........#
 #.#..#.#.........#...##########......####.....#..........#.......#...#.......#
 #.####+###########...####..........########...############....###.....######.#
 #....................####..####..############................................#
 ##############################################################################
  Shark                      Armor : none                                       
  Health: 100% Exp:  1/0%    Weapon: pistol (2d4) [6/6]                         
  cautious                                                    Test Map         


You close the door.                                                           
 You close the door.                                                           
 ##############################################################################
 #..................#####.........############...........#....................#
 #........#######....###..........############...........+...######.....###...#
 #.########...........#....#.............................#.........#...#......#
 #........#...............###....................#########..........#########.#
 #...#############.........#...#..#####..#####..##########...#########........#
 #.........##.................###.#####..#####........####........#...#.......#
 #..........#######..........#####..............####..####.....###.....######.#
 #..................#######+######..#.====.#..#######+######..................#
 ####..###..#########............#...======...####......#######............####
 ####..###..#########............#...======...####......#######............####
 ####............#########+#######..#.====.#..######+#######..................#
 ###......##......##..####..####........@.......####..####...######.....###...#
 ###.....####.....##..####......................+........#.........#...#......#
 #......######........##########.....######.....#...##...#..........#########.#
 #......######........#########.....########....#...##...#...#########........#
 ###.....####.....##..#.............########....#...##...#........#...#.....>.#
 ###......##......##..+..............######.....#........+.....###.....######.#
 ####............###..#...............####......####..####....................#
 ##############################################################################
  Shark                      Armor : none                                       
  Health: 100% Exp:  1/0%    Weapon: pistol (2d4) [6/6]                         
  cautious                                                    Test Map         


You close the door.                                                           
 You open the door.                                                             
 ##############################################################################
 ####..###..###..###...................##.......####..####..###..###..###..####
 ####..###..###..###.############.....####....
..+........#..###..###..###..####
 #.#....#....#....#..#..........#....######..
...#...##...#...#....#....#....#.#
 #...................+....##....+....######..
...#...##...#....................#
 #...................#..........#....
.####......#...##...#....................#
 #.#....#....#....#..############...
...........>#........+...#....#....#....#.#
 ####..###..###..###................
............####..####..###..###..###..####
 ####..###..###..#######......####.
.#.====.#..######..#########..###..###..####
 #########..###..#########..######.
..======@..######..#########..###..#########
 #########..###..#########..######.
..======...######..#########..###..#########
 ####............####### .....####..
#.====.#..######..#########............####
 ###..............##................
............####..####..##..............###
 ###.....====.....##..##########..###
##..#####........####..##.....====.....###
 #......======.......##........##.####
#..#####..##########........======......#
 #......======......./....##..../.....
...........#########........======......#
 ###.....====.....##.##........##........................#..##.....====.....###
 ###..............##..##########..############.........../..##..............###
 ####............###..............############...........#..###............####
 ##############################################################################
 
Shark                      Armor : none                                       
 
Health: 100% Exp:  1/0%    Weapon: pistol (2d4) [6/6]                         
  cautious                                                   
Test Map         


And two in graphics, attached.

Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: Random map idea
« Reply #10 on: March 19, 2012, 00:02 »

Ping me in a week -- we'll push it into the core game :)
Logged
at your service,
Kornel Kisielewicz

Klear

  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1319
  • Twisted passages carry the smell of dapperness...
    • View Profile
Re: Random map idea
« Reply #11 on: March 19, 2012, 03:33 »

I like the lava pool. Is there any way to have a random item with greater chance to be a unique in the middle? I have a feeling a lot of weapons were lying in acid/lava pools in Doom.

It would also be a motivation not to wear just tactical boots on every playthrough.
Logged
Arch-Vile Mjr General [24/19/18/8/2] (0.9.9.7)

Quote from: thelaptop
Dude... we need to change your forum handle from "Klear" to "Klear Nukem".

Pricklyman

  • Sergeant Major
  • *
  • Offline Offline
  • Posts: 156
  • Crazy Nutjob - and lovin it
    • View Profile
Re: Random map idea
« Reply #12 on: March 19, 2012, 03:38 »

I like the lava pool. Is there any way to have a random item with greater chance to be a unique in the middle? I have a feeling a lot of weapons were lying in acid/lava pools in Doom.

It would also be a motivation not to wear just tactical boots on every playthrough.

This - Doom definately had plenty of items like this...although with the modern ports such as Zdoom you can just jump! ;P

Although RE: the tac boots - you could just take the boots off temporarily... :P
Logged

Klear

  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1319
  • Twisted passages carry the smell of dapperness...
    • View Profile
Re: Random map idea
« Reply #13 on: March 19, 2012, 03:49 »

Although RE: the tac boots - you could just take the boots off temporarily... :P

I don't think that's necessary, since they regenerate durability. I haven't tried how much time you can spend wading through hurtfloors until they are comletely destroyed, though I assume the health loss would be a much better reason not to do that.

I find it funny that the doomguy would take off his nice running shoes and walked across lava/acid barefoot =)
Logged
Arch-Vile Mjr General [24/19/18/8/2] (0.9.9.7)

Quote from: thelaptop
Dude... we need to change your forum handle from "Klear" to "Klear Nukem".
Pages: [1]