Generating levels or random mazes with scripting

Need help with your project? Ask here.
User avatar
TaBaR
Posts: 33
Joined: Tue Sep 12, 2006 15:40

Generating levels or random mazes with scripting

Post by TaBaR »

been thinking about trying to make an acs script to create a random maze in part of a map. i have a BASIC program(ATARI BASIC) that can make a random maze, but i am having trouble converting it to ACS. the problem is I'm very good at BASIC and not very good at liner programming. not using GOTO. this is the program with some notes.
Attachments
makemazebasic.pdf
(30.98 KiB) Downloaded 96 times
User avatar
TaBaR
Posts: 33
Joined: Tue Sep 12, 2006 15:40

Re: Generating levels or random mazes with scripting

Post by TaBaR »

even if the concept is not popular, i would still like to know if this program can be converted to ACS.
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Generating levels or random mazes with scripting

Post by Rex Claussen »

This is not the same thing as you're requesting, but many years ago LilWhiteMouse made a mod for ZDooM named Star Wars: Chibi Rebellion. Using ACS, it featured a hub of randomly selected maps (which is not the same as random mazes within a map).

In terms of creating a random maze within a map, you can construct your maze, such that the walls are either up or down at map start. The various segments of the walls will need to be assigned sector tags. Then, set up ACS and assign a probability or range of probabilities that each segment (or a group of segments) will rise/lower soon after map start. This will likely achieve the creation of a different/random maze each time the map is started.

One of the things you'll need to do is plan your maze(s) out beforehand, so that there will always be at least one solution to get through.
User avatar
Enjay
Developer
Developer
Posts: 4723
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Generating levels or random mazes with scripting

Post by Enjay »

Although, by coincidence, LilWhiteMouse did also start work (not sure if it got completed) on a map made of lots and lots of square sectors that would be raised/lowered by ACS when the map started in order to create a randomised level similar to what TaBaR is asking about I think.

I don't recall the name of the project, but I think she was using Heretic as the base game.

From memory, it ran quite slowly on the hardware at the time because it was a big room with a very large number of sectors in it. Perhaps there would no longer be performance issues with GZDoom and modern hardware?
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: Generating levels or random mazes with scripting

Post by Rachael »

Theoretically it is still possible to do this in ZScript in fact it may even be easier. ZScript can track the positions of every line and sector and map them internally without the need to hardcode tags, id's, or ref's. It then can randomly generate a level and set sector heights accordingly; for good measure, to decrease lag, it can also set walls as one-sided to prevent the renderer from going behind them.
Post Reply

Return to “Editing Help”