Skip to content

Forest/flowerbed generator #556

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

Open
wjt opened this issue May 12, 2025 · 2 comments
Open

Forest/flowerbed generator #556

wjt opened this issue May 12, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@wjt
Copy link
Member

wjt commented May 12, 2025

I'm working on and off on a forest/flowerbed generator, with two related goals:

  • Make it possible to add a new flower to Fray's End by simply placing a PNG into a particular folder (and crucially not editing frays_end.tscn with resulting merge conflicts)
  • Allow defining the collision polygon for a forest and having it be automatically be filled with trees at some particular density
@wjt wjt self-assigned this May 12, 2025
@wjt wjt added the enhancement New feature or request label May 12, 2025
@manuq
Copy link
Contributor

manuq commented May 12, 2025

Awesome! Is the goal to have eg. a single Forest node replacing the zillion of Tree nodes in Fray's End scene? Or to be a starting point for having a lot of Tree nodes? (a generator, in other words) I ask this because I saw the "scene dressing" phase carefully placing each tree one by one. See #471 (comment)

I think a single Forest node would be the best for big areas, and other trees (or flowers) around can still be placed 1 by 1.

@wjt
Copy link
Member Author

wjt commented May 12, 2025

Here's what I have in mind:

Forest

Add a Forest node. Give it 1 or more collision shapes, typically a polygon (as seen in all the levels with trees at the edges). Choose 1 (or more???) tree sprites (as an inspector property of the forest). Now in the inspector click "regenerate forest". The tool script fills in the collision shape with trees with the given spriteframes, which are persisted to the .tscn so that at runtime they are not regenerated.

If you dislike the arrangement you can regenerate, perhaps after tweaking some density property. Or you can just move the specific tree that is offending you.

Flowerbed

Define a new flower.tscn which (at runtime) picks a random flower from a folder. (For bonus points make this be deterministic so long as the folder's contents don't change, perhaps based on the flower's path within the scene.)

Add a Flowerbed node to Fray's End (suspiciously similar to the Forest node). Give it a collision shape. Click generate. Now disable the collision shape so that the player can frolic in the flowerbed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants