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 / Low FPS in my app, can someone help?

Author
Message
SimpleProgram
12
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 8th Nov 2011 03:20
Hi, I'm starting a new app using AGK(trial). I'm going to buy AppGameKit in awhile, so please don't hate. The app only goes to a menu for now, only the quit option works when you click on it.

I'm not sure if its my computer or the app itself but i get really low FPS. It starts out fine in the beginning, but then the FPS drops low a 7-8.

Can some one help me out and check if its the apps code or my computer?

Ill include the app in my post so anyone can download and try it.
Here is the Download link:
http://www.yourfilelink.com/get.php?fid=722908

And here is the app code: There are some unused stuff in there so just never-mind it.


Programming and video games, what else could you need?
halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 8th Nov 2011 04:21
Is your game running on device or simulator?

in simulator, 7-8 FPS ,is just the common number.

in device , 60 FPS, is common number.

They are different.

give my best
SimpleProgram
12
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 8th Nov 2011 04:46
Oh, I didnt know there was a difference. I just started off with AppGameKit so im getting used to all the new commands and etc. Can you switch between simulator and device using the trial? If so how do you do it?

Programming and video games, what else could you need?
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Nov 2011 07:41
Quote: "Can you switch between simulator and device using the trial?"

Halley is talking about the AppGameKit iviewer...I think but either way I don't think that it's your problem.

If I'm reading your code correctly you call the CreateText() command multiple times each loop and so you accumulate a large amount of text objects so after a couple of seconds you will have 1000+ individual text objects. So you'll need to find away to only create each text object once and not every loop.

halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 8th Nov 2011 08:08
I see.

give my best
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Nov 2011 20:02
I see Hodgey has hit the nail on the head. You are recreating text objects every cycle, so it will slow down the longer you leave it. If you put a simple check for if the text exists around the create text code that should fix it.

SimpleProgram
12
Years of Service
User Offline
Joined: 2nd Oct 2011
Location: Cali
Posted: 9th Nov 2011 19:57
Thanks guys, instead of using automatically assigned ID for my text, I declared global variables, and then checked if the text exists on the screen in the beginning of my Menu() function. Just a simple logical error, Im so used to coding with DBPro that I thought the createtext() command was the same as the center text command and only displayed the text on screen and did not actually create an object in the game world.

Thats something the AppGameKit documentation should explain.

Programming and video games, what else could you need?

Login to post a reply

Server time is: 2024-04-19 22:11:51
Your offset time is: 2024-04-19 22:11:51