sloukit / pydew-valley-uzh

Mod of Pydew Valley for an experimental study in Psychology
Creative Commons Zero v1.0 Universal
32 stars 61 forks source link

perf: Optimization + chunk system #228

Open michelfinley opened 1 month ago

michelfinley commented 1 month ago

Summary

This PR optimizes several code sections to improve performace.

Overall, this increases average FPS by about 2-2.5x on both desktop and pygbag

Checklist

Labels

type: enhancement, game-playtesting

DangerousVanilla commented 4 weeks ago

@michelfinley, looks like a lot of great work going on here! You might check with @tank-king too, he was doing some work toward optimizing the blur effect when you where the glasses and possibly something else I can't remember.

Super nice to see you have the FPS like 4x on my PC at least but when you put on those glasses it still drops to an abysmal 35fps or so which will become unplayable online with pygbag. That might already be on your agenda here, just figured I'd throw it out there just in case!

tank-king commented 4 weeks ago

Very good! I have the draft of my performance boost fix, I can post it here if you want, or I can make a new PR once this draft is completed.

sloukit commented 3 weeks ago

@DangerousVanilla can you approve this for merging?

michelfinley commented 3 weeks ago

@tank-king Thanks! Whatever you prefer, you are welcome to add it here if you'd like :D

michelfinley commented 3 weeks ago

@DangerousVanilla Thanks a lot! Nice that the games performance increased even more on your side than it did on mine, it makes me really optimistic that it eventually runs on pygbag with good avg fps :D And yeah... I've also noticed that the FPS often drop when NPCs are searching for a new path, leading to stuttering - I'm still looking to improve that as well