John Cutter's Recent Forum Activity

  • One of my few gripes about Construct 3 is that when I post a new version of my game (on the web) users don't get it right away. I think maybe it's loading the new version in the background and users will get it the next time they launch the game? (But if there's a serious bug I want to make sure that everyone is playing the fixed version. Is there a way to force that?)

    On a related note, I'm making a Wordle-like game with a daily puzzle. Players can start a puzzle on Monday and any time they return on Monday they will automatically load their previous effort. But starting on Tuesday all players should get the NEW puzzle for that day. Right now they are getting the SAVED game from the previous day. When I refreshing the page it fixes the problem.

    Here's my logic: (am I doing something wrong?)

    ON GAME LAUNCH:

    - Get localstorage key "my_date"

    - If "my_date" matches the current date then LOAD the save state

    AT VARIOUS POINTS DURING THE GAME:

    - Save the current date to "my_date"

    - SAVE the game state

  • SOLVED!!

    I forgot that my Initialization group automatically gets disabled at the last line of code. This was preventing the "get" from completing.

  • I stripped some code down to just the basics and it appears that "On get" isn't working and I have no idea why. Any help would be greatly appreciated!

    I have added the LocalStorage object to my project and it has a key called "date" with the value "2" (I have verified this in debug)

    This is the code that isn't working:

    System: On start of layout - LocalStorage Get item "date"

    LocalStorage: On item "date" get - txt_test Set text to "Got the item"

    LocalStorage: On error - txt_test Set text to "Error"

    * * *

    Unfortunately, txt_test never updates. It won't even show me an error. What am I doing wrong?

  • When I create games in Construct I like to put my code in groups. When a group is no longer needed I disable it. I love that groups are collapsible and it just helps keep me focused.

    Sometimes, however, I will start something (like a fade or lerp movement) that would require a group to stay open. With my latest project I have created a group called "Always" for this code.

    Does anyone else do something similar? I'm not sure if this is a good practice, or if there is something else that would work better...

    EXAMPLE:

    I'm working on a word game. During the scoring sequence I initiate a bullet behavior on the letter tiles to make them fly up and then fall off the screen, with gravity. Then I disable the Scoring group.

    In my Always group I have this code:

    - If bullet behavior for [sprite] is enabled

    - set sprite.angle to sprite.angle + 12

    (This makes the letters spin as they fly off, which looks nicer.)

  • I have imported JSON files into C3 before, but I'm having an issue with my latest JSON file.

    After the import, I double click on the file and I just see a bunch of text:

    {"c2array": true, "size": [334, 6, 1], "data": [[["6/6/2023"], ["muck"], ["tithe"], ["rout"], ["I've recently been reading a really interesting book... 
    

    Normally when this happens I can find a little red underline that tells me why (and where) the import failed, but there doesn't seem to be one. I copied all of the text and pasted it into a JSON validator. It tells me the file is valid!

    The only potential clue I have is that the text between quotes is maroon until about halfway through. After that all the text is black. Is this an indication of a potential issue? I've looked at the spot with the color change and everything looks fine.

    There are no visible errors in C3 and JSON Lint says the file is valid. How do I find the problem? Not sure where to look.

    UPDATE: I had chatGPT re-write my export code and after a few iterations it seems to be working now!

    The non-working version had the brackets and values on the same line. The working version has everything on different lines. Both are valid JSON formats, but perhaps C3 needs the new lines?

  • Thanks for the excellent replies. I wanted to provide a quick update because I found a problem with my VBA export tool. (It was an issue with how JSON was handling quotation marks.)

    I fixed the problem by adding three slashes "\\\" in front of each quotation mark (in the JSON file).

  • I'm working on a game that has dialogue in it. I put the dialogue (and some other data I need) into an Excel sheet and export it to a JSON file.

    Then I import this file into Construct 3 and convert it to an array.

    Unfortunately, I ran into an issue with the quotation marks. I solved it -- for now -- by using single quotation marks "'" but this makes the dialogue harder to read.

    How do I store quotation marks in an array? With triple quotation marks? For example: """.

  • Right after I posted my question I thought, "Hmm. I wonder if chatGPT knows anything about Construct 3? Maybe I should ask the AI my question!"

    Here's the response from GPT 4.0:

    It sounds like you're having trouble locating the properties of a text box in your Construct 3 project. Here are a few suggestions to help you find and modify the text box properties:

    1. Make sure the text box is selected: In the Layout view, click on the txt_final_score text box to ensure it's selected. If it's not visible in the Layout view, double-check your layers and make sure the layer containing the text box is visible and unlocked.

    2. Check the Object Types: Go to the Project Bar (on the right side by default) and look for the "Object Types" folder. If you don't see the text object called "txt_final_score," it's possible that it was accidentally deleted or renamed. In this case, you'll need to recreate the text object and assign the correct properties.

    3. Verify the object type: Ensure that the txt_final_score object is a "Text" object and not a different type, such as "SpriteFont" or "TextBox." The properties you're looking for, like font color and size, are specific to Text objects. If your object is a different type, you'll need to replace it with a Text object.

    4. Inspect the Event Sheet: If you still can't locate the text box, it might be created dynamically through an event in the Event Sheet. Look for events that create or modify text objects, specifically targeting "txt_final_score." It's possible that the text box is being created on a specific condition or layer that's not currently active.

    5. Verify the active layout: Make sure you're working in the correct layout. Construct 3 projects can have multiple layouts, and it's possible that the txt_final_score object is in a different layout than the one you're currently viewing.

    If you've tried all these steps and still can't find the properties for your text box, consider posting your issue on the Construct 3 forum or reaching out to the Construct community for assistance. There might be a specific issue in your project that requires a closer look.

    Friggin' amazing! And sure enough, the very first point fixed my problem! (I had my text box on a layer that wasn't visible or unlocked. Forgot about that!)

  • I recently picked up an old game to finish it -- but I'm having trouble with one of my text boxes.

    After my game is over I add up the player's score in big numbers at the bottom of the screen. I wanted to change the size and color of the text, but when I clicked on the text box object most of the properties were missing.

    That puzzled me, but then I thought, "Oh, the text box must not exist in my layout. I apparently create it in code!"

    Here's the problem. I have searched ALL of my code and I am not creating that text box anywhere. What's going on? What am I missing? Been trying to figure this out since yesterday...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been reading about a PlayFab plugin. Has anyone used it?

  • I'm working on a word game and I'd like to include a global high score leaderboard. What services are people using these days?

    I found the awesome LootLocker tutorial for Construct 3, but I'm trying to create the next Wordle and at higher player counts their pricing starts to get out of my comfort zone.

    I've found dozens of other options, but many of the recommendations are several years old. What's the current best option for something like this?

  • Hmm. I had a thought about the subscription idea.

    What if I added an additional query string when I launch my C3 program? Right now I'm passing the filename. What if I also passed some kind of code based on the current date, or something?

    For example, if a user went to the link on my subscriber-protected Shopify page and clicked on it, the URL would include query strings for the name of the file AND the current date (which would be encrypted). My C3 program could then use the encrypted date to determine if the user actually came from the launch page.

John Cutter's avatar

John Cutter

Member since 11 Dec, 2015

None one is following John Cutter yet!

Connect with John Cutter