Big Rope Race Generator (BRRG)
Some of you on Discord may already know that I've been working on a Big Rope Race generator, which I'm just calling BRRG. I thought it was time to make a topic to keep everything in one place, so here it is. I can't promise that I'll be regularly updating it. That depends on whether I feel like prioritising it over other projects. Suggestions are welcome. It will probably already be on my to do list, but I can prioritise features that are requested. If you think you've encountered a bug, feel free to let me know and post the steps taken to reproduce it.
(https://i.imgur.com/1cTjYMp.png)
Usage
"Generate" Button (Bottom Right) - Generates a new Big Rope Race map using the specified options.
"Export" Button (Bottom Right) - Exports the generated map to a PNG file.
"Open" Button ("File" Menu) - Opens a configuration file.
"Save As..." Button ("File" Menu) - Saves the current options to a configuration file.
All of the options for generating a map are in the panel on the right.
Download
https://www.tus-wa.com/files/file-1784/
Dependencies
It's a Windows application that requires .NET Framework 4.7.2 or greater to run.
Changelog
20220127:
-Added the ability to specify the number of "Horizontal Copies" and "Vertical Copies". This duplicates the map in each respective direction. The borders "Left (%)" and "Right (%)" will always use 100% if there is more than one horizontal copy. The borders "Top (%)" and "Bottom (%)" will always use 100% if there is more than one vertical copy. This is to keep each map copy identical but may change in a future version. Pay attention to the other bounds options when increasing the value of these new options as they may dynamically adjust to ensure that the maximum map size restriction is enforced.
-Fixed a bug where using the same fore colour and back colour for the start/finish text would cause the map to never finish generating.
-Fixed a bug where using the same fore colour and back colour for text would cause no text objects to be placed.
20201110:
-Fixed a bug where using the "Empty Components (%)" option could sometimes make cells containing an object become empty.
20201107:
-Added an option to select whether the map is treated like an "Island" or a "Cavern". The "waLV" chunk is now always present in exported PNG files. Maps are still generated such that the island/cavern autodetection logic treats the map like an island, should the "waLV" chunk ever be removed from an exported PNG file.
-Added a "Water Level (%)" option. This is saved in the "waLV" chunk of exported PNG files.
-Added the ability to use negative values for the "Vertical Offset" option. This effectively crops the bottom of the map. For example, this could be used to reduce the height of plop areas.
-The maximum map size has been restricted to 22000x22000 to prevent memory issues at greater sizes. The maximum values that can be used for the bounds options dynamically adjust to enforce this.
-Added "Fit to Cell Multiple" and "Stretch to Cell Multiple" values for the background "Size Mode" option. The default value is now "Fit to Cell Multiple". The cell multiple can either be specified or determined automatically, where the background image is scaled down to the nearest cell multiple or scaled up to a cell multiple of 1. To prevent memory issues, the cell multiple will be restricted such that the resized background image never exceeds a width or height of 10000px.
-Renamed the background "Size Mode" UI label to "Size". This allows the new "Size Mode" values to be displayed in the UI without being truncated.
-Removed the "Circuit Board" background image since it isn't actually seamless.
-Added 96 more background images.
-Multiple backgrounds or images can now be loaded at once.
-Added a "Location" option for images. This can be specified for each image. The value can be either: "Random", "Start", "Finish", "Top Left", "Top Middle", "Top Right", "Middle Left", "Middle", "Middle Right", "Bottom Left", "Bottom Middle", or "Bottom Right". The default value is "Random". The default value will be used when opening any previously existing configuration files with images.
-Added an "Outline Images With Transparency" option. This determines whether outlines are painted for images that contain pixels with transparency. The default value is false, which matches the existing behaviour.
-Fixed a bug where outlines were sometimes not painted for images that did not contain transparency. For some reason, the .NET System.Drawing library was sometimes introducing transparency at the edge of resized images. A new library is now being used, which fixes the issue and also produces slightly better quality resized images.
-Added the ability to place text on the map. The following options can be specified for each text: "Text", "Location", "Font", "Orientation", "Length (Cells)", and "Interior Padding (px)". The following options can be specified for all text: "Exterior Padding (px)", "Fore Colour", "Back Colour", "Outline Colour", and "Outline Size".
-Changed the default "Linearity Direction" to "Horizontal" since this generates better maps.
-Split the "Target Maximum Component Size" option into multiple options for the different types of components: "Interior" (not connected to a border or partition edge), "Edge-Connected" (connected to a border or partition edge), and "Object-Connected" (connected to an image or text). If multiple values are applicable to a component, the minimum of these values is used. The previous behaviour was to use the specified value for interior and edge-connected components, and a value of 1 for object-connected components. The default values are 5, 5, and 1, respectively. Previously existing configuration files with the legacy option can still be opened and will use the value such that it matches the previous behaviour.
-Added "Empty Components (%)" and "Grid Points (%)" options for the algorithm. The "Empty Components (%)" option specifies the percentage of components that are made empty (become part of the path). The "Grid Points (%)" option specifies the percentage of open areas (due to empty components) that contain grid points.
-Changed the algorithm sampling to work within each partition instead of the whole map. When there is more than one partition and the "Target Maximum Component Size" options aren't used, this allows longer maps to be generated on average for the same number of samples.
-Updated the object (image/text) placement algorithm to allow objects to be placed in more locations, including next to padding cells and start/finish cells in most circumstances.
-Updated the object scaling algorithm to ensure that images larger than the map are always scaled to fit within the map when allowed by the "Minimum Length (Cells)" and "Maximum Length (Cells)" options under "Design / Images".
-Renamed the "Images (%)" and "Dither Images" palette options to "Objects (%)" and "Dither Objects", respectively, since this now includes both image and text objects. This change is backward compatible with previously existing configuration files.
-Fixed a bug where the object (image/text) placement could make it impossible to generate a path between the start and finish in some circumstances.
-The expanded state of each group of options is now saved in the configuration file. When opening any previously existing configuration files, the expanded states will remain unchanged.
-Renamed the included configuration files to be more descriptive.
-Added example configuration files to demonstrate the new text options, "Empty Components (%)" option, and "Grid Points (%)" option.
See the "Changelog.txt" file for the full changelog.
Looks good!
Found a bug: when start and end match, the generator produces a solid map without any track. Should probably just disable duplicate options in UI.
Quote from: Xrayez on June 03, 2019, 06:59 PM
Looks good!
Found a bug: when start and end match, the generator produces a solid map without any track. Should probably just disable duplicate options in UI.
Thanks. Yes, that result was intentional. It made sense to me, since that's what the user asks for :P GIGO
Good idea though. I'll test making it impossible to select the same ones in the UI.
What a blessed tool man, made me grow more interest in big rr, thank you! :)
Wow, this program is great! Makes really nice maps with default settings. Love the option to load your own texture image.
Is adding arrows on your to-do list? I tend to minimize after a while, and lose track of which direction to go.
Quote from: j0e on June 10, 2019, 04:15 AM
Wow, this program is great! Makes really nice maps with default settings. Love the option to load your own texture image.
Is adding arrows on your to-do list? I tend to minimize after a while, and lose track of which direction to go.
Thanks. Yes, I will try to add an option for arrows in the next update. In the meantime, there are directional wall outline options as one method for determining the direction.
Quote from: LEGi0N on June 10, 2019, 12:21 PM
Quote from: j0e on June 10, 2019, 04:15 AM
Wow, this program is great! Makes really nice maps with default settings. Love the option to load your own texture image.
Is adding arrows on your to-do list? I tend to minimize after a while, and lose track of which direction to go.
Thanks. Yes, I will try to add an option for arrows in the next update. In the meantime, there are directional wall outline options as one method for determining the direction.
Holy crap, I just realized you can scroll down - there's way more options than I thought. Really very nice work mate.
Last time I've uploaded custom image it didn't work great cause black from the pic was making holes in map.
Hope you did that black color customization in coding of a program, forgot to test it when I downloaded latest update.
Great work once again man!
Quote from: Sensei on June 11, 2019, 10:02 AM
Last time I've uploaded custom image it didn't work great cause black from the pic was making holes in map.
Hope you did that black color customization in coding of a program, forgot to test it when I downloaded latest update.
Great work once again man!
Thanks. Yes, that was fixed in the previous version. Any black in the background images (or start and finish text) is automatically replaced with #000001 to prevent worms being able to move through it.
Trapezium 2 arrows :-*
Awesome work.
Quote from: SiD on July 30, 2019, 01:08 PM
Trapezium 2 arrows :-*
Awesome work.
Thank you. That's my favourite arrow type as well. Inspired by your "21 Shades of Grey" map :)
Quote from: LEGi0N on July 30, 2019, 01:15 PM
Quote from: SiD on July 30, 2019, 01:08 PM
Trapezium 2 arrows :-*
Awesome work.
Thank you. That's my favourite arrow type as well. Inspired by your "21 Shades of Grey" map :)
Lol. I'm just playing 21 shades of grey with sir-j.
I've just released the latest version. See the first post for the changes. I'll probably take another break from this project now, but leave a reply if there's any features you want to see in the next version. I can prioritise these when I next start working on it.
Thank you so much.
Maybe put a timestamp on every generated map in next patch? Under "Start" for example. Dunno how hard this would be to implement but it shouldn't be difficult right!? Date/hour/timezone..
Anyway, it's cool feature and it will help stopping fights between opponents while doing competitive match. Something like: "fk off, you've been practicing on this map until you started playing it with eyes closed" and similar..
Quote from: Sensei on July 14, 2020, 01:33 AM
Maybe put a timestamp on every generated map in next patch? Under "Start" for example. Dunno how hard this would be to implement but it shouldn't be difficult right!? Date/hour/timezone..
Anyway, it's cool feature and it will help stopping fights between opponents while doing competitive match. Something like: "fk off, you've been practicing on this map until you started playing it with eyes closed" and similar..
Hmm, I could definitely add an option for entering free text, so you could write a timestamp there. However, I'm not sure specifically putting a timestamp would prevent someone determined from just modifying a map using other software to put in any timestamp they want. Or they could just change their PC time before generating it. Regardless, the next version is actually coming out sometime this week hopefully, so it won't make it into that version.
If anyone is interested, it's actually possible for 2 players to fairly generate a map together that neither of them have played before. It just uses a little cryptography. Here are the steps:
1. Agree on all settings for the BRRG apart from the seed.
2. Both players pick a random number between 1 and 1,000,000 (for example).
3. Both players create a SHA256 hash of their number. First add a salt to the number. This is just any random text. For example, make "123" become "123|Ksj4ofmrnvm4ifmwk45n" then generate the hash. There are plenty of online sites to do this.
4. Both players send each other their hash.
5. Once each player has sent their own hash and received the other players hash, they are free to send each other their salted random number (for the example above, this would be "123|Ksj4ofmrnvm4ifmwk45n"). Now each player can check that the hash they received before matches the salted random number they receive. This prevents either player from switching it.
6. Sum both random numbers together (and subtract 1,000,000 if the sum is greater than 1,000,000) then use this as the seed for BRRG. Since both players have the seed, they can both generate the map. The player who isn't hosting can check that the host is using the same map by visual inspection.
It may seem a little complex and take a few minutes, but I don't know another way of doing it fairly, if that's what both players want to achieve.
Edit: In practice (and because I doubt many people will do the above), it is sufficient for each player to think of 4 random digits and send to the other player. These can then be concatenated to generate the seed. However, this only works if players are going to send their digits within a few seconds of each other. Otherwise, whoever receives first can start testing different values for their own digits to find a seed they like. Note that this method only works with concatenation and not the sum method mentioned above, since with that method someone could know a good seed in advance and do a quick calculation to ensure they get it.
Quote from: LEGi0N on July 14, 2020, 02:23 AM
4. Both players send each other their hash.
(https://i.gifer.com/Ku5f.gif)
Lets do a cup with all randomly generated maps.
A new version is now available. See the first post for the list of changes.
This version includes several new wall options. Here are just a few examples:
(https://i.imgur.com/41UuYk5.png)
Amazing work LEGi0N. This thing makes great ropable maps, nice styles, and the arrows mean you don't get lost.
For real, this is one of the greatest addition to this game. Great to see that it's still maintained. Thank you for all the effort. We appreciate it. ;D
Great update, Legion!
I don't play big rr that much but this is some next level tool!!
Btw, anyone mind to share some configuration files?? ;D
Thanks guys.
The latest version now adds "partitions", support for transparent images, and some other things. Full list of changes in the first post as usual.
Here are some example images:
https://i.imgur.com/inAl2WE.jpg (https://i.imgur.com/inAl2WE.jpg)
https://i.imgur.com/yvel4Dm.png (https://i.imgur.com/yvel4Dm.png)
https://i.imgur.com/EjCLhRl.png (https://i.imgur.com/EjCLhRl.png)
Thanks so much for the update, that was the final touch to my JoJo themed configuration file! ;D
https://i.imgur.com/Gjz09Ye.png?1
Quote from: Kaleu on August 21, 2020, 07:44 PM
Thanks so much for the update, that was the final touch to my JoJo themed configuration file! ;D
https://i.imgur.com/Gjz09Ye.png?1
Very nice !
Quote from: LilScrappy94 on August 22, 2020, 03:04 PM
Quote from: Kaleu on August 21, 2020, 07:44 PM
Thanks so much for the update, that was the final touch to my JoJo themed configuration file! ;D
https://i.imgur.com/Gjz09Ye.png?1
Very nice !
Thanks, I will try to make a collection of configuration files and upload them soon. ;D
I have a question, i'm starting to use this program and beginning with default settings only changing the tunnel width(Cell Size).
The problem, I like to use cam lock while playing Big RR, when using a generated map it has a border at the top, which means the entire size is the size of the map, which throws the cam lock off whenever you are close to the edges of the map.
How can I generate maps so there is no border and cam lock will always work?
Edit - I made 96 maps from the generator so I went through them manually resizing the canvas area from 10000x5208 to 10240x5336, and now it works fine :)
However, it'd be nice to know how to do that without manually resizing things, is that possible inside the generator?
Quote from: TheKomodo on September 22, 2020, 04:26 PM
I have a question, i'm starting to use this program and beginning with default settings only changing the tunnel width(Cell Size).
The problem, I like to use cam lock while playing Big RR, when using a generated map it has a border at the top, which means the entire size is the size of the map, which throws the cam lock off whenever you are close to the edges of the map.
How can I generate maps so there is no border and cam lock will always work?
Edit - I made 96 maps from the generator so I went through them manually resizing the canvas area from 10000x5208 to 10240x5336, and now it works fine :)
However, it'd be nice to know how to do that without manually resizing things, is that possible inside the generator?
It sounds like you're using an old BRRG version. The latest version should make maps which are detected as an island (no border at the top) in 3.8. Version 3.8 changed the way cavern/island auto-detection works, so if you're using an older BRRG version, it may generate maps which 3.8 detects as a cavern (border at the top).
The next BRRG version will have an option to explicitly select island or cavern, although I doubt many people will want to use cavern anyway.
Will it be possible to have diagonals?
Also, what about the possibility to completely randomize all the settings each time you generate? Basically a "Randomize" button?
Quote from: TheKomodo on October 08, 2020, 04:05 PM
Will it be possible to have diagonals?
Also, what about the possibility to completely randomize all the settings each time you generate? Basically a "Randomize" button?
Both are on my "To Do" list, so will hopefully get to them at some point. I had thought about a "Randomize + Generate" button to do both in 1 step, so you can keep clicking until it gives you something that looks cool. The idea would be to make it use settings that work well with each other (complementary colours, etc.) and are within sensible ranges, although it might be tricky since people's preferences about what makes a good map will vary.
Regarding the next version, I just need to finish a new feature and add all of the new options to the GUI and configuration manager. It should be released within 1-2 weeks. I'll add a list of the highest priority ideas to the first post around that time as well.
Quote from: LEGi0N on October 08, 2020, 05:18 PM
Both are on my "To Do" list, so will hopefully get to them at some point. I had thought about a "Randomize + Generate" button to do both in 1 step, so you can keep clicking until it gives you something that looks cool. The idea would be to make it use settings that work well with each other (complementary colours, etc.) and are within sensible ranges, although it might be tricky since people's preferences about what makes a good map will vary.
That sounds great, would it be possible to have have the option of "Sensible Random" and "Complete Random"? Would that be too much hassle? Because even if some colours, or the map has a few weird sections, can still save the PNG and edit it in adobe or something.
Actually to make my latest map I exported 2 maps from your generator, of different widths and loaded them into photoshop, I cut out about 20% of each map, and then copy/cut/pasted it to make a path I liked and that fit the already existing map I made myself, then I took 1 of the arrow things and pasted that around the map too.
So in a sense it would be nice to have full random available as well as a more controlled random.
Heck, even being able to fully customize what is random would be ideal, like, random width, random length, etc, but you want to use a specific pattern/design, so perhaps even a checkbox of which features to randomize would be pretty cool.
Quote from: LEGi0N on October 08, 2020, 05:18 PM
Regarding the next version, I just need to finish a new feature and add all of the new options to the GUI and configuration manager. It should be released within 1-2 weeks. I'll add a list of the highest priority ideas to the first post around that time as well.
No rush mate! What you have already is amazing, anything else extra that is useful is a bonus :)
Quote from: TheKomodo on October 08, 2020, 08:54 PM
That sounds great, would it be possible to have have the option of "Sensible Random" and "Complete Random"? Would that be too much hassle? Because even if some colours, or the map has a few weird sections, can still save the PNG and edit it in adobe or something.
Actually to make my latest map I exported 2 maps from your generator, of different widths and loaded them into photoshop, I cut out about 20% of each map, and then copy/cut/pasted it to make a path I liked and that fit the already existing map I made myself, then I took 1 of the arrow things and pasted that around the map too.
So in a sense it would be nice to have full random available as well as a more controlled random.
Heck, even being able to fully customize what is random would be ideal, like, random width, random length, etc, but you want to use a specific pattern/design, so perhaps even a checkbox of which features to randomize would be pretty cool.
For sure. There could be options for the randomizer, like the range for each option, what options to randomize, etc. Maybe also some presets for sensible, completely random, etc. All of this would have to open in a new window to avoid confusion.
I just made a map using this program. It is fantastic! Congratulations! I noticed it crashes if you change some numbers too much, though.
The map: https://www.wmdb.org/38518
Quote from: FoxHound on October 09, 2020, 10:07 AM
I just made a map using this program. It is fantastic! Congratulations! I noticed it crashes if you change some numbers too much, though.
The map: https://www.wmdb.org/38518
Thank you :)
Do you have an example of what causes a crash, so I can try to reproduce it? It could potentially run into memory issues if it generates a large enough map. Maybe I should add some extra restrictions to prevent that.
Edit: Seeing some strange transparency in that map you made. Also seems to have in-game borders. Assuming these were caused when the map was saved using another program to add the text at the bottom? By the way, the next version will have text options :)
Crash.png For example, if I select the values shown on this attached image (only modifying the part at the very top of the settings) and then generate a map, it will generate one, but if I remove the scaled view, it will appear an error and the program will close. I believe maybe with the custom images selected it may cause bugs, turning the map "heavy", because I remember using the program and sometimes when I clicked generate map, the progress bar didn't advance, so I would wait forever and the map wouldn't be generated, so I had to manually close the program. But the way it is, it's already is possible to do a lot of things. And, yeah I missed a text box to add to the map, good to know you plan to implement this.
About my map, I edited it on paint to write the text with the name of the map and its author (even though the program itself did like 99% of the job), then I converted the map to 113 colors using gimp. I don't know if 113 colors the transparency is worse or not, but I always converted to 113. I also painted the transparent area of the map to black on paint before the conversion with gimp. In the map editor, I raised the water level, changed the "level" to the "art" one even though this would be only useful with 64 colors which would remove the quality of the pictures and the background effects would appear hidden by the bottom part of the map. I also added Border because I think it is better looking this way, the screen only shows the map itself not it floating on a large area. And the map is a cave, there is no open areas to make it open. Ah when I saved the map after my changes in the map editor, I believe it changed the transparency too, because the map background was black and when I saved there it became transparent again (seeing the image externaly with a viewer program).
Quote from: FoxHound on October 10, 2020, 02:45 AM
For example, if I select the values shown on this attached image (only modifying the part at the very top of the settings) and then generate a map, it will generate one, but if I remove the scaled view, it will appear an error and the program will close. I believe maybe with the custom images selected it may cause bugs, turning the map "heavy", because I remember using the program and sometimes when I clicked generate map, the progress bar didn't advance, so I would wait forever and the map wouldn't be generated, so I had to manually close the program. But the way it is, it's already is possible to do a lot of things. And, yeah I missed a text box to add to the map, good to know you plan to implement this.
Ah, yes the image becomes too large for the PictureBox control and crashes. I've had this happen before too. I need to restrict the map size to
the maximum allowed by WA anyway: https://worms2d.info/Colour_map (https://worms2d.info/Colour_map). I think this might just be within what the PictureBox can handle. If not, I need to do something else. Thanks for providing the crash example.
Using images can be slow sometimes, especially if dithering is used (in Design / Palette). If using "Fit/Stretch to Map" for the background it becomes super slow. It should complete eventually. I've made a lot of changes recently without updating the progress bar much. It needs more frequent updates and a % in future.
Quote from: FoxHound on October 10, 2020, 02:45 AM
About my map, I edited it on paint to write the text with the name of the map and its author (even though the program itself did like 99% of the job), then I converted the map to 113 colors using gimp. I don't know if 113 colors the transparency is worse or not, but I always converted to 113. I also painted the transparent area of the map to black on paint before the conversion with gimp. In the map editor, I raised the water level, changed the "level" to the "art" one even though this would be only useful with 64 colors which would remove the quality of the pictures and the background effects would appear hidden by the bottom part of the map. I also added Border because I think it is better looking this way, the screen only shows the map itself not it floating on a large area. And the map is a cave, there is no open areas to make it open. Ah when I saved the map after my changes in the map editor, I believe it changed the transparency too, because the map background was black and when I saved there it became transparent again (seeing the image externaly with a viewer program).
Yea, the images and text have transparency areas, meaning you can place worms inside them. I just wanted to make sure it wasn't a bug with the BRRG :)
A new version is now available. See the first post for the list of changes and download link. It's the longest list of changes so far.
Here's what some of the new options look like: https://i.imgur.com/UZ80jUA.png
An example map with empty components and text: https://i.imgur.com/83ZwuL0.png
An example map with grid points and text: https://i.imgur.com/I9dfuEo.png
I've added a new option suggested by Sensei which some people might want to use with the new realtime module. You can create up to 6 copies of the map, so each player races in their own map at the same time.
Here is an example: https://i.imgur.com/fzKaJEp.png (https://i.imgur.com/fzKaJEp.png)
<3
Is there an option to make rounded corners? If it's there I can't find it... If it's not, please update? ;)
Quote from: Kaleu on November 26, 2022, 01:42 PM
Is there an option to make rounded corners? If it's there I can't find it... If it's not, please update? ;)
Unfortunately not yet. It's on my huge "To Do" list, as with most things. Sorry to say I don't have time to work on this anytime soon. Too many other projects at the moment =|