Chris3606 / GoRogue

.NET Standard roguelike library in C#. Features many algorithms and data structures pertinent to roguelike/2D game developers, specifically designed to be minimally intrusive upon the developer's architecture.
MIT License
494 stars 31 forks source link

Incorporate new Generation Steps from the Integration Library into GoRogue #218

Open fcheadle opened 3 years ago

fcheadle commented 3 years ago

The new Integration Library contains several fun new Generation Steps. These are purely GoRogue, and don't necessarily fit the bill for an integration lib, so some (all?) of them can be moved into GoRogue. The steps are as follows:

I think that there is a case that ALL of them should be incorporated, with changes to match consistency and style. At the very least, the composite generator should be brought in.

fcheadle commented 3 years ago

Here's my proposal:

ParallelogramGenerationStep moves almost as-is, except that it has constructor and fields similar to existing generation steps (and uses the same tags). Test it to make sure that the pattern rotates correctly.

BackroomsGenerationStep should change so that it takes the RNG from the constructor, and add matching wallfloor/tunnel tags and such to make them "safe". I should also try and fix the bug in the primitives library documented here. Then, I should try and make the algorithm produce rooms with single-width walls.

SpiralGenerationStep is almost perfect, but should be reduced for simplicity, made safe by using appropriate tags, allow for a parameter to set the point of origin, and the numbers perhaps tweaked slightly.

BrickWorkGenerationStep is a new generation step I haven't gotten around to writing yet, but it lays out rectangles in a brick-work pattern. should accept a custom angle of rotation and implement tag components safely, but does not need an RNG

CompositeGenerationStep should be split in two:

fcheadle commented 3 years ago

Doing this will solve this issue in the integration library by deleting those generation steps

Chris3606 commented 3 years ago

Can you get a PR up with these, even if it's just a draft PR that copies them as-is, so that we can keep track of it exclusively here and remove them from the integration library?

fcheadle commented 3 years ago

We've left the Pr for too long and it got stale. The branch new-generation-steps still has some things we can look at, so maybe we'll keep it around for now

Chris3606 commented 3 years ago

Recommend we keep the branch, and refactor it sometime down the line to bring it in line with newer concepts.

Chris3606 commented 2 years ago

Looking at this, most of the changes to GoRogue since the PRs creation didn't affect the steps added directly. It would require some refactoring to line up with library standardization, but the branch is probably still roughly as valid as it was when it was created, just would need to have the changes yanked out and resubmitted as a PR.