woesss / JL-Mod

J2ME emulator for Android (unofficial fork of https://github.com/nikita36078/J2ME-Loader)
Apache License 2.0
171 stars 13 forks source link

Lock fps #93

Closed Phalam754 closed 2 months ago

Phalam754 commented 4 months ago

Is it possible to fps lock the game?Because some games automatically change the fps down, which is very annoying. I want the fps to always be at 60 fps.Games that drop to 20fps or 30fps are very annoying.

woesss commented 4 months ago

The tractor will not go at the speed of an F1 car. Of course, you can attach a rocket engine to it, but at such a speed it will fall apart or become uncontrollable and crash. The same goes for games - if a game is designed for 20 frames per second, then at 60 it will, at best, simply produce 3 identical frames in a row, which will visually look the same as at 20 fps. Or it will speed up gameplay. Or errors will appear, even crashing.

Phalam754 commented 4 months ago

https://vn.phoneky.com/games/?id=j3j102827 The game can run at 57fps.Large animations are reduced. 240320 fps is always high. 360640 fps is reduced to low

woesss commented 4 months ago

This is logical: the more pixels, the more time it takes to process them.
GoF2 is a hard game and emulation makes it even harder.
Unfortunately, I have already applied all the optimization techniques known to me.
In order to optimize the game as much as possible, it should not be launched through an emulator, but ported to Android.

Phalam754 commented 4 months ago

You mean the jar conversion to APK. A way that's been around for a long time and seems to have disappeared.

Phalam754 commented 4 months ago

Perhaps the problem is with the Android device hardware.I tried again on another Android device, k40 gaming.With dimensity 1200 chip.The game operates more stably at 60fps.There is a slight decrease to 3x but not significantly. If set at 120fps, it sometimes drops to 7x fps

Phalam754 commented 4 months ago

I am using another Android device, Xiaomi qin f22 pro. Xiaomi qin f22 pro Android device with weaker hardware. Chip Helio G85. It seems very weak Those are the highest-end Android devices with t9 physical keyboard that I know of. Actually using it with j2me is great. https://binboupan.github.io/2023/08/qin-f22-pro/

iplayfastandfurious commented 3 months ago

https://vn.phoneky.com/games/?id=j3j102827 The game can run at 57fps.Large animations are reduced. 240_320 fps is always high. 360_640 fps is reduced to low

By 240 x 320, they mean the sizr of the .jar. Common for most java games being that size

woesss commented 2 months ago

This is a performance issue and locking FPS will definitely not solve it.
Locking FPS involves updating the screen on a timer and this will not in any way affect the speed at which the game prepares the buffer.
It will just draw the same thing several times. Visually, you will not notice any changes, except for the stabilization of the FPS counter itself