Skip to content

Add rain overlay effect#1989

Draft
manuq wants to merge 2 commits intomainfrom
rain-overlay-fx
Draft

Add rain overlay effect#1989
manuq wants to merge 2 commits intomainfrom
rain-overlay-fx

Conversation

@manuq
Copy link
Collaborator

@manuq manuq commented Feb 26, 2026

A rain effect that can be used in levels. Like the clouds shadow or fog visual effects, it has a randomize method.

A rain effect that can be used in levels. Like the clouds shadow
or fog visual effects, it has a randomize method.
@manuq manuq requested a review from a team as a code owner February 26, 2026 12:45
@manuq
Copy link
Collaborator Author

manuq commented Feb 26, 2026

Extracted as-is from the time & weather exploration #1913

@github-actions
Copy link

Play this branch at https://play.threadbare.game/branches/endlessm/rain-overlay-fx.

(This launches the game from the start, not directly at the change(s) in this pull request.)



func randomize() -> void:
var rain_type := randf()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to change this, but you could instead represent this as a Curve, domain and codomain both in the range [0, 1]; then you pick a random number between 0 and 1, index the curve with it, and the amount_ratio is the y-axis value; and the curve could be edited visually.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that is a great idea!

@manuq
Copy link
Collaborator Author

manuq commented Feb 26, 2026

I'll make it draft for now, so I can play with the "visual curve as setting for random values" idea.

@manuq manuq marked this pull request as draft February 26, 2026 14:18
Copy link
Member

@wjt wjt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is great as-is. If you find the Curve approach is worth it (I guess it would make it easier to customise the heaviness curve) then perhaps that could be a follow-up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants