Tutorial on how to measure lag (FPS Rate)


One of My projects is crashing at certain parts of the game here and there, and I’ve noticed a low fps (well duh) but is it too low? Or, is it too high (which is concerning because why would it even crash?)

Here is a tutorial on how to measure FPS…
Firstly, FPS stand for Frames Per Second; AKA: Pictures produced per second.
Pretty much it measures lag. The higher the better.

  • 1
    Create this code. To always have the FPS, Make sure that the FPS is immediately set to 0 and every second (1000 m) the text will show what number it is:

  • 2
    Then make sure that the FPS is always increasing, remember after every second it goes back to 0.

At the start of a game the fPS is low because it is laggy at that stage:

But then it should sort itself out, and an normal area to be around is 62

Are you having laggy projects? Try coding an FPS and see if it is high or low.

I just want to know the average on YOUR FPS’s on different projects:

  • 0-10 (get a new ipad)
  • 10-20 (get Apple to fix your iPad)
  • 20-30 (let your project sync)
  • 30-35
  • 35-45
  • 45-55
  • 55-60
  • 60-65 (normal)
  • 65+

0 voters

@POMTL hope this helps!


@AwesomeOnion and @Liza i sent an email regarding the concerningly low fps rate (and crashing) about one of my projects. It makes me mad when I see my hard work destroyed.


Hi @AHappyCoder, it seems like you have a low fps rate on your projects. Is it really laggy? I can help out if it bothers you. 30-35 is quite a concerning rate,


Great tutorial. You can also do When 7=7, which is the default value.


Ye I like making code fancy lol.


Is there something wrong with your iPad? 0-10 is extremely concerning…


Anyways, I’m pretty sure some iPads only support up to 30FPS.


Yeh. (Arghhhh, im outa likes)


I chucked an FPS counter on The Jewel Thief v6 and Hoplympics cat (my two most complex projects) and i’ve got a solid 30-31
Does make sense cause i’ve had this iPad Air 2 since January of 2016 and never gotten it fixed or anything, and the whole thing itself can be a bit annoying sometimes


Could you post the links please? I also have an iPad Air 2 and I’d like to see your project.


And by most complex yeah that means not complex in any way



Sometimes there may be inaccuracies in such calculations. FPS rates determine frames produces per second, and this really isn’t too important in slow paced games, the fps will always be low when objects aren’t in a stationary form.

When I measured the FPS on my test project no action was present, thus nothing could interrupt such calculations delaying the ongoing increase of the FPS. Even in my complicated project, when FPS was measured I noticed it was around 60, but the still was stationary.

Your two projects have action, and in the process of an active trail art it is commonly likely for FPS to drop as drawing trails involves producing images. Same as your other project which had constant movement meaning that the FPS never really had time to settle.

Do not get too concerned, if it were below 10 then I would be concerned, but around 35 means that there is ongoing action which causes slight delays in the calculation of FPS. Your projects are fine, as movement is smooth and consist of no evident bug in my approach of it.

Also, by looking at your code I noticed that self wasnt contained in the project. The files are old and the back scene would have many clogged up JSON keys causing a slow, FPS rate. If you were to update to self, then leave these on your drafts, a spyglass would appear telling you to wait as the project is self-removing these unnecessary clogged JSON keys.


Ahhhhh ok that makes sense yeah
Speaking of the jewel thief, i’m making a jewel thief 2/2k18 for next year and im going to add tons more features, any ideas?
I already have a separate sceeen for instructions and credits as an idea


I’m not too sure for now, but I’d add some lovely scenery to grab a catchy atmosphere. It really is quite an amazing project!

Most importantly, if you want it to be faster you should ask MR.GAM3R or ThinBuffalo to change the project to self edition, and assess your code from there, and also let the unnecessary JSON keys delete. You will have a much faster project after this process :slightly_smiling_face:

It’s getting rather late here…


Thanks so much @BlastFusion, this will be really useful!


Ok thanks but what exactly is self edition? Does it come with new projects you make now? Or can you only convert things to it?
Cause i’m starting a fresh slate for the new jewel thief


Anything above 60 is still 60.


It doesn’t really bother me

I dread to think what some of my more complex projects have


I get bothered if it gets below fifty