John Cutter's Forum Posts

  • I recently posted an app to my bluehost website. I then discovered that bluehost offers a free (shared) SSL certificate so I went ahead and got that working. This is actually kind of important because my app uses voice recognition, and without SSL it asks for permission every. time. you. click. the. talk. button.

    I can now get to my app using an "https://" link OR the old "http://" link.

    Here's the problem: I made a small update and uploaded it. When I use the new link the app doesn't detect that there is a new version. It's just using the cached one. (Even after repeated page reloads, after restarting the browser, etc.) The old "http://" link picked up the change immediately and downloaded the new version.

    Why is only one link working? They are both pointing to the same files, right? Confused.

  • Ashley I just downloaded the latest version and uploaded a new file to my website. The only difference I see is that WindowinnerHeight now reports as 960 instead of 928.

    PROGRAM:

    App: Speech Synthesis Demo

    Build: r223

    Fullscreen in browser: Letterbox scale

    Window size: 640 x 260

    LAPTOP (full screen):

    WindowinnerWidth: 1920

    WindowinnerHeight: 955

    IPAD PRO:

    WindowinnerWidth: 1366

    WindowinnerHeight: 960 (was 928)

    Let me know if there's anything else I can do to help you fix the problem.

  • I think this was user error. I did another export and it seems to be working now.

    In the past I have used the "How Do I..." section when I have very specific questions. This one was a bit more general so I picked the "General" section. Should that section be used for something else?

  • I have an exterior Project File that I generate using Excel. This gets uploaded when I export my project and everything works great.

    I'd like to be able to update my website directly from Excel (if the only thing changing is that single data file). So I wrote some Excel code to do the following:

    1. Generate a .json file (the Project File)

    2. Upload the .json file to my server

    3. Load latest offline.appcache from project folder

    4. Replace the timestamp (#98769808) with a random number

    5. Upload offline.appcache to my server

    Everything seems to be working fine, but C2 isn't recognizing that it needs to update. Do I need to use an actual timestamp instead of just a random number? If so, what is the format?

    Any other suggestions?

    Thanks!

  • Ashley Here are the results of the test you requested:

    PROGRAM:

    App: Speech Synthesis Demo

    Build: r222

    Fullscreen in browser: Letterbox scale

    Window size: 640 x 260

    LAPTOP (full screen):

    WindowinnerWidth: 1920

    WindowinnerHeight: 955

    IPAD PRO:

    WindowinnerWidth: 1366

    WindowinnerHeight: 928

    QUESTION: I don't know if these values are expected or indicate some kind of iOS issue. Anyone?

  • Ashley I just downloaded r222, built my app, uploaded it to my website, and brought it up on my iPad Pro. After it updated and restarted the page looked exactly the same. (See picture above.)

    DETAILS:

    Resolution: 900x525

    Fullscreen in browser: Letterbox scale

    Is there anything else you want me to look at or try?

    NOTE: I didn't uninstall r221. Hopefully, that didn't invalidate the test.

  • I just logged in to post some pictures of the issue. Hopefully r222 will work a bit better. Will check it out later.

    Here's how my app looks on several different devices:

    MY LAPTOP:

    MY WIFE'S IPAD3:

    MY IPHONE:

    MY IPAD PRO

  • Great story, Ciaphuas! Nice to see that you are pursuing one of your passions!

    Long time game designer here who does a little bit of coding. I'm really enjoying Construct 2, but I sometimes miss actual programming. I've been looking at Corona recently, but I suspect common sense will win out in the end and I'll stick with C2. (For prototypes and web stuff. I'll probably choose Fusion 2.5 or Gamemaker Studio if I decide to make something for one of the mobile platforms.)

  • I *just* figured out the Local Storage stuff myself. (So I'm NOT the right guy to comment on someone else's .capx) But what is the general issue you're having?

    I like to organize my code into groups that I can turn on and off as needed. This may not be helpful at all, but here's how I handled Local Storage:

    [START GROUP]On start of layout:
         get item "player"
         get item "score"
         get item "sound"
         Set group "START GROUP" Deactivated
         Set group "GET VALUES" Activated
    
    [GET VALUES]
    On item "player" get
         System -> Set item global_player to localstorage.itemvalue
    On item "score" get
         System -> Set item global_score to localstorage.itemvalue
    On item "sound" get
         System -> Set item global_sound to localstorage.itemvalue
    On All Gets Complete
         Set Group "GET VALUES" Deactivated
    [/code:39omiwki]
    Good luck with your project!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks 99instances2go, I appreciate the help -- but I've never had any issues sorting my array. I only need to sort by the "score" and it's as simple as "sort x". Works perfectly.

    Oh, and thanks for the help with "push", blackhornet. With your help I got my app working last night. It has taken me almost a month (for something I thought I could do in a weekend), but it's almost finished now.

    Most of my Flashcard app was super simple to make using C2, but I struggled with array handling, loading/saving data, the dictionary object, and local storage. The next project should go a LOT smoother.

  • Thanks, blackhornet. I tried using push last night and failed. Came online to learn more and saw some posts that said its not really for multidimensional arrays, so I gave up on the idea. Will look at it some more tonight, but if anyone has any advice...

  • I have an array with a width of 440 and a height of 5. It looks like this:

      [score, text1, text2, category, id]

    For my app I need to sort the array by score but also filter it by whichever category the user chooses. To accomplish this I created another array and set it to have the same dimensions. Then I iterate through the array that has my data and copy ONLY the rows that match the chosen category into the new array. That part works great.

    Unfortunately, since both arrays have the same dimensions, my new filtered array isn't as big and so has a bunch of "0,0,0,0" lines at the end.

    How do I fix this? I suppose I could set all the "0" scores to a really high number so they would get sorted to the bottom, but there has to be a more elegant solution. Can I search through and delete the "0,0,0,0" rows?

    Not sure if it will be useful but here's a picture of my function:

    NOTE: On 'Start of layout' I load all my data into "array2" and this function copies everything that matches category "x" into the original array ("array")

  • Looks like this bug is closed, but I found THIS online:

    -----------------------------------------------------------------------------

    My question was: why does window.speechSynthesis.getVoices() return empty array, after page is loaded and onready function is triggered? As you can see if you click on the link, same function returns an array of available voices of Chrome by onclick triger?

    It seems Chrome loads window.speechSynthesis after the page load!

    The problem is not in ready event. If I remove the line var voice=... from ready function, for first click it shows empty list in console. But the second click works fine.

    It seems window.speechSynthesis needs more time to load after first call. You need to call it twice! But also, you need to wait and let it load before second call on window.speechSynthesis. For example, following code shows two empty arrays in console if you run it for first time:

    // First speechSynthesis call

    var voices = window.speechSynthesis.getVoices();

    console.log(voices);

    // Second speechSynthesis call

    voices = window.speechSynthesis.getVoices();

    console.log(voices);

  • Ashley: Usually, the first time I run the Speech Synthesis app on my iPhone or iPad the voices show up in the list box. But when I refresh the page the list doesn't populate. If I refresh it enough times (usually 5 to 8 or so) the list will appear again.

    Not sure if this helps but the French voice I need shows up like this: "fr-FR: Thomas (com.apple.ttsbundle.Thomas-compact)"

    My workaround is to look up the "platform" using the Browser object and then use the French voice that I manually set at design time. That seems to be working so far, but I need to get the platform name (and voice name) for Android and Mac.

  • I'm clearly struggling to understand C2's arrays. Here's how MY array looks in the debugger:

    0        [119,Pour,For,354]
    1        [125,Bonjour,Hello,128]
    2        [133,Comment,How,45]
    ..
    439      [450,Vingt,Twenty,235]
    [/code:1v028imz]
    
    Seems really straightforward.  There are 440 "rows" and each one I'm treating like a record.  The first column is a score, the second is a French word, the third is the English equivalent, and the last is my index.  Every 5 cards or so I sort everything by the score column.  That's all working great.
    
    But the C2 debugger reports an array WIDTH of 439 and a HEIGHT of 4.  So I guess I just have my vertices mixed up, right?
    
    In any event, I was able to get this working.  Thanks again for the help!