[Solved] Generate random level & performance on OUYA

  • 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?

  • Are you using Physics? I had a lot of issues with that via ouya.

  • Kcpunk666 Yes, I'm using physics

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • Can you upload your capx? I can help a lot more if I can take a look at your code.

  • Kcpunk666 Thanks! I solved the problem by setting it not to create underground stone (since I don't really need it)

  • Sollaano Great! No problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)