Page 1 of 1

<< Ideas wanted for random level generator >>

Posted: September 24th, 2013, 4:52 pm
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?

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

Posted: September 24th, 2013, 5:28 pm
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.)

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

Posted: September 25th, 2013, 1:25 pm
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.

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

Posted: September 27th, 2013, 9:36 am
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?

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

Posted: September 29th, 2013, 7:01 am
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/

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

Posted: May 14th, 2016, 7:51 am
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