MovingBlocks / DestinationSol

Official continuation of Destination Sol, the great fun little arcade space shooter from http://sourceforge.net/projects/destinationsol/ Modules live at https://github.com/DestinationSol/
Apache License 2.0
326 stars 123 forks source link

Android performance improvements (and sound fix) #679

Closed BenjaminAmos closed 1 year ago

BenjaminAmos commented 1 year ago

Description

This pull request makes some small optimisations to frequently-called parts of the code.

It also applies a fix to clamp sound effect volumes to a range of [0, 1]. Values outside of this range are not supported by libGDX and actually cause some sounds to not play at all on one of my Android devices.

Testing

Follow the reproduction instructions in #556. There should be slightly less stuttering during rapid collisions.

Notes

The DrawableManager fix was based on profiling an Android build and may not neccessarily be a significant factor in overall performance.