08-04-2012, 12:39 PM
(07-23-2012, 05:45 PM)Hoeloe Wrote:(07-23-2012, 05:36 PM)Mikeystar Wrote: 20-40 FPS is what I normally get.
20-40 is a pretty ridiculous variation for running something on the same machine, and 40 is really quite low if your base is 60. I appreciate that you're trying to fix the problem, but it might be worth looking at some slightly lower-level stuff than you have previously, stuff like memory management; garbage collection, memory leakage and the like.
(08-02-2012, 02:35 AM)Previous Wrote: You use GM right? I think there was an option to disable all objects that are out of view (it's been a while so I'm not entirely sure). If that's not enabled, you could try if that helps. Other than that, all you can do is to try to optimize your code. Code optimisation is a whole book on its own, though. Using less objects (enemies etc) in areas where the framerate drops should also help.
We figured out the problem a few days ago. Apparently the reason why we get so many bug problems and lag is because...
There are many background resources and or sprites in this fangame that are being unused.
We externalized many of the background resources but we still need to remove alot more. If you're wondering, we used alot of SMB1, SMB2, SMB3, SMW, Yoshi's Island, NSMB and Custom Backgrounds. Half of them we don't need. We got rid of most of the SMW BGs.
So once we can externalizing resources, graphics mainly, we will stop getting problems like the fangame crashing. Phew. It took us years just to find out it was this one thing that was such a problem.