Enemies for Procedural Generated Dungeons

Get help using Construct 2

Post » Sun Mar 04, 2012 6:29 am

Hi All,

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:

http://dl.dropbox.com/u/65326552/Miner%20Game.capx

Any tips would be greatly appreciated!

B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Thu May 24, 2012 11:47 pm

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.
B
12
S
4
G
1
Posts: 6
Reputation: 2,184

Post » Fri May 25, 2012 8:57 pm

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 :)
B
34
S
8
G
3
Posts: 328
Reputation: 7,692


Return to How do I....?

Who is online

Users browsing this forum: kamens503, SEGamestudio and 17 guests