Skip to content

PR Stack - Movement Optimizations - #12753

Open
fira wants to merge 10 commits into
cmss13-devs:masterfrom
fira:move-optimizations-2026
Open

PR Stack - Movement Optimizations#12753
fira wants to merge 10 commits into
cmss13-devs:masterfrom
fira:move-optimizations-2026

Conversation

@fira

@fira fira commented Jul 28, 2026

Copy link
Copy Markdown
Member

About the pull request

8 independent changes to optimize/maintain core movement code that has been untouched since forever.
None of these is a real gamechanger, but together they should improve performance slightly. We have a lot of players and we do a lot of movement, you see. And not only the players move. It adds up, really fast.

Contents

Chapter 1: Refactor nutrition

Moves nutrition around to kill an unncessary /mob/living/carbon/Move that did nothing else.

Chapter 2: Remove COMSIG_ATOM_EXITED

Swaps that signal for a more traditional COMSIG_MOVABLE_MOVED in minimap.
This allows to remove the /atom/Exited handler, which is executed for every move of everything, all the time.
At a glance this should net 0.5% perf on movement. Could not properly test it though...

Chapter 3: Remove COMSIG_MOVABLE_ENTERED_OBJ

Same story as above. This one only fires on /obj moves so it's less of a deal.

Chapter 4: Modernize /turf/Enter

This is the fun one! It's mostly maintenance save for a few removed typechecks.
Renames and shuffles all the relevant variables in collision checks for movement to be on par with standard code.
Also clears a very weird misconception (forget -> oldloc) and uses BYOND provided oldloc, instead of infering it from object.

Chapter 5: Nukes nuke disk code

We simply don't use that.

Chapter 6: /turf/Entered optimization

Just removes an unneeded typecheck. That's it.

Chapter 7: Signalify handle_rotation

As for Chapter 2, that was firing in every /atom/movable/Move when it was only needed in a couple cases.
I implemented it by COMSIG_ATOM_DIR_CHANGE in chairs, but as far as i can see, everything already has handlers for it already? It's possible i missed some cases though.

Chapter 8: kill /mob/living/carbon/human/Crossed

This is probably the biggest offender for mob movement, Crossed() is fired against every content of everything you move to.
As it turns out, MuleBots don't work anyway so they don't need to run over anything.
As for vehicles, RunOver() was a placeholder proc that didn't do anything.
Gone.

Testing Photographs and Procedure

Changes were tested individually in a basic fashion, but changes in move code reach out everywhere, so this will need live testing.

Changelog

🆑
del: MULEbots cannot run people over anymore. They still can't really move either way.
/:cl:

@fira fira added the Performance the game sucks and this makes it suck less label Jul 28, 2026
@fira fira added the Needs Testing Need to test it on the guinea pigs (production server) label Jul 28, 2026
@github-project-automation github-project-automation Bot moved this to Awaiting Review in Review Backlog Jul 28, 2026
@cmss13-ci cmss13-ci Bot added Removal snap size/L Denotes a PR that changes 200-799 lines, ignoring generated files. labels Jul 28, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Jul 29, 2026
@fira
fira force-pushed the move-optimizations-2026 branch from 0e084f0 to a4b17e5 Compare July 29, 2026 10:06
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github added Merge Conflict PR can't be merged because it touched too much code and removed Merge Conflict PR can't be merged because it touched too much code labels Jul 29, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@fira
fira force-pushed the move-optimizations-2026 branch from a4b17e5 to 408188a Compare July 31, 2026 13:45
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Jul 31, 2026
@fira fira added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Jul 31, 2026
@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Aug 1, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@fira
fira force-pushed the move-optimizations-2026 branch from 408188a to d25b517 Compare August 1, 2026 11:43
@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Aug 1, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@fira

fira commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

This prevents the ARC from moving right now, not merge viable until this is fixed

@fira
fira marked this pull request as draft August 4, 2026 17:25
@Drulikar

Drulikar commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Somereason this makes help intent into open_space trigger both a fall and a climb down (instead of preventing movement forward for the climb only to occur instead)

do a flip

@fira

fira commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Should be fixed now, mishap with the way the return value was handled

@cmss13-ci

cmss13-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@cmss13-ci cmss13-ci Bot added the Stale beg a maintainer to review your PR label Aug 21, 2026
@Nihisohel Nihisohel added Stale Exempt PR can't go stale and removed Stale beg a maintainer to review your PR labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Performance the game sucks and this makes it suck less Removal snap size/L Denotes a PR that changes 200-799 lines, ignoring generated files. Stale Exempt PR can't go stale

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

4 participants