ValkyrienSkies / Eureka

Basically Archimedes Ships, but with VS2 as the backend
Apache License 2.0
59 stars 34 forks source link

Raining inside assembled ships that have a roof or fully enclosed space #184

Open techheadfred-git opened 1 year ago

techheadfred-git commented 1 year ago

Not sure how easy this is to code around but being rained on in an enclosed space is quite jarring

CoderModeGit commented 5 months ago

image It should be pretty easy to fix, in client you could copy mojangs code for rendering rain but for blocks that are insanely far away, they might be fixing this in the 1.21 port

PriestOfFerns commented 5 months ago

fixing this would require constantly doing raycasts in a radius around every player whenever it’s raining, which is not very good for performance

CoderModeGit commented 5 months ago

I probably have got something wrong because I am not too familiar with client rendering but this is how vanilla handles it, I am sure eureka / valkrien skies handles it different image

PriestOfFerns commented 5 months ago

@CoderModeGit You might have noticed that minecraft blocks are in a grid, meaning checking if a block blocks rain is as easy as just checking block positions in a line.

VS2 ships meanwhile aren't in a grid. They can be positioned in any rotation, have any length, height or width, and take any shape. The only way to check if rain should pass is to cast a ray cast every few fractions of a coordinate to see if something blocks it from above.

CoderModeGit commented 5 months ago

I'm just suggesting basic ideas here but mabye not raycasting every frame but once when it starts raining and when the blocks update, I get what you mean about not being in a grid but maybe 16 different points of rain to check per block outside the ship