[Solved] Generate random level & performance on OUYA

Get help using Construct 2

Post » Sat Mar 01, 2014 4:10 pm

Hi!

I'm making a multiplayer OUYA game with random map for every match. So my problem is that the performance is horrible.

The map is quite big, maybe 450 tiles, and C2 checks collision for all of them(~20k checks/sec). I only need it to check the collision for the objects that are on screen. I'm using this method to generate the map.

I changed some properties in the method above:
  • Spawning max 3 blocks on top of each other
  • Not spawning trees
  • No biomes
  • Added collision
  • 150 x 150 px textures

So what should I do in order to get it run well?
Last edited by Sollaano on Tue Mar 04, 2014 3:42 pm, edited 1 time in total.
B
16
S
5
G
4
Posts: 74
Reputation: 3,311

Post » Sat Mar 01, 2014 5:25 pm

Are you using Physics? I had a lot of issues with that via ouya.
B
24
S
3
G
1
Posts: 47
Reputation: 1,598

Post » Sat Mar 01, 2014 5:28 pm

@Kcpunk666 Yes, I'm using physics
B
16
S
5
G
4
Posts: 74
Reputation: 3,311

Post » Sat Mar 01, 2014 5:43 pm

I'd avoid using it at all on the ouya. I'd try and keep everything you do on the ouya as resource lite as possible. I don't have a ton of experience with it, but that is what I learned messing with it.
B
24
S
3
G
1
Posts: 47
Reputation: 1,598

Post » Sun Mar 02, 2014 11:05 am

@Kcpunk666 Ok, i removed it, gave little fps boost but it's still dropping below 50 fps :( . Any trick for getting the fps to 60? Thank to dcrew for making it only render blocks that are on screen, otherwise performance would be awfully low.
B
16
S
5
G
4
Posts: 74
Reputation: 3,311

Post » Mon Mar 03, 2014 10:09 pm

@Sollaano Well look at the example given in the link you provided. That has low/jumpy fps too. It does because it has to generate so many objects at a specific time. I'm not sure how you've done it. I imagine via an array and creating objects corresponding to the a position. I think using the tilemap object would be far more efficient then creating individual objects. I've not tried it with tilemap object yet, but I'd put my money on that is the way to go about it. I once made a map with 20k objects and I had to parse out how it created them to even get it to not crash on start. The game I'm making atm has the same size map & grid size, but no problems with fps or on start up using tilemap.
B
24
S
3
G
1
Posts: 47
Reputation: 1,598

Post » Mon Mar 03, 2014 10:26 pm

Can you upload your capx? I can help a lot more if I can take a look at your code.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Tue Mar 04, 2014 3:42 pm

@Kcpunk666 Thanks! I solved the problem by setting it not to create underground stone (since I don't really need it)
B
16
S
5
G
4
Posts: 74
Reputation: 3,311

Post » Tue Mar 04, 2014 6:07 pm

@Sollaano Great! No problem.
B
24
S
3
G
1
Posts: 47
Reputation: 1,598


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests