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 Studio Chat / AppGameKit Studio BUG FPS

Author
Message
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 6th Aug 2019 07:03
Hello,

I'm having a serious problem with AppGameKit Studio.
Indeed, in the game that I code (knight and demons) when I go from the table editor to the game, the fps goes from 60 to 8.
I'm only doing everything erase and reload
The problem is the same when the character dies and the level is restarted.

obviously, the problem does not appear in agk2 !

is this a problem with deleteallsprite?
A memory problem badly erase?
I do what i do !!!
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 6th Aug 2019 20:22 Edited at: 6th Aug 2019 20:23
Hi, Captain Ouais, it has been a long time isn't it ?

For your problem, you could try to switch the engine on OpenGL instead of Vulcan. The last update, add a command for that.

I don't have App Game Kit Studio because I have missed the discount period because of healthy problems, it's sad...I hope you enjoy it

Crystal Noir
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 7th Aug 2019 06:58
Hi my Crycry d'amour

I already tested with both display engines !

thanks for your help
I do what i do !!!
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 7th Aug 2019 08:12 Edited at: 7th Aug 2019 08:16
Hello my Capt Ouais euh...pas trouvé de ryhme

Have you try to use the debugger to see what happens when the FPS goes down ?
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 7th Aug 2019 20:07 Edited at: 7th Aug 2019 20:17
I do not think it comes from my code ...
I do what i do !!!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Aug 2019 20:20
Quote: "when I go from the table editor to the game, the fps goes from 60 to 8"

There was a bug that caused slow sprite rendering, can you try the attached version and see if that fixes it?

Quote: "swap chain is out of date"

That can be caused by the window being resized but is more for informational purposes, it is not an actual error.

Attachments

Login to view attachments
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 7th Aug 2019 21:02
Thanks to Freddix, the problem has been identified

when deleting sprites with deleteallsprite, my game drops to 7 fps instead of 60
If I delete sprites "manually", no problem

I created a post on github

Thx to all
I do what i do !!!
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 7th Aug 2019 22:21
Hi Crystal Noir, Hi Captain Ouais !
What Captain ouais forgot to mention is that he used DeleteallSprites() and with this method the problem appeared.
But when I suggested him to no more use it and delete sprites one per one, the problem does no more happen.
So, I think that there is a problem with the DeleteallSprites method.

Regards,
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 8th Aug 2019 00:03
Hi Freddix, Hi Captain Ouais,

It seems that TGC should look at this issue because DeleteAllSprites() could be handyi in some cases
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 9th Aug 2019 21:15
@Captain Ouais : didn't see your last post when posting my answer

@Crystal Noir : If this command is Handy, it's a really bad practice to use it.
What I suggested to Captain Ouais, is to create a custom DeleteSprite method working this way :

MyDeleteSprite( SpriteID As Integer )
if getSpriteExists( SpriteID ) = 1
DeleteSprite( SpriteID )
Endif
EndFunction 0

This way you can reset your sprite object ... If for example you have a structure containing player sprite ID :
Type Player_Type
SpriteID As Integer
EndType
PlayerOne As Player_Type

You can reset your sprite using :
PlayerOne.SpriteID = myDeleteSprite( PlayerOne.SpriteID )

With this when you must use your sprite (at any place) just check before that it exists or that it is not equal to 0

Regards,
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Aug 2019 22:09
Bad habit or not, this isnhendefinition of a bug and should be fixed.

Login to post a reply

Server time is: 2024-04-19 20:13:26
Your offset time is: 2024-04-19 20:13:26