Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Frame Skipping: Not Calling "Sync()" Every Frame Has Bad Results?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 10th Sep 2019 14:18
Hi,

Trying to get our HTM5 version running well on a slow desktop.
Currently getting only 15 Frames Per Second.

We tried frame skipping, but not calling "Sync()" every frame seems to have bad results?
Any other ideas?

Let us know, thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com
Bored of the Rings
User Banned
Posted: 10th Sep 2019 14:47
Unfortunely, you have already raised this in another thread, or they are very similar. be careful there are mods about

https://forum.thegamecreators.com/thread/221237
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 11th Sep 2019 18:20 Edited at: 11th Sep 2019 19:11
Quote: "not calling "Sync()" every frame seems to have bad results?"

of course it does, it's literally designed to keep everything in sync... if you want to skip frames you should skip your code that's non essential but still sync every chance you can
i.e.
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 11th Sep 2019 19:48
few things u could try. running on an old system would be pointless for playing a game so I imagine you doing something else with it either software or server. but you could try manually refreshing without sync() allowing you to skip any screen clears so you have persistence of an image for a frame or two until the next manual sync. 2nd u can try to clean up code so nothing is being drawn a second time that doesn't absolutely have to be drawn. and third run ur game loop in the background and force a sync every .03 ms with only 1 game loop run inbetween. other then that, upgrade ur hardware, this is a language for gaming not arduinos programming.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Sep 2019 01:19
Is your sprite movement time based? If not, it might be a good idea to convert to time based movement
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Sep 2019 07:45 Edited at: 13th Sep 2019 08:13
Looking at the previous thread where you asked the same thing two years ago it seems you haven’t learned from the advice you were given back then.
So I’ll say it one more time. Stop trying to skip frames and learn how to do timer based movement.
That is the only way to solve your issues. If you continue to ignore people’s advice then those people will most likely stop giving you advice. So help yourself by letting people help you and implement timer based movement.

Here’s a video that explains it perfectly. The code is in Python but that shouldn’t matter because it explained so well that the conversion is easy.


If you are willing to listen to the advice this time and need still need help converting to AppGameKit then myself or others can provide an example.
TomToad
6
Years of Service
User Offline
Joined: 6th Jan 2018
Location:
Posted: 13th Sep 2019 08:47
To add to that video posted by Scraggle, AppGameKit has its own command for calculating delta, GetFrameTime(). Very easy to use, the example in the video written in AGK

Login to post a reply

Server time is: 2024-11-22 17:22:02
Your offset time is: 2024-11-22 17:22:02