zhroguexe's Recent Forum Activity

  • Right now i am setting all collisions properties to False for every sprite that is used as a "detail" for the levels

    I also went and decided to make 1 big shared event sheet where all the player controls are, such as movement and pausing, so the code wouldn't have to be repeated in every level's sheet

    After doing some research about further possible optimizations here are my following "Unanswered" questions:

    = I read this

    "To ensure previews are fast, duplicate images are not removed when previewing. However when exporting, Construct 2 looks for and removes duplicate images. This helps reduce the download size and memory use, since there's no point having identical images downloaded twice or loaded in to memory twice." from another thread here.

    I often used the same image (resource) but opened with in different sprite(because i wanted one block to do nothing and another to do something while they were both identical on the outside)

    Can i be assured that all the repeating objects i have won't be included in the final file size? (as in, all those sprites on the right that i imported but deleted or that i imported more than once because "noob" mistakes)

    =i read this: (regarding minifing script)

    "This renames everything possible in the javascript code to use the shortest names possible, which makes the script smaller and quicker to download."

    But most importantly

    "It may also make the resulting Javascript slightly more efficient, since it employs some basic optimisations like inlining and removal of unused code."

    Does this mean that all those Copied variables i have

    (for example: at the start i copied all my movement code, including variables, and now i have (for example) variable: canyoudoublejump2 on level2 canyoudoublejump3 on level 3 and so on)

    and that are, most probably, not used will be removed from the code thus i can just ignore them in the project and not "hunt" the unused variables since, upon exporting, they won't be an issue?

    =i read this:

    "If you have many background and graphics sprites, you can add all the images in one sprite and make the animation speed to 0 , then change the frames as you like.

    This better than using 50 sprites as background and graphics."

    Does this have a big impact on the framerate/loading overall performance or is it something done because it is more "convenient" (and i could see why it would be!)

    And a side question:

    I have a text object on all of my levels that indicates the distance of the player from the end of the level, to do this im using the distance between 2 points code i found here, my question is: Since im using the "calculate distance and put in text" code "on player moving" , does this affect the performance since every time the player moves the CPU has to calculate X1-x1,y1-y2 or is it insignificant in terms of performance drop?

  • Try Construct 3

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

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

    Really need to solve this guys so i can update the final version of the game!

  • Thanks for the code LittleStain but what im wondering is how do i know which product has been fetched

    for example

    ON sprite(btn1) touched: FETCH PRODUCT 1

    ON sprite(btn2) touched: FETCH PRODUCT 2

    ON product fetch complete

    --IS IN COCOONJS

    -----IS STORE AVAILABLE : Purchase PRODUCT 1

    How do i purchase the product based on the fetched product of the button? Since the "on product fetch complete" cant go under BTN touch

    In this example:

    How do i know if i've fetched the product from BTN 1 or BTN 2? (without declaring variables for each button and setting them to true and then doing an IF true then kind of thing, because it would take a lot of space and time for all of the products i've got)

  • So how should i set up the code?

    ON sprite(btn) touched: FETCH PRODUCT X

    IS IN COCOONJS

    IS STORE AVAILABLE : Purchase X

    where do i put the ON product fetch complete? (it cant go under On sprite touched, it has to be separate somehow)

    LittleStain if you've never worked with fetching products do you knwo someone who has so he could help out?

  • is "is fetched" the same as "is store available" or "is in cocoonJS"? Because i dont see any other options such as "Is fetched" There is, however, these two:

    "on product fetch completed"

    and

    "on product fetch started"

    Are these the same as "is fetched"?

    Sorry for all these noob questions LittleStain and thanks for the help so far!

  • LittleStain

    Thats the tutorial i followed in the first place! The only difference is that instead of fetching the product on start of layout im fetching it on button press because there is more than 1 product to fetch!

    So, taking for example the pic you posted its:

    ON TOUCH SPRITE: fetch "firstproduct"

    is in cocoonJS

    is store available : then : purchase product "firstproduct"

    Any workaround to this?

  • BUMP would like to solve this as soon as possible so i can finally publish the whole thing (can't wait!!!)

    what i tried to do just now was adding a WAIT after the fetch but nothing changed :/ How do i make this "next tick" work LittleStain

  • So what should i do to fix this, could you please explain more about this "next tick" ?

  • Just to be more clear:

    The problem happens on each purchase i try to make for the first time but disappears on second try

    If you want a visual example go to the play store and download The Game Of Boz and see for yourself, so far i've had no luck in fixing this issue.. if you guys know what i could do then please help

  • hey guys so i've published my game and when i press the button to buy an item it gives the PURCHASE FAILED message for the first try, on the second button press it works. This happens to all my in-app products!

    First press nothing, second button press works

    here is my code:

    On btn press: fetch product "name"

    is in cocoonJS

    is store available then: purchase product "name" with preview

    Anything wrong with this? I dont want to have the user to press 2 times for 1 purchase!

  • I've successfully set up Admob and Mopub, and i know this because i've already earned 3$ (as it says on MoPub and Admob statistics)!

    My question is: Who pays me, mopub or admob?

    Mopub has my paypal info and i think that once i earn 100$ they will pay me, but what about admob, do i get another 100$ from them as well or is it only Mopub that pays while Admob doesn't do anything in terms of payment?

    thx for reading

    p.s. didn't know where to post so i just did a casual post here :d

  • thanks for the reply

    Well, i read the link you posted and it did say some interesting things (about mobile's having about 100mbs to work with and that's why you should use few background images to make a good looking background) and that's basically what i've done for my backgrounds!

    I have 1 sprie for the grass, 1 sprite for the fog, 3 cloud sprites, 1 hill sprite, 1 distance hill sprite. 1 tree and 1 bush

    Total sprites that are making the background: 9 (which are repeated)

    If we count the other layers' sprites theres about 10/20 more at max 22!

    I was under the impression that having all those sprites in 1 image would solve the issue but you said that that wasn't an issue so im stunned, what should i do to solve these "fps drops" that my friends experience on their phones from time to time?

    I dont mean that it's an awful fps drop i mean that they get a second or half of a second of Fps drop here and there :/

zhroguexe's avatar

zhroguexe

Member since 23 Nov, 2014

None one is following zhroguexe yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies