carenalgas / popochiu

Godot plugin to make point-and-click adventure games, inspired by tools like Adventure Game Studio and PowerQuest.
https://carenalgas.github.io/popochiu/
MIT License
205 stars 19 forks source link

Optimising walking processing #340

Open balloonpopper opened 1 week ago

balloonpopper commented 1 week ago

What's the expected benefit of the feature you are requesting?

While stepping through the code to find a bug, I've found that walking seems to be very inefficient code-wise. Every frame

All of this seems very inefficient (plus it makes debugging hard as you step through lots of (potentially) unnecessary code)

Describe the solution you'd like

Walk speed/direction/animation being used etc are all cached. If something changes they're reevaluated. The navigation should be something like If the character isn't on a scaling region, and they're travelling the same direction they were last time, reuse the same walk speed and animation and move the character.

Describe alternatives you've considered

None

Additional context

None