TMAJA's Forum Posts

  • TMAJA Have you tried the 'WebStorage' object?

    Hi Arthology,

    sorry, I wasn't clear in my original post!

    I don't have any problems actually saving the score - I'm using web storage and it all works smoothly.

    My problem is WHEN I save. Ideally I would like to save when ever the user exits the app! Unfortunately when I tried "On Layout End" this doesn't actually get called when the user closes the app via something like the home/back button on the actual phone.

    Currently I am saving the score every few minutes, which obviously is undesirable as it places unnecessary load on the phone hardware!

    Any ideas?

    Thanks!

  • When do you change the score?

    Hi Newt!

    The user score changes literally all the time. Its a kind of banking app, so the user score is always going up.

    Any clues?

  • Hi everyone,

    So I'm trying to save the users score even if they close the app with the home button (for example).

    I tried using "On end of layout" but that doesn't seem to get called if you close the app externally (via red cross, home button, getting a call ect).

    I have currently resorted to saving the score every 60 seconds - which isn't ideal at all.

    Does anyone know a better way of constantly keeping track of the users score even if they terminate the app unexpectedly?

    Thanks!

  • mmmm Good question

    I dont know if there is an easier way

    but personally id use Two invisible helper sprites connected to the touch function

    On touch spawn invisible helper sprite 1 at Touch pos X,Y and record this pos data in a Temporary variable

    and then somehow detect touch 2 and spawn second sprite at second pos X,Y and record that data

    then make an event loop or normal event to check to see if both sprites are on screen if so...

    if so..

    then check for "distance" movement between the two., x, y pos data ..if the "distance" is increasing ..zoom layout out

    if its decreasing ..zoom layout in...

    if no touch on the screen destroy sprites and clear any XY data stored

    C2 does supports Multi touch which is what you want directly....you could read up it here..

    https://www.scirra.com/manual/119/touch

    Hope that gets you started somehow

    Thanks mystazsea!

    Yeah that's got me off to a great start - thank you very much for looking at my question <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

  • Hi everyone,

    Could anyone point me in the right direction in regards to implementing a pinch-to-zoom feature?

    Can construct even support this behaviour?

    Thanks!

  • You can save the global variable via the WebStorage component and reload it when you reload the game

    Hi Roberto,

    Can I still use web storage even though my game will be deployed to mobiles?

    I just made a quick test and it works perfectly in the browser but not on the mobile device.

    Thanks!

  • Yep, I'm in the same boat as you two. Hopefully someone knows the answer?

  • Hi everyone,

    So I'm having a frustrating time making a working 'mute music' button.

    At the moment the user presses a button and a global variable gets changed, which then mutes the music on the start-up of other layouts.

    Unfortunately because I am also loading the game on other layouts, the load over-writes the global variable for the muted music and hey presto, the music is back playing.

    a) Am I using the load feature wrong?

    b) Can I exclude the mute music global variable from being overwritten on load?

    c) Anyone got any other suggestions?

    Thanks in advance

  • I have exactly the same problem.

    I haven't got a lot of time to dedicate to the issue right now, but if I find out anything worthwhile I will most certainly let you both know (and would appreciate it if you do the same ).

    Good luck

  • , , BluePhaze

    Yep, I can confirm my latest binary upload is showing for iPhones/iPod only. Thanks for the help everyone!

  • Yeah your problem is that while ever Go = 3 the app is calling your displayed code over and over and over again.

    rekjl is exactly right, popping trigger once in your conditions should sort your problem out!

  • Try Construct 3

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

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

    Thanks, but I already searched, and tried and tried for hours last night to get it to work, but seems its Universal on CocoonJS's part.

    I think I will eventually write or make a youtube video tutorial on how to get a: capx --> CocoonJS process --> Creating specific Apple files --> AppStore

    The process from Apple is nearly laughably ridiculous and complex, and I'm sure many newer developers will have no idea how to do this. Why is submitting to the Google PlayStore so easy? ^^

    Hi GTGJon,

    I've also scoured the forum and drawn a blank. Have you managed to find any further information?

    Also your exactly right about the submission process for Apple - the play store is a walk in the park by comparison. A tutorial would certainly make a lot of peoples lives easier!

  • Hi GTGJon,

    I'm really glad you posted about this - I'm having exactly the same problem. In fact I actually got my first app rejected today because of precisely that issue.

    I hope someone can give us some answers!

  • I think you would have to gather the difference in time between plays. Something like save the current time/date and the next time the user open the app compare the current time to it. Then convert it to seconds and do the calculations on how much their score should have improved in that amount of time. This of course lets the user cheat if they change the time on their device.

    Hi Firewires,

    that actually sounds like a pretty plausible way of doing it thanks!

    I'm still a bit of a novice when it comes to Construct though - could you advise me as to how I can a) save the time/date specifically (instead of the whole game) b) compare the two times? I've read the manual cover to cover a while ago but I can't remember anything in there that would help me with this!

    Oh just one other little note - the game is mobile based.

    Thanks for your help!

  • Hi everyone,

    I have a 'bank' in my app. The user puts some of their score in the bank and I'm hoping to make it increase while it is in there.

    I was wondering how I can make the users score (when in the bank) increase over time? As if they are generating interest.

    Most importantly I would like it to work even when the app is closed. Is this even possible?

    Anyone got any ideas?

    Thanks!