superkew's Forum Posts

  • Yep. All my layouts have their own event sheet and then just include the events sheets that use common events.

  • requestAnimationFrame must be a C2 event? I just copied the error thrown in the cocoon console.

    The only plugins I use are "Function", and "Date" - so I doubt it is something in one of them.

    I think the touch stuff just stopped working because of the error thrown, probably crashed the function or layout.

  • Here is the error on CocoonJS when using spritefont:

    JSUtilities Exception: TypeError: Result of expression 'a.canvas' [undefined] is not an object. Cause: Tag: requestAnimationFrame Function: function() {a.hd();}

  • I found that if I have it on a layout, it breaks the touch events too. I don't know if that helps? :)

    Have you tried emailing Ludei? They are fantastic with email support.

  • It doesn't seem to work on my cocoonJS :/

    I tested on iOS and Android. Awesome plugin though!

  • Hey all

    I have been working on my optimisations today and implemented a lot of the methods mentioned.

    One thing I tried and now just found to be very BAD was over using tiled backgrounds. I thought that I could use a nice small tile and grow it over a large area. Big mistake! It killed the performance. I think I am getting a good idea of how html5 handles images and memory.

  • Thanks for all the helpful feedback guys. I re-use a lot of assets with scale and rotation, but there are some things that I can't seem to really reduce.

    I'll chat to the designer and see if she has some ideas.

  • Just a side note. My window size is 960x720, but the layout is the big one.

  • Thanks Ash :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys.

    Ok, so what ever is drawn on the screen is what is in memory. If I have an image that is larger than the screen resolution the entire image is put into memory even though only a portion of it is drawn. Is this correct?

  • Hi Ash

    Does Contruct always load all assets in the game on the initial game load?

    I got this feedback from Ludei and wanted to check from your side about this. Is there a setting I don't know about?

    * Try to load the resources once you need them (when loading a level for example) instead of loading all of them at the beginning. Unload them once you do not need them anymore (once the level is done).

    <img src="smileys/smiley10.gif" border="0" align="middle" />

  • Thanks for the feedback Ash, if I cut a 2048 x 2048 image into 16 of 512 x 512 slices, would it then be better?

    Is there another way to create a large type of layout? Or would it be best to try and flatten whatever I can into single images instead of layering?

  • I have been working on a game and found that it was randomly crashing on iOS with cocoonJS. After a bit of work and emailed to an from Ludei they told me what the problem was. My game was using all the memory.

    My sprites were way too big. We have a lot of detail done on large backgrounds so the tiled background option wasn't really feasible. Also, when I started working on the game, directCanvas from appMobi was just launched and that didn't support tiled background at all. Which in turn caused me to use sprites for everything.

    At one stage I tried to cut up some of the larger images to see if it would improve performance, but it didn't. Little did I know that it actually had.

    So now I am at a situation where I am going to chop up my images and manually tile them. But I have some questions that hopefully someone with some more technical knowledge can tell me.

    Does tiled background perform the same as a sprite if there is only one "tile"? Or is it stll faster?

    Is there a plugin to easily tile images?

    How small should should my tiles be? 256 x 256, 512 x 512, or could I get away with bigger? My background is approx 3072 x 1024.

    I don't mean to be lazy and not search the forum - I have actually done some searching and reading, but I was hoping to get feedback from people who have come to the same situation.

    Thanks

  • I haven't looked at your project.

    But check the collision polygon on the elements. It's in the image editor for your sprites, under the "origin" button on the left.

  • Are you previewing in your browser? Maybe the cache needs to be cleared.

    Otherwise check your "go to layout" events.