smart_fr's Forum Posts

  • 7 posts
  • Hello Ashley,

    Could we also have a global prompt() function working in web workers mode, please?

    I need to prompt the user to input short texts and I'd like it to be through a native browser popup, which is the only simple solution I could find to properly adapt the user experience to screen size, keyboard etc. The javascript prompt() function is very convenient to achieve this, but it can't be used in web workers mode.

    Thank you!

  • Hi ThePhotons,

    You are right, my issue had to do with Javascript integration in Workers mode rather than with the Photon plugin.

    So the workaround you provided seems to be a solution to use the Photon plugin in Workers mode.

    Waiting for the updated plugin now, which won't require the workaround.

    Thank you!

  • Sorry I botched my conclusion. I should have written:

    However, when back to "Use workers: No", the Text fields react to "On tap" events, and network features work properly with the modified Photon plugin... Hence I believe the Text insensitiveness to tap is caused by a combination of workers and the "inline-script" mode set in plugin.js.

    As a recap:

    Using the original Photon plugin with "external-script" in plugin.js,

    - Setting "Use workers: No" => App works but without workers

    - Setting "Use workers: Yes" => App doesn't launch (black window)

    Using the modified Photon plugin with "inline-script" in plugin.js,

    - Setting "Use workers: Yes" => App launches but Text fields don't react to "On tap" events

    - Setting "Use workers: No" => App works but without workers

    Does it make sense?

  • Hi ThePhotons,

    Thank you for your answer.

    I would say it is almost working:

    Now, my app effectively launches with the global setting "Use workers: Yes", unlike before making this change.

    BUT I have somewhere Text (native Construct plugin) fields which have to be tapped in order to enter room name (so it is required to test network features) and unfortunately, the "On tap gesture" action doesn't work: nothing happens when a Text field is tapped. Strange, no?

    However, when back to "Use workers: No", the network features work properly with the modified Photon plugin... Hence I believe the Text insensitiveness to tap problem has nothing at all to do with workers. It may be caused by this "inline-script" mode in plugin.js.

    Does it make sense?

  • Hi ThePhotons,

    (and thank you for this great add-on!)

    Please try to replace "external-script" with "inline-script" in plugin.js at the root of photon.c3addon archive. I don't know why but this works for me.

    1. Should this replacement be made before installing the Photon plugin with Construct's add-on manager?
    2. Do you mean there's no explanation as to why Photon isn't compatible with web workers out of the box?
    3. No fix ongoing by Photon's dev team?
  • I would like to use algorithms written in python to animate a computer player in my Construct 3 game.

    Of course the integration wouldn't require the user to install any external library.

    How is this possible?

    I can see there was native support back in Construct Classic, but I can't seem to find any solution with Construct 3. And rewriting the algorithms with javascript wouldn't be convenient.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, did you fix your problem?

    My loading logo doesn't show up either, only the progress bar shows up.

    Both in preview mode and with HTML5 export.

  • 7 posts