Improving the performance of dungeon generator

Get help using Construct 2

Post » Thu Oct 25, 2012 5:04 pm

Hi all, the trouble I'm having is the procedural dungeon generation event sheet reduces my iPhone 4S to ~3 frames per second, yet it runs fine on PC.

I've been testing and testing trying to isolate the issue and I can't seem to pin it down. I have debug text to show if the generator is constantly on (which indicates that it isn't). I also tested if it was the sheer number of sprites being generated that was the culprit; in short, it wasn't, it lags constantly regardless of the layout size it is working with. The last test I conducted was to manually paste in a large number of the tile sprites, rather than spawn them through the generator. The game runs perfectly fine with this, but it isn't really the solution I was looking for, confirming to me that the number of sprites isn't the issue.

Here is the capx

If you're testing this out on iOS, its a 3 finger touch to generate a dungeon.
slap it onto the flappy bird template...
bang it on google play with all the other shovelware...
sorted...
B
36
S
7
G
4
Posts: 322
Reputation: 8,170

Post » Fri Oct 26, 2012 9:21 am

How or what are you using to test? I had a framerate problem (like you) but that was because I was using phonegap/stock standard HTML5. If anything you should try use AppMobi or CocoonJS (I recommend this) as it boosts the speed of it to native speeds.

Note: For testing you need to use the AppMobi or CocoonJS app, but once you finished, you can export as a native file.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Oct 26, 2012 12:02 pm

I can't seem to get it working either even after altering the project.
It doesn't even seem to get any better on an iPad.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Oct 26, 2012 12:33 pm

Hey @lonehangman, I was running it with CocoonJS, I haven't tried it in PhoneGap or Appmobi, but I'm assuming they'll perform even worse than CocoonJS.Wrangler2012-10-26 12:35:31
slap it onto the flappy bird template...
bang it on google play with all the other shovelware...
sorted...
B
36
S
7
G
4
Posts: 322
Reputation: 8,170

Post » Fri Oct 26, 2012 3:08 pm

@Wrangler
They do indeed perform worse. I can't even get Appmobi to work properly :/
But yes, as I said earlier it's probably something to do with the arrays' and calling them. You'll probably need to make it more streamline and efficient.
Other than that, i've got nothing.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946


Return to How do I....?

Who is online

Users browsing this forum: DiabloOvermind, emoticon and 23 guests