Skip to content
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

[MIRROR] Overmap movement refactor #3257

Open
wants to merge 1 commit into
base: dev-sierra
Choose a base branch
from

Conversation

SierraHelper
Copy link
Collaborator

Оригинальный PR: Baystation12#35014

🆑 Atebite
tweak: Refactor overmap objects to allow all objects on the overmap to move
tweak: Movement indicators on the overmap have been adjusted to work with multiple object types
tweak: The sub-tile position of all overmap objects is now slightly randomized
bugfix: Fixed ships wrapping around the overmap too early into edges
bugfix: Fixed minimum speed checks on overmap movement
/🆑

Port overmap movement code from ships up to /obj/overmap. Acceleration logic is tightly coupled with ship thrusters, so I've left that alone. Icons are changed, but otherwise, from the player's POV, nothing has changed. The idea is to build new features on this refactor later.

Overmap object movement

All overmap objects are now capable of moving on the overmap. Note that this PR doesn't make anything that didn't move before move. It just adds the technical capability for them to do so.

The picture below is only for illustrating the capabilities added by the refactor (that is, this is done with VV):
bilde

Heading indicators

Heading indicators are now 8-directional overlays on objects.
bilde
bilde

Also thought about doing a heading indicator which is accurate to the real heading/movement path, but it didn't look very good at most angles in my opinion.
dreamseeker_5nIEItCECM
Judging by the code I didn't get the impression that sensors should be able to perfectly know ship headings, either. Though if this is desired it's simple to re-introduce it.

Sub-tile position randomization

The initial spawn subtile position of most overmap objects is now randomized by up to 3 pixels in any direction. The effect is subtle but makes the overmap look less rigid. Subtile position randomization does not apply to ships, so the Torch (and other ships) will continue to spawn dead center on its starting tile.

bilde

Bug fixes

Minimum speed logic

An important note is that the old movement code had a bug related to minimum speed, making ships report as moving even when below minimum speed. To preserve the old feel of ship handling, the minimum speed has been lowered to 1 tile / 10 minutes (roughly 0.17Gm/h).

Wraparound

Previously, ships would wrap around when hitting the tile before the northern and eastern edges, and wrap around into the opposite edge tile. Objects now correctly wrap around on touching the map edge to the other map edge's boundary.

@SierraHelper SierraHelper requested a review from a team as a code owner February 17, 2025 04:03
@github-actions github-actions bot added the ⛰️ Спрайты PR затрагивает спрайты label Feb 17, 2025
@SierraHelper SierraHelper added the 📜 CL валиден Ченджлог не содержит ошибок label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪞 MIR ЯОЯ ⛰️ Спрайты PR затрагивает спрайты 📜 CL валиден Ченджлог не содержит ошибок
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants