Laurent's Recent Forum Activity

  • Hi dop2000

    Thanks !

    I've slightly modified my question since you answered.

    I've tried your formula by checking templateName but it doesn't seem to work..

    Is it possible to pick a family membre before creating it ?

    Besides this family problem, what I need is :

    - create a given object from data taken from a JSON (actually an object used as a template)

    - add this object (template) as a child to another object.

    And it seems that :

    - I can create a object by name

    - I can't add an object by name to another object.

    Hence my attempt of a workaround using families

  • In my game, I've a sprite named "card" with hierarchy and need to add children runtime. The children will be taken from a Family named "External modules".

    I've tried a test with a sprite named "test". It works

    Point is that when I replace that sprite with family, a random family sprite is created. How can I choose the family member to display ? (actually, I'd like to show a template)

    Tagged:

  • This is a special request.

    I have a construct project that is basically an iframe that displays a website.

    Everything is fine except for display : iframe is not responsive and shows margins depending on the window size.

    How can I make it responsive so that iframe exactly matches window size ?

  • Searching how to embed a leaflet map in a Construct project, I didi stumble upon this :

    blog.stranianelli.com/maps-in-construct-3-leaflet-and-openlayers

    The github hosts a file that doesn't seem to be working:

    https://www.dropbox.com/scl/fi/ebva0s77a3nkhpkoljmc0/leaflet.c3p?rlkey=eltmhvns8w82vxoe7xzg0n3g8&dl=0

    this may be because the file states "Scripts Type: Classic" but there's nowhere this can be checked in the C3 project.

    Any idea on how to fix this ?

  • PWA is giving me a hard time !

    A module determines if my game run on Android and displays a prompt with a button to add the game on home screen.

    It works perfectly on Chrome but have very different results with other browsers :

    - doesn't work on Samsung Browser, install doesn't trigger

    - Installs with Firefox a version of the game very difficult to quit (? very strange yes)

    - may have inconstitancies with other browsers.

    So, in addition to finding out that the game runs on Android, I'm looking for a way to determine the navigator.

    I've tried with parsing the Useragent file from the Browser plugin, looking for the "Chrome" part but it appears that, for exemple, "Chrome" part also appears with Samsung browser...

    I did find here a list (a year old, though) of common user agent strings : https://deviceatlas.com/blog/mobile-browser-user-agent-strings

    I guess something can be made out of this to achieve a sort of accurate detection system, maybe involving regex, but I don't know how to do it.

    Any idea ?

    Also

  • I try to have my game play as a PWA.

    I followed the the instructions here for offline use:

    construct.net/en/tutorials/offline-games-construct-8

    I successfully managed to prompt a install system when app is playing in a browser and offer install UI for Android and Apple.

    But I still have problems with offline app update.

    Here's what I did :

    - Let's say that I run update 2 and that version 3 is available.

    - On the first layout of the game (version 2) I check update availability for version 3 and check update process success. They both work. Version 2 says it has been updated to version 3.

    - When update complete is detected, I play a sound and prompt the user to reload. Both work

    - When page is reloaded, the tutorial says game should run the new version but in my case, the game still plays version 2. To have Version 3 running, I have to kill the game and launch it again.

    This has been tested on both Android and iOS.

    Is there something I did wrong ?

    Tagged:

  • On mobil I can't really help. I would make a new topic for that question otherwise it will get lost here.

    Thank you. I guess I'll go forward with my testing and come back to the forum to ask for this topic.

  • What does it shows in Browser.DisplayMode when in standalone?

    If it always shows 'Browser' then negation will have no effect.

    When it's not browser it shows nothing. So I guess negation will do

    Maybe it's cached?

    If you force the App with Ctrl-R to reload does you get the new version?

    I'm working on a mobile version where Ctrl-R is not available. Only the reload action of the Browser plugin. If it is cached, is there a way to clean cache from construct ? Don't think so...

  • Thank you Asmodean !

    That is a very neat approach ! I'll give it a try

    EDIT : I tried it. It is fine, Browser mode is recongnized but not Standalone nor Minimal UI...

    I'm may give it a try and check Browser/No Browser but I would have loved to be sure to know if the app is standalone.

    Any other idea ?

    something else, I also added an update system.

    After update, I prompt a button to let user reload the game but reloading the page doesn't run the updated version but previous version.

    Does user has to kill the app in order to run an update ? How can I let the user use the updated from the previous version ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, thank you. Have you tested it ? Because ChatGPT usually generates crap.

    Actually I was looking for a straight forward solution without local storage.

    Any other solution would be appreciated.

  • I would like to encourage the user to add my game to their homescreen.

    So the first time the game is launched in the browser, I offer this option by running "request install".

    Once the game is added and launched offline, I need to test that game is on home screen so that install is no longer proposed.

    So how can I check that a game is running offline ?

  • You do not have permission to view this post

Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies