Wild Performance

0 favourites
  • 10 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • My laptop which has an Nvidia 640m, 10GB Ram and an i5 2467m can play Battlefield 3 at 60fps on medium settings.

    When I run my C2 project "Orbit" without any background art I get 60fps but when I try to run it after my buddy has added artwork it drops to about 12fps.

    If I remove all of the webGL effects like glow and additive blending on the lights etc the fps jumps up to about 25.

    The rest of the scene is made up with about 20 - 30 64x64 9-patch objects.

    Is there anything I should really watch out for when importing art? Does it matter what quality png's we're adding to the game? Keep in mind that the game was running at 60fps before the art went in, so it's unlikely to be anything in my code screwing the frame rate.

  • 9-patch kills performance - it's not nearly as resource-friendly as tiled backgrounds.

    When importing art, test as you go. No point in dumping in everything in one go and then testing. Graphics are the biggest performance killer in C2.

    I spent a lot of time optimising my artwork as I got it in from the artist. You can't simply drop in whatever comes through and expect everything to be smooth. Battlefield 3 was built by a team of skilled engineers and artists who work to spec, and the art pipeline is one of the most complex parts of any AAA development program.

    The quality of the PNG won't make any difference at run-time, it only affects file size, but as soon as you have multiple transparent and semi-transparent images all on top of each other and/or moving around, you can expect performance to suffer.

  • Thanks, I didn't realize that 9-patch was a potential performance killer...

  • 9-patch shouldn't be a performance killer. It should be equivalent to nine sprites, and you should have a budget of thousands of sprites on a desktop machine.

    Did you test across a range of browsers? Do they all perform the same?

  • Actually I only tested on Chrome and Node Webkit, I'll do tests on other browsers too.

  • Ashley, I'll give you the exact scenario in which I noticed it killing performance. I have a tiled background that covers an entire layout which is solid black and 128x128 and set to 50% opacity. When I switched to a 9-patch to do this same thing but with rounded edges, I found that performance was absolutely crushed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • GeometriX - submit a bug report and I'll investigate, it should not be anywhere that significant a difference. Was every browser the same or did you just test Chrome? Performance can vary a lot between browsers.

  • Ashley, Sure thing, I'll try to recreate the situation in a simple example and will send through a report. This current project is for offline play so I've only tested on Chrome and NW.

  • So I found a couple more objects with additive blending and glow attached, removed them and got the frame rate up to 50fps.

    Those webGL effects are pretty hardcore, I need to go through the performance tips guide and make sure I'm only using layer effects / put all effects in the same layer etc.

    Thanks for the info though guys

  • I made a simple cap file to test the impact of 9-patch.

    https://dl.dropboxusercontent.com/s/fwe5369rxvxdywd/9-patch_fps_damage.capx

    and below is what I found:

    1. On my computer, no impact at all. It's always 60fps.

    2. On my HTC Desire HD, and I load it with Cocoonjs Launcher. It drops from 56 to 36.

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