New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Procedural Map Generator System #7751
Procedural Map Generator System #7751
Conversation
Kinda like LLA-Gaming/SS13#193, but for anywhere/anything? |
@Deantwo not quite, that just loads predefined templates of engineering, sort of like the holodeck on a bigger scale. This is completely customisable random generation, From Forests to (if you put in the effort to tinker and create modules) Entire stations. |
Interesting! 👍 |
So if someone makes enough modules, we can have a procedural derelict to make space exploration more fun and challenging? |
Provided the modules are created anything is possible! |
What about procedural destruction of the modules, so we don't have to make modules pre-damaged? |
Well, there's no procedural deletion at the moment, but you could accomplish that with a module that just spawns bombs that immediately explode. alternatively add the damaged versions of tiles as splatter or dense layers. |
Very nice. 👍 |
@xxalpha I'm not sure if that would have an effect. not to mention all usage of this outside of badminnery is lagless. |
I personally prefer hand-crafted maps, but hey I'm not going to get in the way of infrastructure. I'm really hoping that people really add a lot to this, as it's a pretty huge project by itself and needs tons of work to be usable. |
Excuse me >:/ hehe. Also as mentioned in the readme and various other places you can mix handcrafted areas and procedurally generated ones. For example a static, always the same station on a completely procedurally generated planet (Might make a good Away mission? :P) |
I'm still waiting on dismemberment |
This would be a good system to base a mining meteor bluespace magnet off of. Would this be easily changable on the fly of what will be spawned? Aka a slight change of one input makes more iron ores appear etc etc. |
@Jalleo you'd have to manually alter the contents of the module's spawnableAtoms and spawnableTurfs lists, but yes, you can have other code dynamically change what is spawned by modules. |
Sounds good I had a idea about one or two things that could be done at somepoint in the summer and this would be a good tool for its implementation. Edit: |
Is this still alive? |
Yes, and it's merge ready. |
Question, @RemieRichards, Can I port this to /vg/? |
@PJB3005 Feel free to do so. |
tgstation/tgstation#7751 Permission to port this at the bottom of the comments. All Credit goes to @RemieRichards for making this.
The mapGenerator datum takes a rectangular region defined by the user, and spawns atoms/turfs in that region based on certain settings.
Admin (R_DEBUG) Test verb added using a nature themed generator.
The mapGenerator datum contains many mapGeneratorModule datums, which do the actual heavy lifting work. The system is organised in such a way that ordering your mapGeneratorModule(s) like layers in a graphics program is encouraged, to give people an existing concept to base off of using this.
Some template modules are included.
a Full Readme and Mapper Guide is included.
Using this on an entire Z level while the rest of the game is running (untested in lobby and world gen) will lock up the game for about 30 seconds, but small regions (20x20 -> 100x100) are fairly smooth.
I see this as a non issue because this isn't supposed to be run in such large sizes or atleast not while the rest of the game is running you butt. (if necessary I could have the main beefy generate() proc postpone all subsystems while it builds)
Example: