BadMario's Recent Forum Activity

  • The problem could lie in the fact that this is a Construct 2 project being imported into Construct 3 and switched to runtime 3.

    There are apparently many problems with this approach ( Importing into Construct 3 and staying with runtime 2 seems fine )

    First thing I notice is that it doesn't go straight to bar and logo screen then jump into my own loader layout. There is just a bar that pops up before it goes to bar and logo loader, but often it does not go there at all, just black screen.

    My custom loader text or bar seem not to work either, so you can click on continue before anything is really loaded.

    Often if you do get to theis loader layout clicking on continue just shows a black screen, reloading the app or browser then seems to make it work sometimes.

    In the latest betas, all of my particles do not show up for some reason when playing it on a phone, but everything seems fine on PC. Opening an empty new project in Construct 3 then copying/pasting asteroids and particles + code used in Construct 2 game, works fine. So, maybe something lost in translation between Construct 2 file and Construct 3 ( In stable version 148 this works fine )

    Most of the games do not work at all on my phone when using remote preview, if switched from runtime 2 to 3 ( stable 148 does not have this problem, ).

    I know I should file a proper bug report, but I don't have time to re-create simpler versions of these projects. Right now I will either use Construct 2 to export, or Construct 3 using runtime 2. Weirdly enough a problem with janky physics on some phones disappears when using Construct 3 / runtime 2 combo.

    By the way, I have never used any 3rd party plugins, only Construct 2 events/behaviors

  • That problem only this; Construct 3 loading (1024x1024)png files. So when you need one object, it is loading all png file. When you need only 10x10 sprite object.

    Do you understand now what is problem?

    I do. I have tested all this a few times. Speitesheeting algorithm in Construct 3 is different and uses up more RAM no matter what.

    So far I have only one game with real potential problems.

    RAM usage

    Construct 2 export = 450 MB

    Construct 3 usin9 runtime 2 and 4096 as max sprite sheet 555 MB ( best I can get from Construct 3 )

    Construct 3 using runtime 3 usually 850 MB, I can drop it to under 700 MB if max spritesheeting set to 4096

    Construct 3 using runtime 3 and 1024 max sprite sheet. 1.35 GB ( worst scenario )

  • It is connected. If you can reduce RAM usage you will reduce loading times. I've had the same thing you describe happen with my game even with Construct 2, As I added more teams, loading times increased, until eventually, one day it started crashing, would not load at all.

  • I get best results when using 4096 as maximum sprite sheet. and if Exporting as runtime 2 with that my RAM usage drops from 850 MB to 555 MB.

    setting max spritesheet to 1024 estimated RAM usage jumps to 1.35 GB

    Isn't this backwards? Or I guess it depends on a game, how many sprites. In my case most of the images are within a single sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C3 runtime has built-in features to load and unload images for objects which helps manage

    What does this exactly mean? I could not find anything. It sounds like I could unload 10 animations from a sprite and only keep the 2 or 3 actually used thuse reducing RAM usage. If this is that, that would be helpful, as I have not found a really efficient way to select between 10-15 teams with 3 animations each, while minimizing RAM usage. Putting them into families only solves part of the problem.

    Also, I had a game that reached 1GB of RAM usage and started crashing. After optimizing everything I could I got it down to 450 MB when exported from Construct 2, 650 MB when exported ffrom Cinstruct 3 as runtime 2, and 850 MB when exported as runtime 3

    As a result that game will not even open on most phones if exported via Construct 3. You see the loader layout and as soon as it goes into team selections it crashes ( triead a few iPhones and Galaxy S6 with 3GB of RAM, all crash ) Construct 2 export, being "only" 450 MB works

  • Do you need to show trajectory lines?

    Unless you need to be dead on as far as accuracy goes it is just a matter of scaling the ball as it goes.

    Is it a basketball game or something else ( I've probably done a few dozen of bball, football, baseball games that kind of do this kind of a thing )

  • blackhornet Thanks for the tip. I've only used Families so far to apply effects to groups of objects

    Sorry if this is like a partial hijack , but this may help the original poster too..

    After BlackHornet's suggestion I did a couple of tests and this may come in handy.

    My game does not have nearly as many image sequences, but enough that it caused RAM problems on phones.

    I solved it by optimizing everything and was able to keep my original set up, but in the future I may go with that Family route.

    To some of you this is probably, duh!! an obvious thing, but may help others.

    So, if you have too many images these would be important points:

    #1 Having all your sprites in one layout ( layout you actually use in your game ) is a no go, too much RAM usage and probably a crash. Even if you destroy them on start of layout it's a no go.

    #2 So they have to be created as needed with System > Create Object, but that means they have to exist somewhere in some layout in the first place.

    #3 Creating a layout that exists for this purpose ( to hold all sprites ) and never actually going into that layout seems to work. If you actually try to go to that layout, again, probably a crash because too many things loaded into RAM, but since they exist there, you can create them in all other layouts as needed

    #4 Possible issue is jank, because when you create them during gameplay, they need to be loaded into RAM which is not instantaneous. One of the reasons I prefer to have everything pre loaded and ready. Same with music, yeah it streams, but if connection stalls, can cause game to stall too, so I prefer to use music as regular sound and pre load as well.

    That MM pre loader plugin helps with that

  • It's only a few events and it works. I use it in a bunch of games. If the sleep method works, cool, but like he said, they keep moving slightly even when it looks like they are done

  • So if instead of having all of them in a single sprite, I create 12 sprites ( one for each character ) and add this to a family, I can create only the selected one and destroy the other characters/sprites in the family, and that will not be in RAM any more?

    And still be able to use a single event for all characters such as: on click Family > play animation hit

    If that works, I already have a game that could maybe use it

  • This may be a problem ( maybe somebody has a solution )

    Hope this will make sense

    Even though you only have 2 characters fighting at any given time, the way Construct is set up and how you select players all of the other characters will still be in the same sprite and have to be loaded in RAM.

    I usually have one sprite called Player and each character and all its animations will be appended a number like walk0, walk1, walk2 hit0, hit1, hit2 and so on, and a global variable called selected will be assigned those numbers 0,1,2,3 depending on which character is chosen so when doing my events I only need to use a single event for all characters Player > play animation "hit"&selected.

    Of course, you could have each character as its own sprite and/or spread them over a number of layouts, but with Construct how do you trigger animations without having events for each sprite. It is much more efficient if everything is in a single sprite, but then you may have memory problems of course.

    With Flash it was easy, just because you could rename sprites on the fly. Player > play animation "hit"&selected would still work with any sprite/character, because whatever character you select gets renamed to Player

  • I would have a variable called all = 0

    Then you can have a for each loop ( for each physics object )

    Check Y and X velocity of each add them up ( use abs() so it is always a positive number ) and when below ( just a guess ) 10 it counts as not moving and if so add 1 to all variable. Just under the loop reset all variable back to 0

    Now if you have 20 physics object and they all register as not moving, that all variable will reach 20 before being reset, so just before resetting add another event/sub-event, if all = 20 do whatever you need to do when they all stopped moving.

    Depending on your game you may need to keep track of X and Y velocities separately, You can use a number higher than 10 or lower, you can decide after a few test runs. I just checked my golf game, I use < 10 for X velocity and < 0.2 for Y velocity and if both are met trigger not moving.

  • I tried these same games in the latest stable version and there it all works, more or less, as it should.

    These are Construct 2 games imported into Construct 3 and using Construct 3 runtime

    ---4 of the games tried did not load while using remote preview, just get stuck on Construct logo and bar

    ---Touch object's on Tap triggers when it should not

    ---Games that did work with remote preview had no particles created on android phone, but when previewed in browser on PC it worked fine. In this case particles and bullets or asteroids were part of a container. I create bullets or asteroids when necessary and particle trails should be created at the same time, but apparently they are not.

    Same problems if actually exported and uploaded to a web site or if debug APK created.

BadMario's avatar

BadMario

Member since 3 Sep, 2015

Twitter
BadMario has 2 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies