terransage's Recent Forum Activity

  • Thanks, Eren. I'm in the process of learning postMessage. I looked inside Rex's addon, too, and saw that postMessage was used. I have to rethink the structure of my game, but at least I don't have to dump the whole thing, as I feared yesterday, lol.

  • I'm starting to answer my own question:

    Now I'm thinking of passing information more directly, between iframe-embedded project and parent project, using postMessage method--and I'm in the process of learning about it. RainbowRex used to have an addon for Construct 2 that could pass information in this way, and I'm wondering if he or she used postMessage to do it. it was a great addon, but I couldn't find a version of it that's compatible with Construct 3. I think it was called FrameMessage....

  • I was just looking at the Storage Script Interface page in the manual and found this paragraph:

    "As with the Local Storage plugin, the storage is unique to the specific project. It is not shared with any other projects or other website storage, even on the same origin."

    If local Storage won't work between projects, is there anything that can work? I've seen postmessage mentioned, but I'm not sure if it can be used in this way.

    I think I'm starting to answer my own question. I might be able to communicate between an iframe-embedded Construct project to a parent Construct project using the postmessage method. Rex Rainbow had created an addon for Construct 2 that allowed for communication between iframe and parent, and I'm wondering if he used postmessage for it to work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: I changed the title of this post so that it better describes what I'm trying to achieve:

    I'm working on a project that switches between web pages and separate construct "projects" embedded in iframes. It's a fairly large and complex treasure hunt game relying heavily on streamed video (Vimeo), which is why I have separate Construct projects on separate pages loading in iframes. The type of the stored information I'm trying to send and access is about which objects a Player has found or used up or lost.

    When I used Construct 2, I was able to send stored information back and forth between the Construct windows using localstorage. The Player would click an object in one window and set a localstorage key. Then somewhere down the line, another Construct window (a separate "project") on another page would check if that key existed, then set a variable to LocalStorage.ItemValue, etc.

    I tested the same process on my new Construct 3 pages, but it doesn't work anymore. It does work for storing information that can be used later by the same project, but it isn't sharing it with other Construct projects on other pages.

    During my Construct 2 days I noticed that localstorage didn't seem to work for communicating between the Construct projects and the .html pages, and I'm wondering if this is a similar issue.

    Thanks for your help!

  • You probably already figured out a solution to this problem, but I noticed that no one answered your post when I was searching for an answer to the same issue. In Construct 2 I used to use the browser object's Execute Javascript function to write: "document.getElementById('my_iframe').style.zIndex = '-1'" That worked very well with Pode's iframe, but doesn't seem to work with the Construct 3 iframe object. I did, however, experiment with stacking two iframes on top of each other. The iframe on top references a URL that has a transparent CSS background layer, and within that background I embedded another Construct 3 project, resizing it and placing it so that you can see the Construct iframe underneath it, if that makes sense. I haven't gone beyond that experiment yet, but I suspect that clicking sprites, etc., in the top Construct window (in the top iframe) can be used to set localStorage keys that you can then read in the lower iframe Construct window in order to get it to respond in a particular way. It's hard to put this all into words, lol....

  • I agree with Elliott: your game has a great look, and your wiki does too. In the distant past I used YouTube to show my artwork (and some rough Unity game scenes), but that was before I had a good camera or any idea of what I was doing. Somehow, even with my amateurish low-res videos, I got contacted by someone who had a medieval crafts and games website, asking if he could embed one of my paper castle vids. I said, "No way!" I mean, I said, "Sure!" That move alone greatly increased my views, although other factors in my life (bad decisions on my part, mostly) pulled everything downward again.

    My current project heavily involves YT and Vimeo video as actual parts of the game play, so in a sense I'm using YouTube for both marketing and as part of the game. Maybe you could use YT videos to hint at Easter Eggs hidden in the game, or something like that...

  • Has a professional, polished look to it, and the "earth-shaking" effects make the action more exciting and immersive. Thumbs up!

  • I'm also very much interested in this. I'm creating a Construct-based game that leads to a few Babylonjs windows on my website--and integrating the two into a single window would be great! (I'm not sure how the original Construct 2 plugin worked, because I didn't even know it existed till now...)

  • davi9411 You'll find it below as a beta release. I haven't upgraded to it yet myself, but I did find that autoplay sound does work in Chrome if you play your game through an iframe, which is allowed according to Google's new policy.

    Edit: Autoplay sound worked in iframes until about half an hour ago. To get the iframe to automatically play sound, you have to add

    allow="autoplay"[/code:1ltfq9yt] to your iframe script.  Or you can just upgrade to version r257....
    
    [url=https://www.scirra.com/construct2/releases]https://www.scirra.com/construct2/releases[/url]
  • Oops, sorry, I have to check my version of Construct 2; I thought I had the latest....

  • I'm not sure, but I think this might be the problem--a new autoplay sound policy and setup on Chrome. I found one of these links in an html5 game dev site, where people are also complaining about their html5 games having no sound in Chrome:

    https://www.theverge.com/2018/5/3/17251 ... ideos-mute

    https://developers.google.com/web/updat ... cy-changes

  • Just tried the projects in Firefox, Opera and Edge. Audio works fine in all of them.

terransage's avatar

terransage

Member since 12 Nov, 2014

None one is following terransage yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies