I realized that not every ppl that plays games on internet has a good computer.Also i cant rly use fp.elapsed because some times it gets great fluctuations in speed.So i was wandering what frame rate u guys usually use to your games,in order to deal with lag some ppl with slow computer gets?
What frame rate u usually use for your game?
Generally stick to 60fps on web. 30fps looks pretty bad by comparison (but will do for mobile) and most people’s computers these days will be fine for running most FlashPunk games at 60fps.
FlashPunk does have compensation for lag in fixed timestep mode; if it drops frames it does additional updates to catch up whilst skipping rendering, which is more often than not the cause of the slowdown.
1 more question, what usually make the game lag, i mean what is the thing that slowdown the most a game?
There are a massive number of things that could cause slowdown. Running a particularly intensive algorithm, or even running a lot of simple operations can be the cause. Generally thought the most common cause is trying to render too much stuff or not rendering it efficiently (using transformations such as rotation and scaling on very large sprites for example).
If you post an SWF I could run scout on it and have a little look for you.
Tank you, i don’t need to test the swf right now but i wanted to see what should i be careful with when i code the game .Thx