ddaan9's Forum Posts

  • OH and i played like a level over and over again. After 7 times the game crashed....but that was with only 2 enemies. Before i played with 12 enemies.....

    And i know that with every enemy the collision checks goes up significant, so I think the collisions aren't the problem, because the crashes when they are low but when they are high it doesn't......Hate my problem. I will compile with intel xdk now and accept maybe that one doesn't give the problem.

    UPDATE: played for 1hour on both tab and nexus, tried everything to make it crash......it didn't....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > Only with Cocoonjs.

    >

    I've made a test project for me with 21000 collision checks, it it gives 50 fps(after 4 minutes of play it drops to 20) on my samsung galaxy s3 in cjs launcher. Maybe that's not causing the crash, but the fps is not good, because if i make the sprites with collision move it will lag like hell, this will make your game unplayable.

    thanks for your help!

    But if it is playable on a galaxy s3, than it should definitely be playable on a nexus 5. The strange thing is on my galaxy tab 2 10.1 it runs on about 50fps, no lag, after i played a couple of seconds...in the start it is about 30fps, it is playable with a minor lag. On my nexus 5 i never had a lag...

  • >

    > Ok, but i was searching the forum and a lot of people had way more collision checks than me and still didn't had problems. Maybe it is Cocoonjs and i have to try another one. It's a shame because my fps is like 50% better than with other ones.....

    >

    > Thanks for your input anyway! If someone else gets the problem, don't hesitate to reply

    >

    Did you try your game on mobile browser? Default or chrome?

    Only with Cocoonjs.

  • >

    > thanks for the reply, can't give capx it is on my pc.

    >

    > I tried it with nexus 5 and galaxy tab 2. Because the nexus 5 has 2gb RAM it is safe to say RAM isn't the problem.

    > What is weird about the debug? The big difference between values? Because the game spawns enemies so that is why there is a big gap between collision check, etc. At least one enemy and at most 25. Cocoonjs faq didn't give me answer...

    >

    The debug is ok, nothing weird in it, i don't see anything strange, but i can't help much if i dont see a capx. Maybe garbage collector is broken and too much spawns/deletes of enemies causing the crash. Or maybe something in your project causing a memory leak, if so you need to show your capx to ashley, in bugs forum.

    UPD: Oh, sorry i didn't seen for first time, you got 21000 collision checks per second!? That's really a lot, maybe this can cause a crash.

    Ok, but i was searching the forum and a lot of people had way more collision checks than me and still didn't had problems. Maybe it is Cocoonjs and i have to try another one. It's a shame because my fps is like 50% better than with other ones.....

    Thanks for your input anyway! If someone else gets the problem, don't hesitate to reply

  • > Hi guys,

    >

    > I compiled my game with CocoonJS and it seems fine. The problem is that it crashes time from time to time. Sometimes after 7min sometimes after 30min. I have 30 levels and there is not one level that always crashes, it seems to random.

    >

    > Is CocoonJS my problem or is it something. Help would be great!

    >

    > results debug mode:

    > frames 53 to 60 (18 to 21 ms/frame)

    > Collisions check: 3000 to 21000 ( 223-350 per tick)

    > Poly Collision: 200 to 1700 (4 to 40 per tick)

    > cpu about 19%

    >

    > (first time using debug, so no clue if these are good or not)

    >

    > Thanks!

    >

    Please, provide a capx, the debug doesn't make any sense, i think you need to check your events, look for any mismatches. And i hear there were some problems with samsung galaxy tab devices, and galaxy s3, if you use them, read cocoonjs faq to know how to fix the crashes. Or maybe your project just uses a lot of RAM, and it's crashed because of this.

    thanks for the reply, can't give capx it is on my pc.

    I tried it with nexus 5 and galaxy tab 2. Because the nexus 5 has 2gb RAM it is safe to say RAM isn't the problem.

    What is weird about the debug? The big difference between values? Because the game spawns enemies so that is why there is a big gap between collision check, etc. At least one enemy and at most 25. Cocoonjs faq didn't give me answer...

  • Hi guys,

    I compiled my game with CocoonJS and it seems fine. The problem is that it crashes time from time to time. Sometimes after 7min sometimes after 30min. I have 30 levels and there is not one level that always crashes, it seems to random.

    Is CocoonJS my problem or is it something. Help would be great!

    results debug mode:

    frames 53 to 60 (18 to 21 ms/frame)

    Collisions check: 3000 to 21000 ( 223-350 per tick)

    Poly Collision: 200 to 1700 (4 to 40 per tick)

    cpu about 19%

    (first time using debug, so no clue if these are good or not)

    Thanks!

  • Tried it with spawn and destroy....memory usage went from (in debug mode) 84,6mb to 30-40mb. Cpu lightly increases(1-2%) but for a point and click game

    spawn and destroy definitely works great.

  • ddaan9

    Here is how I would assess the options:-

    animation: uses more memory as all 72 frames are loaded (I think), probably no fps spike on changing frame

    spawn/destroy: uses less memory as only 12 images loaded, may cause fps spike when spawning (depending on size of images)

    invisibility: uses more memory as all 72 images loaded, requires extra checks for collision/clicks/etc.

    If the images are small enough to not impact memory too much (e.g. are 128x128 or less), I'd personally choose animation and keep the objects upgrades as frames of the object, otherwise:

    If memory is an issue, use spawn/destroy.

    If fps is an issue, use animation.

    Awsome reply!

    I already was thinking to use spawn and destroy. Because only one upgrade is done at the time i think the fps spike will not effect the game huge and memory usage is my problem.

    Thanks for the reply!

    And guys if you think otherwise or think the same, post it here. This will help a lot of new users!

  • I'm not sure on what you are trying to achieve here, I can't really see how animating sprites can be replaced by spawning/deleting.

    My thoughts:

    1- Spawn/Destroy, if you are going to spawn 72 objects in 1 frame, that may cause a significant fps drop depending on the objects.

    2- Having 72 sprites on the screen is quite a bit of sprites, if you have collisions or another interaction between them, could be a problem.

    3- Animating? I don't really get how it can solve your problem, do you mean moving them out of sight?

    It's hard to tell you the best way without further details on the project, maybe a little more explaining or some screenshots may help.

    Thanks for the help!

    About the game:

    It is a point and click game so collisions are already enabled. 12 different objects are showing that you each can upgrade 6 times. So in total there are 72 different objects but only 12 are showed at the same time. That is the reason there are 3 ways to do the upgrading.

    animation: When object is upgrade(simple click) go the next frame of the animation.

    Spawn and destroy: 72 objects on a different unused layout. At start of game spawn the first 12 objects. When you upgrade(simple click) it destroys 1 object and spawns another at the same position.

    Visibility: 72 objects on the current layout. Turn visibility off for 60 objects so only 12 are visibile. When you upgrade(simple click) it will turn visibility of 1 object off and will turn it of 1 object back on.

    See there are 3 ways to do achieve the same result.

    The problem is there is no information about which one could be better used. It's a shame because this will probably help so many people! Especially when you work with things like upgrades.

    So what do you think?

  • For me, the best way to know is to preview it in debug mode, then click profile to your right to see cpu utilisation. FPS is also a good indicator to evaluate the performance.

    Thanks for the reply!

    I know that is probably the best way to do it....the problem is that 72 sprites in 3 different ways is a lot of coding for me. It will take me a couple of days to check it. I kinda thought that someone knew what would be better. Currently i got my the 72 sprites in the screen (and turn visibillity off and on) and the memory usage is very high(90). That is my biggest concern. Would the other methods: animition or..... load them on a not used layout and spawn and destroy, lower the memory usage?

  • Stil no one?

  • No one knows???

  • Hello guys,

    Working on a game and I have 3 options to do something.

    1 Use spawn and destroy sprite (72 different sprites)

    2 Set visibility on and off (72 different sprites)

    3 Use animation (12 different sprites, each 6 animations.)

    What will be the best option regarding performance?

    Only found one topic about it, but the answer wasn't clear to me, so please enlighten me

    Thanks!

    Daan

  • Sory but already done! Will remove it now. Thanks for the reply anyway

  • Hi guys,

    I almost finished a game, but i got problems with scaling it correctly.

    The game is designed in full hd(1080x1920) and i want use cocoonjs to port it. The problem is that cocoonjs doesn't support letterbox scale(what I designed it for). I need cocoonjs for the performance. Other scaling methods are hard, because the game uses two walls (one left, one right at the screenedge in full hd) to bounce balls off. Making it bigger, means making levels to easy, making it smaller means, making levels impossible. So the ratio's must stay the same If you can solve this and make it possible to support multiple screensizes and look good, i will pay you 10$ with paypal.

    Thanks,

    Daan