-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add more guest events to scripting API (re-implementation of #19324) #21574
base: develop
Are you sure you want to change the base?
Conversation
2230048
to
01bcea7
Compare
I think this might have a pretty solid impact on the performance on bigger parks, DukTape is unfortunately painfully slow and given to how many hook types were added we should take measurements first. I suggest we use the EverythingPark to first measure the FPS on develop and then have one plugin with all the hooks setup to see if there is any change. |
To test, I'm using Linux Mint 21.3 Cinnamon (the OS I normally use) to build using cmake. Regardless of whether I subscribe to all hooks or neglect having a plugin at all, the results are the same. I originally tested using the default build mode (Debug):
Since this was strange that the changes improved performance, I wanted to have the frame rate a little higher and see the difference with more significant figures (building using Release):
These results definitely vary depending on how long you are spending in the park. I tried to be as consistent with how I was looking at the frame counter. The difference seems pretty negligible. I confirmed that the I've attached the plugin I was using. It does return early if the guest doesn't match, but that shouldn't be the reason for better performance, as the CPP code will still call the hook regardless while creating a |
I had a quick test as well with your plugin, here are the results:
I wouldn't be against adding this APIs but I do understand ZehMatts performance concern. To be fair, at first I expected the impact to be way bigger for parks with less than 12.000 guests. |
That's quite the impact. It doesn't need one plugin, if a few plugins are installed using one of these hooks it boils down to the same result. I know those hooks can be pretty useful and I'm definitely for more scripting possibilities however the fact we picked DukTape is in retrospective a pretty big mistake, its very unfortunate that we are limited by it. |
We are all well aware of that. Anything feasible we could do to make it better now? 😛 |
I must be doing something wrong since I still see no significant difference, even when running 10 copies of the guest event plugin. I'll leave the zip here of the plugins so others can test a bit better (if needed). |
This pull request has been marked as stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the |
f62109a
to
a2b360d
Compare
To me it looks like you have FPS limiting turned on, which explains why there is no visible change. |
This pull request will re-implement #19324 after its discussion went unresolved and went stale. It's more or less copy-paste but with a few minor changes:
guest.drown
hookGuestShopArgs
uses theGuestItem
type to represent what item was boughtHookType
, which also fixesHookType
missing values #17512 (seen as I was already adding hooks, I thought fixing this issue made sense, but I can also make this a separate pull request if desired)