Tutorial on how to measure lag (FPS Rate)


#1

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!


#2

@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.


#3

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,


#4

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


#5

Ye I like making code fancy lol.


#7

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


#8

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


#9

Yeh. (Arghhhh, im outa likes)


#10

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


#11

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


#12



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


#13

@GoatLord

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.


#14

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


#15

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…


#16

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


#17

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


#18

Anything above 60 is still 60.


#19

It doesn’t really bother me

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


#20

I get bothered if it gets below fifty