dop2000's Forum Posts

  • It's actually a known issue with the TiledBackground:

    github.com/Scirra/Construct-bugs/issues/7763

  • BTW, can I also somehow make inventory contents persist between layouts?

    At the moment your inventory is basically stored in ui_inventory_slot sprites.

    One option is to make this sprite global. It will then migrate to other layouts. Just make sure that other layouts have the same layer and that you are not making duplicates of inventory slots - it's a very common problem. Use the debugger (Shift+F4) to check the number of instances.

    A better solution is to store the inventory in some data object - an array, dictionary, or JSON. Then you can rebuild the inventory at the start of every layout. And also you will be able to store it in Local Storage between sessions.

  • It should be 30 fps because I set max delta-time is 1/30. Maybe I misinterpreted it.

    No, that action doesn't limit the fps. I suggest removing it.

  • Here's how you can fix and optimize your code:

  • You definitely need to use dt, not to fix this issue, but to make sure your game runs correctly on different framerates.

    Does this problem happen on PC, in preview? You probably have to wait longer than 2 minutes.

    Does it still happen if you touch the mobile screen from time to time? Perhaps the phone detects no user activity and lowers the framerate or enters some kind of battery-saving mode.

    There could also be a problem with offsetting the image in tiledbackground too far. Try this:

    TiledBackground: Set image X offset to (Self.ImageOffsetX-60×dt)%Self.ImageWidth

  • You need to use the Websocket plugin. Have you tried sending the data with "Websocket send text" action?

  • You need to provide more information. Is this is a top-down view game? Should enemies move on a grid, from cell to cell? Or just find path to a random spot in the dungeon and move there?

  • I have a template for this request saved as a JSON project file:

    It doesn't have to be a file, you can simply store this JSON string in a text variable. Then to replace session ID use:

    Set jsonString to replace(jsonString, "YOUR_SESSION_ID", extractedSessionID)

    Another option is to load (parse) it into JSON object and use this action:

    JSON Set value at "transport.session_id" to extractedSessionID

    Then how do I format this so that I can use it in the data parameter of the AJAX request?

    This should be in Twitch documentation I suppose. If you are using JSON object, you can convert it back to string with JSON.ToCompactString expression.

  • No, that's essentially the same what you had before.

    The condition should pick family instances - "System Pick fam_cards by evaluating ..."

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would try giving the objects slightly rounded edges:

  • You can't simulate a keyboard event. But you can run the same code that runs when the key is pressed.

    Keyboard On Space pressed : Call function PlayerJump
    
    Touch on Button touched : Call function PlayerJump
    
  • Are you using Construct 3?

  • NW.js package is 150MB zipped. So 200MB makes sense.

    I believe WebView2 export is a lot lighter.

  • idk, I use Construct explicitly when I don't feel like coding, I don't think there was any other ways to do JSONs unless I'm just blind.

    Think of JSON as a more advanced and flexible dictionary. It's not that complicated once you try it.

    You can of course use a dictionary. There are two options:

    1. Name the keys in the dictionary as CardType&ValueType, for example "DarkKnight_price":10

    2. Create a new instance of the dictionary for each instance of the card sprite. Link it with the card (for example, by UID). Then each card will have its own dictionary.

  • You should try contacting the author of the theme.

    but got a warning that any file saved with DARCSS will no longer load if I uninstall the theme...

    What??? Is this true? How can an editor theme prevent projects from loading?