Skip to content
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

Merged
merged 2 commits into from Mar 6, 2015

Conversation

RemieRichards
Copy link
Contributor

  • Adds mapGenerator datum
  • Adds mapGeneratorModule datum
  • Adds some misc defines for objects that had sprites but never existed, for a test case

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:
Procedural Forest

@RemieRichards RemieRichards added the Feature Exposes new bugs in interesting ways label Feb 15, 2015
@Deantwo
Copy link
Contributor

Deantwo commented Feb 15, 2015

Kinda like LLA-Gaming/SS13#193, but for anywhere/anything?

@RemieRichards
Copy link
Contributor Author

@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.

@Deantwo
Copy link
Contributor

Deantwo commented Feb 15, 2015

Interesting! 👍

@Thunder12345
Copy link
Contributor

So if someone makes enough modules, we can have a procedural derelict to make space exploration more fun and challenging?

@RemieRichards
Copy link
Contributor Author

Provided the modules are created anything is possible!

@Thunder12345
Copy link
Contributor

What about procedural destruction of the modules, so we don't have to make modules pre-damaged?

@RemieRichards
Copy link
Contributor Author

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.

@Steelpoint
Copy link
Contributor

Very nice. 👍

@RemieRichards
Copy link
Contributor Author

@xxalpha I'm not sure if that would have an effect. not to mention all usage of this outside of badminnery is lagless.

@WJohn
Copy link
Contributor

WJohn commented Feb 15, 2015

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.

@RemieRichards
Copy link
Contributor Author

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)

@ike709
Copy link
Contributor

ike709 commented Feb 15, 2015

I'm still waiting on dismemberment

@Jalleo
Copy link
Contributor

Jalleo commented Feb 16, 2015

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.

@RemieRichards
Copy link
Contributor Author

@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.

@Jalleo
Copy link
Contributor

Jalleo commented Feb 16, 2015

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:
I presume thos is waiting for a person to merge or test now right? @RemieRichards

@GunHog
Copy link
Contributor

GunHog commented Mar 4, 2015

Is this still alive?

@RemieRichards
Copy link
Contributor Author

Yes, and it's merge ready.

@Jalleo
Copy link
Contributor

Jalleo commented Mar 4, 2015

@Cheridan @phil235
Edit: @Miauw62 if this pings ya please have someone look at this if you dont want to.

@hornygranny hornygranny merged commit 68c791e into tgstation:master Mar 6, 2015
@PJB3005
Copy link
Contributor

PJB3005 commented Apr 7, 2015

Question, @RemieRichards, Can I port this to /vg/?

@RemieRichards
Copy link
Contributor Author

@PJB3005 Feel free to do so.

PJB3005 added a commit to PJB3005/vgstation13 that referenced this pull request Apr 8, 2015
tgstation/tgstation#7751
Permission to port this at the bottom of the comments.

All Credit goes to @RemieRichards for making this.
@ike709 ike709 mentioned this pull request Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants