Page 1 of 1

Dropdown: Generated HTF Map

Posted: Mon Aug 03, 2020 8:06 pm
by tainn
I made a Python script that randomly generates a simple HTF (hold-the-flag) map, making each playthrough different.

The attachment (.zip) includes the Python script (.py) for map generation and the configuration file (.conf). A required package for the script to work is bzwrap.

Map
The map is pretty straightforward. Red team spawns on their base in the sky and tries to make their way to the ground to capture their own flag on the blue base. In order to do so, they must find one meshbox on each level that is drivethrough. Finding it drops them one level lower. To make the meshbox differentiation easier, the colors of the blocks are randomly selected on the gray scale from 0.1 to 0.4 (making the floor color patterns different with each generation, too!).

Generate
The script allows the passing of an optional argument―which has to be an integer―that specifies the desired amount of floor levels to be generated. If not passed, the value defaults to 5.

As such, to generate a map with 7 floor levels, the command can be issued as:

Code: Select all

./dropdown.py 7
This results in a dropdown.bzw world file to be generated in the same directory.

Config
I added some fancy additions to the configuration file, some of which is adding the tone of darkness and fire spirits rising in the night (actually anti-gravity yellow-orange rain). Just to make the entire thing a bit more spectacular, but you can remove it if performance is an issue.

License: CC BY-SA 4.0

Re: Dropdown: Generated HTF Map

Posted: Mon Aug 03, 2020 8:42 pm
by kierra
Really interesting concept, tainn!!!
Looking forward to trying it out!

Re: Dropdown: Generated HTF Map

Posted: Mon Aug 03, 2020 9:04 pm
by tainn
Thank you, kierra!

Re: Dropdown: Generated HTF Map

Posted: Tue Aug 04, 2020 12:07 am
by Zehra
It would be interesting to see both map and concept combined.
If shooting is disabled, simply spawn both teams with respective team flags and it becomes a race to the bottom.

-Zehra