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 / Trying To Add Frame Skipping But It's Not Working?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 27th Dec 2017 09:29
Hi,

Trying to add frame skipping to the game, but it's not working:


It runs too fast, any ideas?
Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 27th Dec 2017 13:44
Been fighting with this for hours...

I want to do frame skipping for slow computers.
Does anyone know how to properly do this, thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
puzzler2018
User Banned
Posted: 27th Dec 2017 14:00
Would a half a second a 1 second timer() do



Maybe?
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Dec 2017 18:15
Why are you trying to skip frames? That's crazy talk!
Use frame rate independant movement. That way sprites will always move at the same speed but the movement will be smoother on faster processors.
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 27th Dec 2017 18:20
Hi,

I would have to rewrite most of the graphic core to do that.
I ended up with doing the following change which improved the FPS significantly:



Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 27th Dec 2017 22:24
Quote: " I would have to rewrite most of the graphic core to do that.
"

This is akward, but Scraggle is right. Your keywords are: timer based movement, frame independent movement

You just optimized you rendering pass by reducing the sync(). Well, if it's enough, then hooray

[/url]
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 27th Dec 2017 23:05
Quote: "I would have to rewrite most of the graphic core to do that."


You should do it anyway

Fix it now, never worry about it again.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
puzzler2018
User Banned
Posted: 27th Dec 2017 23:10
Sorry to but in but thats correct also,

Use the sync for every frame and timer for independant workings of an app

i.e
do
every second move an object
every 3 seconds play a weary sound
every 5 seconds do something else
sync
loop

This is a must otherwise ones will feel the app is jumpy and quirky

Let synch do its magic and you control what to do on a timer based
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 28th Dec 2017 02:47 Edited at: 28th Dec 2017 02:48
Quote: "Why are you trying to skip frames? That's crazy talk!"

lol balalalalapoontang!

Quote: "Let synch do its magic and you control what to do on a timer based "

Good advice

Start using those draw command spells and you will quickly learn the right way to use your sync() wand.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-11-24 03:54:44
Your offset time is: 2024-11-24 03:54:44