Arima's Forum Posts

  • Nice, voting! :)

  • cesisco - would you mind pming a link to the game and capx so I could poke at it?

  • With how it's set up so newly received pm's are hidden in the drop down menu, pm's can sit there unnoticed. Considering how long it's been since I've sent some out, I think other people have gotten some and not realized it as well.

    Could it be made so pm's are added to the number notifications in the top right corner of the page the same way that getting a does, so it's immediately apparent you have one rather than it being hidden? Or some manner like how it was previously.

  • You both said you're running version 2 of android - how old are your devices? Performance gains have been dramatic in the mobile area, so even having a device that's even a year and a half old can make a big difference. Also, as I've heard android 4 got a significant html5 speed boost as well.

    Can you post your games? Did you at any point add physics to your project, even if you removed it later? You can try making a backup then deleting code and sprites bit by bit to find out what's hitting the frame rate. You can also try ranma's performance tips in the tutorial section (use the search in the tutorial section for performance).

  • That's weird, I get the exact opposite. With my projects, preview on LAN has terrible performance compared to the exported HTML on a website (like 100 sprites at 60 fps via preview vs 400 sprites at 60 fps via export).

    It is on an ipad 3 though, I wonder if that makes a difference.

  • You do not have permission to view this post

  • You, R0J0hound, are awesome. :)

  • Ashley - awesome, thanks so much for implementing it!

  • Perhaps you should post something in the help wanted section like "will pay for cc plugin/or fix to a cc plug in."

    You could try contacting people who developed previous cc plugins like rojohound or arsonide, they might be able to add a "unload from memory" action (I can't speak for them though, but even if they can't they might be able to guide you to someone else who can help).

    You could also post to other forums where c++ programmers reside, and hire someone to fix the plugin for you (probably quicker/cheaper than making a whole new one).

    I realize you said there isn't time for you to implement a workaround, but in case it could potentially help anyway, what I would recommend (without knowing the specifics of your project) is putting the animations in separate objects and having those objects all in a family so you have one set of code controlling them. You can then pair up those objects with the base object used for gameplay via uids or the pairer object.

    Unless it would require a thousand objects or something. Then I would recommend putting multiple sets of animations in each object, but still splitting them up to reduce usage, and determining what set to use based off of variables:

    Set animation to: sprite('type') & "Default"

    Results in: "spritetypevariableDefault"

  • Thanks, that seems to help confirm the theory that it is in fact a problem with it going over the 2048 texture size rather than being an issue with going over the display resolution.

  • Ashley - Please! :D I should have added the -1's to the height as well though, as this bug can happen if the canvas is 2048 pixels tall as well.

    Edit: - err... Hmm. Have you been able to get better performance with other projects in retina mode on that device? Does that device even get affected at all by the retina setting? As mentioned, the first test is unmodified. I'm not doing anything unusual with the test, though it does wait for 30 fps to create sprites, and deletes them below 30 fps. Is your device/browser's rendering capped at 30 fps? I think I've heard of some devices doing that, though I'm not sure.

    That said, your device doesn't have the weird screen size reporting issue that mine does (the ipad 3 registers it's retina display at 1024x768 even though it has 2048x1536 - that's why the -1's on ipad 3's actually shrink the texture by 2 pixels and on your device it only shrunk it by 1), I'm not sure if that would have anything to do with it, though.

  • Tom

    Oh, I didn't realize that, thanks for clearing it up. You sure it's a good idea though? We might get people changing other people's declarations of their love for Ashley to themselves. Or something. :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try always rounding positions of objects and the scroll x/y.

    That can affect the gameplay subtly though, so you might want to make an invisible object without the rounding that is used for the gameplay, and a visible sprite with a rounded location for rendering.

  • Nice, thanks for testing, and thanks for checking so many browsers, newt!

    It worked perfectly! I'm not sure these results are 100% accurate due to them changing and what not. But the improvement was incredibly visible. Fantastic job!

    Yeah, my test isn't meant to be super exact, it's mainly to check if the bug is there or not.

    Anyone out there with other devices?

  • I think I've found a way to fix a major performance problem on iOS retina devices that occurs in fullscreen landscape mode in safari and with web apps on the home screen, but I need help to make sure the fix works on all devices.

    Please tell me:

    • What device it is
    • Reported window width and window height
    • The upper/lower values of how many sprites it says are in the layout in both portrait and landscape modes in both tests (if the text is offscreen, tap the screen to place it).
    • If it can manage 30 fps

    The first test, an unmodified export as a point of comparison to check if the bug even happens on your device: http://www.amirai.net/ipad/renderingbug/

    If it happens, you should get normal performance in portrait and terrible performance in landscape. My ipad 3 gets 10 fps with only one sprite in the layout!

    Test 2 with the fix: http://www.amirai.net/ipad/renderingbug/fix/

    Hopefully in that test performance in landscape should be equal to that of portrait.

    Results, iPad 3:

    Test 1

    portrait: 1536x1836 pixels, 893-837 sprites at 30 fps

    landscape: 2048x1344 pixels, 1 sprite at 10 fps

    Test 2

    portrait: 1534x1836 pixels, 919-863 sprites at 30 fps

    landscape: 2046/1344 pixels, 895-842 sprites at 30 fps

    What's the fix? 2 tiny tweaks to the index.html (the edits are the -1's in bold after both the width()'s):

              // Size the canvas to fill the browser viewport.

              jQuery(window).resize(function() {

                  ?cr_sizeCanvas(jQuery(window).width()-1, jQuery(window).height());

              });

              

              // Start the Construct 2 project running on window load.

              jQuery(document).ready(function ()

              {              ?

                  ?// Create new runtime using the c2canvas

                  ?cr_createRuntime("c2canvas");

                  ?

                  ?cr_sizeCanvas(jQuery(window).width()-1, jQuery(window).height());

              });

    My best guess of what's going on here is ios is automatically adding 2 pixels to the size of the texture of the canvas (like c2 does in the image editor so that textures can rotate smoothly without jagged aliased edges), making the texture in use 2050 pixels wide when its gpu can only handle 2048 pixels, causing a huge performance hit. So if the width and height of the canvas are clamped to 2046, it fixes it. Or something like that.

    Any results are highly appreciated!