BadMario's Forum Posts

  • 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.

  • 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.

  • I am pretty sure Newgrounds gives you a % if they put ads in or on top of your game, but you have to sign up for that, or they have to offer it to you. I did get an offer a while back, but I declined. I preferred to use my own ads or just no ads games with links back to my site.

    If you are talking about ads around your game, well, it is their site, so I don't expect them to share that

  • 90% ?

  • Why Adsense and not another?

    Because Google is 99% of the market?

    There is an admob plugin and Facebook instant games plugin already for mobiles, for that exact reason.

    You have to admit that this is a good question. Construct is HTML 5 technology, but has no support for HTML ads, but it does have support for mobile ads.

    There are really only 2 proven players here ( web games ), Google and CPM Star

    At its peak I was making $100+ per day with CPM Star ads within Flash games, and by peak I mean a period of about 18 months.

  • That is a very different thing. The way Flash games worked, you make a game, put in some more games links and CPMStar ads and give them away for free, then make money from ads and visitors to your site from more games links ( which is where adsense comes in ) and website/publisher gets a free game in exchange .

    For web games this is still the way to go.

    There are a bunch of sites/publishers who will take your game and put their ads in it ( I am guessing adsforgames ), then do the same thing ( distribution ) and give you a % of ad revenue. Problem with that is no more games links in your own game, so basically you're giving them your game for free in hopes of making some money from their ads and you have no idea how much they are really making and paying you.

    If you have something like a CPMStar plugin, you do the distributing yourself, make money from those ads and you get visitors to your site via more games links.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, Scirra has admob/mobile ads plugin, so it's kind of absurd that they don't have anything like that for HTML5 games Why not a CPM Star plugin which was the main ad provider during Flash days and it worked extremely well.

  • Using Construct 3 to build debug APK files seems to work fine, but with one of my games I would prefer to export it from Construct 2, recompress images myself and then upload to build server, is this possible?

    There is a good reason for this. #1 Construct 2 export uses about 450 MB of ram compared to 650 MB if built directly from Construct 3. Also I can get the final file to be a 20 MB download instead of 40 MB when exported and built directly from Construct 3