-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update _GameMaker.js #391
base: develop
Are you sure you want to change the base?
Update _GameMaker.js #391
Conversation
@GINOFM, I've taken the time to review and test your proposed changes. Unfortunately, it appears that there's an issue where the frame tick is not advancing beyond the initial frame of execution. Could you please double-check to ensure your solution is compatible with the latest version of the runner? We're eager to incorporate your PR, especially if it resolves the freeze-on-touch problem we've been facing. Your efforts towards refining this fix are greatly appreciated. |
scripts/_GameMaker.js
Outdated
// this might be best done after if(!Run_Paused) block, | ||
// but then an exception would halt the game loop. | ||
var nextFrameAt = g_FrameStartTime + 1000 / TargetSpeed; | ||
var now = g_CurrentTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using g_CurrentTime
instead of Date.now();
seems to be locking the runner to not go past the first frame of execution.
hello, I tested it again with the version "GameMaker-HTML5-2024.02.0-main", I realized that it works for me since I used it with projects already started, but in new projects it is necessary to add some sprites or a big image (at least 1024px*1024px), with that it avoids that it freezes at the beginning; it is not the ideal solution but it works, I have to continue investigating to what is due that error. var nextFrameAt = g_FrameStartTime + 1000 / TargetSpeed;
also I only used this code, and move the newfps from the previous statment. |
a solution for the fps issues in mobile
A fix was merge on solving this issue already. It went into developer branch. Stutter should be reduced on inexistent, please consider verifying the developer branch. |
Hi, I tested the developer branch, the issue is reduced but still persist |
I tested it with the develop version, it is no longer necessary to add an image to make it work and it looks much more fluid on mobile. |
Hello, I tested in the newest version of GM, and the performance in html5 in mobile is really bad, unplayable, I tested my code and still work |
I can confirm that the issue with the short stutter on every screen touch is (still or again?) present in the current 2024.1100 Beta on Android when using Chrome. In Firefox it works fine. |
A possible solution to stuttering in mobile browser, mostly when the player touch the screen but not limited to that.
I develop multiplatform games (html5 web, Android and Windows); throughout the year I have been looking for a solution to the problem of micro lag or micro cuts when a game is played in a mobile browser, I have been using this solution with good results, now the games go really smooth on mobile and desktop.
The only problem I found is that the FPS counter (fps function) does not work correctly even if the game is running at a stable 60fps.