I am currently working on a game, but I find that when the player buys some AI run allies, the fps drops from around 35-45 to 20-25. How can I fix this?
Wow I'd love to know what you're making that needs 35-45 fps... thats just not a good FPS to be running at. Care to fill me in? PS: Your game should be 20-25!
my current project is running at 60FPS I usually run things in 30fps, but for this game I wanted super smoothness. However, I am not going to run any future games at such high fps because it not only creates optimization problems, but hittest issues as well. But as I said earlier this game needs to run at a smooth 35-50 not 20-25
Well my presumption is that the AI run allies do a ton of things at the same time and probably a bunch of it, it doesn't need to be doing. Cutting down on the if statements if there are many cause it checks them all. Not sure what to tell you. You have way too much going on the screen at the same time. But hell if this game runs at 60fps I am hoping big! Is it some sort of sequel to your other game?
BTW by AI I hope you don't mean you have some complex thinking process going in like a true AI type thing, cause that would be pretty hardcore. And bad cause your flash game would never run.
The AI I am referring to is just autonomous targeting/tracking/guiding artificial intellegence, it is able to find a target, lock onto to it, track it and fire a missile that guides to the target its not a sequel (I am workin on that afterwards =D) its just another game, its pretty cool though
Well don't know how you went about doing that so that it wreckes 20 fps? Just if an MC witch certain name passes a boundary find the angle with sin cos tan and launch a missile? I have some code to have an MC track another one and follow it exactly that I used for a game. Or just go online and search heat seeking missile tuts. They will give you the most efficient way. How many MC or enemies or whatever do you have on the screen at the same time?
You're going overboard with your framerate. You don't need anything above 30, everything past there will just be overload, unless you have some sort of code related thing where you need it to execute many times.
yay dank is here! however you people need to stop bashing on my ownage 60fps game. I figured out how to fix my problem tho, and now it runs at 45-55fps so great success
see, I have a XFX GeForce8800GT so I am used to running games at 60fps lol, funny thing is tho my fancy ass expensive graphix card doesnt do a damn towards my flash benchmark because flash runs purely through your processor since its all vector math lol