<< Ideas wanted for random level generator >>

Post Reply
User avatar
starwindz
Sultan
Sultan
Posts: 133
Joined: March 8th, 2009, 4:48 pm

<< Ideas wanted for random level generator >>

Post by starwindz »

Several years ago I have already made a mod called 'random tourament' shown as attached screenshots but they are not true random. Premade templates are just simply assembled. So now I would like to make some kind of true level generator such as OBLIGE for doom game( http://oblige.sourceforge.net ).

Are there any kind of ideas for random level generator of PoP1?
Attachments
00.png
00.png (3.93 KiB) Viewed 2726 times
01.png
01.png (3.72 KiB) Viewed 2726 times
02.png
02.png (2.79 KiB) Viewed 2726 times
03.png
03.png (2.77 KiB) Viewed 2726 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5760
Joined: April 9th, 2009, 10:58 pm

Re: << Ideas wanted for random level generator >>

Post by Norbert »

starwindz wrote:Are there any kind of ideas for random level generator of PoP1?
I guess it depends on how random you'd want it to be.
IMO, a workable solution would be incredibly random, which would entail something like:
  1. Start with room 1 and randomly place room 2 to its left or right or top or bottom (make the other links 0), then add room 3 to either 1 or 2 (add it to where a side is 0), and so on.
  2. Randomly place one of 72 tile possibilities in all 30 spots of all rooms.
  3. If a dungeon tile is one of 7 tiles unavailable for that environment, re-pick, and if a palace tile is the skeleton, re-pick.
  4. If a tile is a left level door, make the tile to its right the right level door.
  5. If a tile is the bottom of a high (double) pillar, make the tile above it the top of a high pillar.
  6. Maybe empty the tiles to the right of windows.
  7. Create an array or list of all gates/level doors, and then search for raise and drop buttons to point those to these gates/level doors.
  8. In each room randomly place or don't place guards, that appear on one of 30 tiles, with one of 7 colors, facing one of 2 directions.
  9. Better and better code to check whether the level is actually finishable or not (if not, regenerate or fix).
(The latest apoplexy (1.9b) does steps 2 and 3 if you right-click or press the \ key. Previous versions only did step 2.)
User avatar
Jakim
Beylerbey
Beylerbey
Posts: 55
Joined: March 5th, 2011, 2:27 pm
Location: Poland
Contact:

Re: << Ideas wanted for random level generator >>

Post by Jakim »

I agree with 9th step, it's the main key of the generator. But I'm aware it's a hard piece of code.
User avatar
starwindz
Sultan
Sultan
Posts: 133
Joined: March 8th, 2009, 4:48 pm

Re: << Ideas wanted for random level generator >>

Post by starwindz »

Norbert wrote:Start with room 1 and randomly place room 2 to its left or right or top or bottom (make the other links 0), then add room 3 to either 1 or 2 (add it to where a side is 0), and so on.
Randomly place one of 72 tile possibilities in all 30 spots of all rooms.
If a dungeon tile is one of 7 tiles unavailable for that environment, re-pick, and if a palace tile is the skeleton, re-pick.
If a tile is a left level door, make the tile to its right the right level door.
If a tile is the bottom of a high (double) pillar, make the tile above it the top of a high pillar.
Maybe empty the tiles to the right of windows.
Create an array or list of all gates/level doors, and then search for raise and drop buttons to point those to these gates/level doors.
In each room randomly place or don't place guards, that appear on one of 30 tiles, with one of 7 colors, facing one of 2 directions.
Better and better code to check whether the level is actually finishable or not (if not, regenerate or fix).
(The latest apoplexy (1.9b) does steps 2 and 3 if you right-click or press the \ key. Previous versions only did step 2.)
Jakim wrote:I agree with 9th step, it's the main key of the generator. But I'm aware it's a hard piece of code.
Thank you for your comments. :)
I have another idea. Is it more easy to develop 'Random 2-Rooms Levelset Generator'? Any idea or comment?
User avatar
starwindz
Sultan
Sultan
Posts: 133
Joined: March 8th, 2009, 4:48 pm

Re: << Ideas wanted for random level generator >>

Post by starwindz »

I have found some articles regarding random level generation techniques used in Spelunkly game(http://spelunkyworld.com). I think these techniques can be applied to make the random levelset generator for prince of persia 1. Please refer the following articles and let me know if you have any ideas and comments.

[Pseudo-random level generation techniques]

Wrriten by DEREK YU
http://makegames.tumblr.com/post/406104 ... n-spelunky

Written by DARIUS KAZEMI
http://tinysubversions.com/2010/01/tuto ... generator/
http://tinysubversions.com/2009/09/spel ... ral-space/
Attachments
00.png
01.png
02.png
03.png
04.png
05.png
User avatar
doppelganger
Vizier
Vizier
Posts: 119
Joined: April 24th, 2015, 9:04 am
Location: India

Re: << Ideas wanted for random level generator >>

Post by doppelganger »

starwindz wrote:I have found some articles regarding random level generation techniques used in Spelunkly game(http://spelunkyworld.com). I think these techniques can be applied to make the random levelset generator for prince of persia 1. Please refer the following articles and let me know if you have any ideas and comments.

[Pseudo-random level generation techniques]

Wrriten by DEREK YU
http://makegames.tumblr.com/post/406104 ... n-spelunky

Written by DARIUS KAZEMI
http://tinysubversions.com/2010/01/tuto ... generator/
http://tinysubversions.com/2009/09/spel ... ral-space/
Umm.. I'm not sure if I should make a new topic... but for the time being...
Hey, I'm trying to copy these routines to make a random level generator
in Game Maker 8.0. But for now, I have only made a room layout generator.
Here's the file. (I have also put the .gmk file if you're interested)

https://www.mediafire.com/?i5mmtpli100ny0e
Doppelgänger
Hmm.. These mortals know about me.. :evil:

Download 'Hell of A Palace' now from Popot!
Post Reply