Thanks. In that case, what does cause lag?
It kind of depend on your game I think. But the most normal reasons I think are the following:
1. Bad coding
This is code that is not optimized, for instant doing a lot of checks at points where they are not needed. Not using functions etc.
Effects that are applied to objects, If you use to many or use them wrong it can slow down your game a lot.
Pretty self explaining, but if you use a lot of objects.
4. Wrong sizes of objects
If you just use "random" sizes of object so they are not cropped, it will also reduce the amount of objects you can use.
5. Collision detection
Especially if you use a lot, there are some discussions around the forum regarding this. As I believe most people at some point run into this problem.
Think that's the most normal ones, there are probably some other ones but cant think of them now