-
Notifications
You must be signed in to change notification settings - Fork 565
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
Shrapnel smooth movement [WIP] #6821
Shrapnel smooth movement [WIP] #6821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fps for me seems approximately the same. Self cpu of animate_flight does increase by .24 (or 0.0000064205232035814 per call) but shrug
I don't think local testing can determine anything beyond "this does/doesn't horrifically break something". The issue with shrapnel only showed up during a cluster OB when there were 100+ people on the server. The best I can figure is it had something to do with the amount of appearance data being sent out so that's what I focused on reducing. Don't have any tools that can test that, though. |
Feel free to close if you aren't happy with the result or don't see any way to salvage it. |
didn't have any beneficial effect
surely a purely visual effect is less intensive than using objects, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This drastically reduces the damage delt by a cluster and just visually doesn't really have much happening at all.
Apparently I didn't actually submit my initial comment update, fixed now.
I'm not sure what you mean by drastically reducing damage. The only shrapnel being replaced is this and its subtypes: cmss13/code/datums/ammo/shrapnel.dm Lines 125 to 128 in 6a72a98
Each cluster OB explosion is 350 damage. It can generate up to 18 shrapnel of this kind, for at most 18 damage if it all hits something and isn't immediately absorbed by armor. I'm not sure what you mean by not much happening visually. The exact same amount of shrapnel is generated, spreading out in approximately the same way, travelling approximately the same distance. The only thing you'd miss is a shrapnel hitting something and it popping up a hit marker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine, and seems to test and look fine. But will be on TM for people to get a feel for whether its too costly for client fps over the old.
About the pull request
Shrapnel movement is now smoothed by an
animate()
.This is a follow on from #4986 , attempting to resolve the performance issue that forced shrapnel to be excluded: #4986 (comment)
Replaced the visual-effect-only shrapnel
/datum/ammo/bullet/shrapnel/light/effect
with a particle system that imitates their look. The two main differences are the particles don't collide with anything and all are using the "sparks" icon instead of the "tracer" icon because the tracer has a clear direction to it and particles can't easily coordinate angle and facing.tracer on left, sparks on right
TM yes, full merge no. The current particles implementation is single-purpose for testing. Assuming all works well and its not causing client performance issues, will bring in a more robust solution such as in TGMC.
Surely using a purely visual effect is less taxing than using full-up objects. Surely BYOND is sensible in that regard.
Right?
Explain why it's good for the game
Smoother apparent movement for shrapnel gives a more appealing look.
Testing Photographs and Procedure
Screenshots & Videos
Server memory stats and average client render.
baseline:
after cluster OB, current master:
after cluster OB, initial commit:
after cluster OB, particles experiment commit:
On master gains about 120KB in appearances.
On initial commit gains about 1.2MB in appearances. Unsure why. Maybe the
mutable_appearances
count and aren't being discarded?On particles experiment commit gains about 40KB in appearances. Presumably the reduction is due to the client handling generating some of those appearances instead.
No significant difference on average render times for baseline, master, or initial commit.
Particles cause a moderate render time increase for particles experiment commit during a cluster OB.
Works without issue on my local machine. Unable to test at appropriate scale. One TM and one cluster OB should give a definitive answer.
Changelog
🆑
code: shrapnel smoothly animates their movement
code: visual-effect-only shrapnel replaced by clientside particles
/:cl: