The Daily Click ::. Projects ::. Fangame The Game
 

Project: Fangame: The Game
Project Started: 11th August, 2009 Last Update: 15th July, 2010
Project Owner: vertigoelectric Project Members: lease Arkhanno
Project Type: Very Hard Platformer Project Progress:
More Info: http://fangame.vertigofx.com Faves: 17

Removing LAG from Fangame
Posted 24th Sep 09, by vertigoelectric  
So, I was looking into ways I could remove lag from Fangame, and it lead me straight to the dust I have swept under the rug a while back.

A short explanation. MMF2 has some built in functions involving "collisions with backgrounds", and "backgrounds" in this context means solid tiles such as walls, floors, and ceilings.

Rather than using this method, which originally I had confused with actual background scenes, I created all of the solid tiles as "Active Objects" rather than "Background Objects" as I described above. As far as I could tell, there was little difference, so I continued to build the game in this manner.

To get to the point, it just so happens that there IS a difference. Active Objects use more memory than Background Objects. Now, you wanna know why Fangame lags? This is why. All of those solid walls, floors, and ceilings are Active Objects that take up memory.

Converting all of those tiles to backgrounds and modifying the event code to detect collisions with these backgrounds is a lot easier said than done, however it will result in two very important good things:

1. It will greatly optimize the event code in a way that will be more globalized and centralized, making future edits much more manageable.

2. It SHOULD not only reduce lag from the game, but could very well eliminate it altogether.


So, when I get home today, I am going to begin working on this... hopefully.

Posted by vertigoelectric 25th September, 2009

Okay, well I've nearly completed the daunting task of... well... the stuff I mentioned up above in the devlog. I've released a build for my beta team and soon I'll find out if all of my hard work paid off and the lag has been eliminated. *prays*
 


 



Project Forums


Favourite

Advertisement

Worth A Click