Certain types of wheels cause FPS to drop on various older (low-end?) phones #2

Closed
opened 2024-01-23 21:00:12 -05:00 by chipmunkmc · 7 comments
Owner

Discovered on a second generation Moto E running LineageOS 17.1. The attached video demonstrates the issue on said phone. Notice how at 01:14, 01:55, and 02:23, the FPS averages 60, while at 02:39 and 03:02 it is significantly lower.

Discovered on a [second generation Moto E](https://en.wikipedia.org/wiki/Moto_E_(2nd_generation)) running LineageOS 17.1. The attached video demonstrates the issue on said phone. Notice how at 01:14, 01:55, and 02:23, the FPS averages 60, while at 02:39 and 03:02 it is significantly lower.
Author
Owner

Reproduced on a ZTE Overture (Cricket) running Android 4.1.2 (stock rom). The attached video was recorded using the camera of the previous phone because I cba to find a video recorder that runs on anything older than android 5.0.

Reproduced on a ZTE Overture (Cricket) running Android 4.1.2 (stock rom). The attached video was recorded using the camera of the previous phone because I cba to find a video recorder that runs on anything older than android 5.0.
Author
Owner

Reproduced on a ZTE QUEST N817 running Android 4.4.4 (stock rom).

Reproduced on a ZTE QUEST N817 running Android 4.4.4 (stock rom).
chipmunkmc changed title from Certain types of wheels cause FPS to drop on various old phones to Certain types of wheels cause FPS to drop on various older (low-end?) phones 2024-01-23 22:23:55 -05:00
Author
Owner

Reproduced on a Samsung Galaxy Core Prime (Verizon Wireless) running Android 5.1.1 (stock rom).

Reproduced on a Samsung Galaxy Core Prime (Verizon Wireless) running Android 5.1.1 (stock rom).
Author
Owner

This does not appear to happpen on the latest android release of Bad-Piggies-Original (the upstream decompilation project) on my Moto E. This means that the issue is most likely exclusive to this fork. (please note that it does not have the FPS counter enabled)

This does not appear to happpen on the [latest android release](https://github.com/BP-Innovation/Bad-Piggies-Original/releases/download/v2.3.6/Bad-Piggies-2.3.6-Android.apk) of [Bad-Piggies-Original](https://github.com/BP-Innovation/Bad-Piggies-Original) (the upstream decompilation project) on my Moto E. This means that the issue is most likely exclusive to this fork. (please note that it does not have the FPS counter enabled)
Author
Owner

Possibly fixed by a193352324 ? might test tmrw

Possibly fixed by a1933523241a16081c5858689d02031c00a773a9 ? might test tmrw
Author
Owner

Also, this code is most likely the cause:

	protected override void UpdateSoundEffect()
	{
		float num = 1f;
		if (Mathf.Abs(this.m_spinSpeed) > num && this.m_grounded)
		{
			if (!this.loopingWheelSound)
			{
				this.SpawnSound();
			}
			this.loopingWheelSound.volume = 0.2f * (Mathf.Abs(this.m_spinSpeed) / num - 1f);
		}
		else if (this.loopingWheelSound)
		{
			this.loopingWheelSound.volume = 0f;
		}
	}

Since each attempt to SpawnSound() failed for those types of wheels because of #4, most likely the method got called on every update, which most likely caused the game to run more slowly. If this is the case, the commit mentioned above probably fixed it, but again, I will test that later.

Also, this code is most likely the cause: ```csharp protected override void UpdateSoundEffect() { float num = 1f; if (Mathf.Abs(this.m_spinSpeed) > num && this.m_grounded) { if (!this.loopingWheelSound) { this.SpawnSound(); } this.loopingWheelSound.volume = 0.2f * (Mathf.Abs(this.m_spinSpeed) / num - 1f); } else if (this.loopingWheelSound) { this.loopingWheelSound.volume = 0f; } } ``` Since each attempt to `SpawnSound()` failed for those types of wheels because of #4, most likely the method got called on every update, which most likely caused the game to run more slowly. If this is the case, the commit mentioned above probably fixed it, but again, I will test that later.
Author
Owner

Surely enough, a193352324 fixed it.

Surely enough, a1933523241a16081c5858689d02031c00a773a9 fixed it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chipmunkmc/rise-and-swine#2
No description provided.