Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Fix for meteors spawning underground, partial #532

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix for meteors spawning underground, partial #532

wants to merge 1 commit into from

Conversation

progfz
Copy link

@progfz progfz commented May 21, 2016

When in planet gravity and sun is below surface, meteors will spawn from
direction opposite to sun. It makes meteors much less likely to spawn
underground but is not a complete solution - deep underground bases and
bases on mountain hills still could be affected.

When in planet gravity and sun is below surface, meteors will spawn from
direction opposite to sun. It makes meteors much less likely to spawn
underground but is not a complete solution - deep underground bases and
bases on mountain hills still could be affected.
@fabricator77
Copy link

Wonder what happens at the equator though, where the meteors would be travelling parallel to the surface.

@Jimmacle
Copy link

Jimmacle commented May 22, 2016

@fabricator77 As OP said, it's only a partial fix because asteroids coming from within the planet are far worse than odd meteor trajectories.

@progfz What if you calculated a direction using the player and the center of the gravity source? That way they will always travel straight at the surface. Having meteors come from the sun all the time is a strange phenomenon in the first place 😛

@progfz
Copy link
Author

progfz commented May 22, 2016

@fabricator77 why should they be parallel to surface at equator? With original logic meteors always come from sun and my addition is only reversing that direction if angle between reversed gravity and direction to sun is greater than 90 degrees. Parallel trajectories will happen when direction to sun is nearly parallel to surface, just as how it's in default implementation.

@Jimmacle it's nothing hard to implement by taking reversed normalized vector of gravity instead of direction to sun and leaving all other calculations as is. But meteors from the sun are current way of how things are working so I just based my calculations on it. In my opinion things should be done not in a rush but rather one step at a time - for example, first to resolve most broken part of underground meteors and then to start thinking about more complete fix or even about feature overhaul, in this way if first pull request is accepted it will give biggest immediate impact with minimal efforts while gathering feedback and ideas for future iterations.

BTW, currently meteor showers are not bound to player but rather to block grids near player, if I understood code correctly, and showers already have central point that could be used for all kinds of calculations instead of player position.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants