zikdot's Forum Posts

  • blackhornet Thank you I'll give it a go and let you know

  • blackhornet Okay it may be a bit complex to explain but here goes......

    I have a game where you collect gems using a player. These gems can then be used to buy different characters. If you can afford the character then it is highlighted in black and white so you can see the character, but you're not able to click on it (only the coloured ones work when clicked on). If you have enough money/gems then the player is in colour and therefore available to purchase.

    I used an instant variable (called 'upgrade') in each character for the following purpose. when the person click on a coloured character (one that is available for purchase) 1 is added to the instant variable. If the instant variable is 1 then the player REMAINS in colour. Without this instant variable after restarting the game and going back into the upgrade shop the payer is no longer highlighted since you dont have enough money unless the variable is 1.

    So i want to make a webstorage that will remember the instant variable for when the person closes the app and opens it again.

    I hope this made sense thank you

  • blackhornet So I would start of by doing the following/

    On start of layout > Push "object a" on X axis

    Push "object b" on X axis

    Push "object c" on X axis..........etc

    Then that associates the objects with the array right?

    Then what do I do?

  • You can save the array data with Array.AsJSON, then Array.Load to get it back.

    Thanks a lot. So this will save the data even when the app is closed? Does the same job as Web storage?

  • Put them into an array, then make themselves load from the array after reset?

    Great thank you. Is there a way to attach this array to a web storage so that when the game is reloaded it will keep the data? can it all fit into a single webstorage?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • is there a way to stop instant variables from resetting when the layout is reset? I have 22 separate objects and each works independently. So I don't want to make 22 global variables if i can make it so that the instant variables don't reset.

    Thank you

  • I posted a previous question like this but received no answer so was hoping I could get more information.

    How and where can i get a video ad for my app that you can't skip?

    I want to create a button in my game where you can earn money by watching the ad? I currently use admob.

    Thank you

  • Anyone have any suggestions?

  • I have played on many games where you can earn points by watching an ad which you are not able to escape. From doing this the player earns coins whilst the developer of the game earns revenue. I currently use Admob interstitial and banner ads.

    Where and how can I implement ads into my game where they watch a video to earn coins?

    Thank you

  • awesome thank you

  • I have a scrolling bar with quite a lot of object pinned to it so that when the bar scroll all the objects move with it.

    Each object acts different when clicked on so for the start of layout i have e.g.:

    object 1 - pin to - bar

    object 2 - pin to - bar

    object 3 - pin to - bar

    object 4 - pin to - bar..........etc

    is there a way i can pin all the objects together under a single command to cut down on my actions?

    thanks

  • briggybros I have sent you the capx over PM thank you

  • I have been using families and arrays for spawning my 5 enemies in previous games. This would go as follows

    every x seconds > create object > family.....

    on created set speed etc

    The problem is that when played on my android phone there is always slight lag from the enemies spawning.

    I was suggested to use a InUse boolean for the enemies as it would cause less lag as it doesnt depend on the system??? I am a little confused to be honest. Are there any alternate spawning methods that wouldn't cause lag?

  • Tekniko sent

    thank you!

  • Okay so I found a noticeable improvement when I changed the sprites resolution. It's a bit hard to explain but here's an example.

    When I normally export a 100x100px image from Adobe Illustrator, I export as a png at 72PPI (pixels per inch). when i then import this into C2 its size is generally around 50x50 even though its true size is 100x100. I'm not sure if programes generally do this or whether its a fault on my behalf but either way i was worried that if i scalled it from 50x50 to 100x100 it may be a little pixelated so i've been exporting most of my images from Adobe Illustrator at 150PPI so that when importing it is around 100x100.

    This time I decided to re-save them at 72PPI and just scale up the sprites to the desired size which has helped with the performance of the game. It still lags a bit but not near as much as it did. So i'm thinking that a few more tweaks need to be done in terms of the images themselves. I'm just not sure what?

    I have a big sprite which is the size of the layout which i use as the game over page. Should i put this in a separate layout instead of it sitting in the game layout and then setting its position when the player is destroyed? Does it slow the game even though it has no use or events until the player is destroyed?

    Thanks