Just wondering if I could get your expertise with a problem I have.
I've recently followed a tutorial about creating a procedurally generated dungeon, which worked.
I then extended the capex to include a platform player as well as some enemies, which have simple behavior (i.e. move left, right and in proximity of the player, they will follow the player).
Now the problem I have is that as soon as I put down more than 2 of the enemies, the game slows down to a crawl. After about 5, everything freezes up.
I put down the conditions that enemies can't move if they are outside of the player's screen, but this doesn't seem to help either.
I've made a copy of my capx in dropbox below:
Any tips would be greatly appreciated! <img src="smileys/smiley2.gif" border="0" align="middle" />
Sounds like a memory leak. Which enemies are being created and taking up memory from your system, however, they are not releasing the memory when destroyed. I guess it would be best to create them only when they are on screen, and destroy them when they are not.
Develop games in your browser. Powerful, performant & highly capable.
Yeah that sounds right - with no enemies the game played ok and all of a sudden the fps took a dive. Cheers for the tip, I'll give the on-screen enemy generation a go :)