Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Conversation

@Chubbygummibear
Copy link
Contributor

@Chubbygummibear Chubbygummibear commented Oct 6, 2023

After like 2 months of work I present the first iteration of my magnum opus, procedurally generated maint areas, and an entirely new map generation engine designed to fill designated areas with rooms (rectangular structures that you can decide what to do with). You can specify the behavior of these rooms from width and height, to what types of walls and floors they're constructed with and what sort of mobs and features it can spawn. Additionally you can even edit the items and mobs inside to rename them, change variables like factions, or alter their health/equipment/icons.

Visual Demonstration of how the maint generator functions

The logic has been changed since this demo was made, but imagine that black rooms are space rooms, green are randomly themed, red and blue are prefabricated rooms. The order of operations is:

  1. Get the dimensions of the overall area by aggregating valid procedural gen areas into one massive blob of tiles. From this it derives the dimensions of the area as min and max x and y values.
  2. Send this data to my Rust function that first uses Binary Space Partition to cut up the area into subsections until a minimum subsection size is achieved for all subsections
  3. Generate rooms in each subsection ranging in size from the minimum specified size, to the maximum subsection size
  4. After BSP is done, it then runs the Random Room Placement algorithm to sprinkle more rooms of pre-made maint ruin sizes so that there's more ruins in the maints. It's worth noting that Random Room Placement will not respect BSP generated rooms and will just slap themselves over the top.

bsp rust demo

Here's a bad asesprite animation I made to show how it handles gax
bsp explaination

This got testmerged and I want to play in the random maints but it's only on GAX :(((((

First of all, sorry you're not playing on Gax, the best map in the game. Secondly you can try to beg an admin to open the mapping controller subsystem and use the generate_backrooms proc to create The Backrooms z-level.
However be warned this will make the server shit itself and takes roughly 3 minutes to complete

2023-10-06.16-05-28.mp4

Can I use this to make an Ice Caves Dungeon Generator

Yeah it's just gonna take a bit of behavior changing and theme crafting

Can I use this to create an entire procedurally generated station??????

Technically yes, but god have mercy on you for how much behavior specifying code that will require

What does this area look like for mappers?

firefox_pEU8JQwzeN
image
you will need to create new areas of a shared subtype that use the same map_generator for them to cooperate and use one large continuous area during map generation

Why is this good for the game?

Variety is the spice of life, and random maints will offer tons of variety in how antagonists interact with the round and offer something more dangerous for board assistants to explore. This was originally born of the idea that randomized maints would give bloodsuckers a better chance to really hide since the layout of the area can't possibly be committed to memory ahead of time.

Testing

I've done a lot of personal testing, but I'm pretty sure this is going to require a lengthy testmerge period to iron out bugs, balance loot that appears, and expand on possible room themes to increase diversity

Spriting

While I did add sprite code, I don't think I added any sprites that didn't already exist

Wiki Documentation

This will probably require that I write a readme or page on how to use the generator because it's rather complicated and this isn't quite something that can be easily documented without trawling code. Also it might be best not to include exactly what can appear and loot tables for each room to discourage hunting for certain rooms because they can have a gamer item people want.

Special thanks to my dev friends who helped me along this journey

  • @ToasterBiome who, when i suggested the idea of proc maints said "when you code it". To which i said "bet" and then he proceeded to implement more and more requirements for it during development. You're the best worst dad I've ever had

  • @LazennG who suggested many themes and feedback and is always a good springboard for ideas

  • @Mqiib for suggesting themes and what specific loot each room should have. his suggestions resulted in the rooms themes being able to change their spawn pool dynamically before generating and alter the behavior of spawned items afterwords

  • @cowbot92 for confirming that the rust_g.DLL was crashing the server and IT WASN'T MY FAULT

Changelog

🆑
rscadd: New map generator called a Dungeon Generator. Which is used for procedurally generating areas that require rooms or controllable square/rectangular areas. For when lavaland's blanket noise generator is too indirect
rscadd: Procedurally Generated maints, an always random area with highly varied loot and dangerous mobs inhabiting it. Don't enter unless you're absolutely sure you're equipped and know what you're doing
rscadd: The Backrooms
wip: yes
mapping: Multi-Z GaxStation with procedurally generated maints
mapping: New /area/ type for proc gen
experimental: YES
/:cl:

@Chubbygummibear Chubbygummibear requested review from a team as code owners October 6, 2023 21:49
@Yogbot-13 Yogbot-13 added the Feature This adds new content to the game label Oct 6, 2023
@LassiH
Copy link

LassiH commented Oct 6, 2023

we need this

@Yarinoi
Copy link
Contributor

Yarinoi commented Oct 6, 2023

okay maybe gax is decent

@Moltijoe Moltijoe added the Literally the best PR My god its beautiful label Oct 6, 2023
@cowbot92
Copy link
Contributor

cowbot92 commented Oct 6, 2023

image

@github-actions github-actions bot added the Mapping Will result in a change to a map. label Oct 6, 2023
@Chubbygummibear
Copy link
Contributor Author

okay maybe gax is decent

1666324298

@patpol4
Copy link
Contributor

patpol4 commented Oct 6, 2023

no way

@patpol4 patpol4 changed the title Procedurally Generated Maints featuring Multi-Z Gax [MDB IGNORE] Procedurally Generated Maints featuring Multi-Z Gax Oct 6, 2023
@patpol4 patpol4 added the Fetish Content Oh hell no label Oct 6, 2023
@neeshacark
Copy link
Contributor

god bless autism

@MajManatee
Copy link
Contributor

image

@Chubbygummibear
Copy link
Contributor Author

adding a little demo of the maints and generate_backrooms proc

2023-10-06.16-05-28.mp4

@adamsong
Copy link
Contributor

adamsong commented Oct 7, 2023

Doesn't monstermos crash on multiz?

@Chubbygummibear
Copy link
Contributor Author

Doesn't monstermos crash on multiz?

I think Biome said it only crashes as a result of trying to have atmos flow between z-levels freely through open floor tiles. however ours don't try to pass atmos, so i think that mitigates the crashing. it does also present a funny possibility that if a z-level below is getting plasma flooded and you're on an observation deck, you would be able to watch the chaos without any of it reaching you just 10 feet up

@Moja10
Copy link
Contributor

Moja10 commented Oct 9, 2023

Merge without testing

@MajManatee MajManatee added the Awaiting - Action - HD Awaiting action from Jamie label Oct 17, 2023
@Chubbygummibear
Copy link
Contributor Author

alright the rust code has been merged and conflicts have been resolved. @ToasterBiome it's ready to be tested i think

@PhantornRU
Copy link

Still worked?

@Chubbygummibear Chubbygummibear changed the title [MDB IGNORE] Procedurally Generated Maints featuring Multi-Z Gax [MDB IGNORE] Procedurally Generated Maints (Sorry no Gax in this PR just the tools) Mar 22, 2024
Yogbot-13 added a commit that referenced this pull request Mar 31, 2024
Yogbot-13 added a commit that referenced this pull request Apr 1, 2024
@Moltijoe Moltijoe merged commit 0932358 into yogstation13:master Apr 1, 2024
Yogbot-13 added a commit that referenced this pull request Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Awaiting - Action - HD Awaiting action from Jamie Feature This adds new content to the game Fetish Content Oh hell no Literally the best PR My god its beautiful Mapping Will result in a change to a map.

Projects

None yet

Development

Successfully merging this pull request may close these issues.