Elliott's Forum Posts

  • If we had to choose a CSS analogue, Grid would be far more preferable than Flexbox

  • > Couldn't you do this mapping in events? Kinda of how you map strings to function you can map dom element events to c3 functions. You would just need a bit more information such as the element ID and the event you want to map?

    How would you access event parameters like the button or key that was clicked/pressed? I wouldn't want to have to try to cover every kind of possible event and event parameter that exists in JS, that's a lot of work just reimplementing what JavaScript already does.

    Isn't that the whole point of the event system though? To reimplement what you can do in conventional coding?

  • If we were to move away from direct integration the DOM, Construct has some pretty powerful layout tools.

    You can use the anchor and pin behaviours to simulate percentage based layouts; hell you can even recreate media queries with layout expressions.

    Thinking about it from a building block perspective, I guess some kind of grid object so you can assign objects/data to cells? It's hard for me to scope it without simply reciting the CSS grid spec - named areas, flow direction, gutter and track control.

  • It comes down to what you believe Construct to be. It's marketed as a game engine, but I wholeheartedly believe that it's a web engine that's been focused on games.

    By no means should Construct become a "website builder", a handful of users often try and make websites and that is a fundamentally bad idea (however please show your support for better customisation of export HTML if this interests you).

    Interactive web experiences are the future, and with the entry point to standard web development getting lower every year, being able to make advanced experiences that go beyond the norm will be the must have thing for businesses to stand out.

    This website (http://www.rleonardi.com/interactive-resume/) must be 10 years old at this point, and it is repeatedly referenced as a highly creative web page. To recreate this in Construct would be laughably trivial.

    ...Wow, this went off on a wild tangent...

    To bring it back to reality, please let us have good support for making something as simple as a sta table or leaderboard in our games.

  • For years a small core of users have been pushing for greater DOM control via Construct - the web alredy has data presentation languages, they're called HTML and CSS. Where Construct embraces the web in every aspect (from the hosting of the IDE to the literal backbone of the engine) these two aspects remain locked off.

    Deeper integration with this fundamental web technology is my literal dream for Construct. We've got Scripting, last beta we got better support for CSS - I would love for Construct to break free of the canvas and iframe approach and embrace real DOM manipulation.

  • Browser.QueryParam("location") won't get you anything if the URL doesn't have a location query - for example

    example.com?location=this

    Browser.QueryParam("location") would return "this"

    For

    example.com?anythingelse=this

    Browser.QueryParam("location") would return nothing

    What you want is the URL of the page you're on, which as detailed in previous messages, isn't actually returned by the browser.url expression

  • Why would you want to do that? The frame control options are better for that and more secure.

    Mainly sniffing out UTM variables - and what I'd argue is a point of confusion in that Browser.URL is described as returning the URL of the window:

    Get the complete current URL in the browser address bar, including the protocol.

    Which it doesn't do?

    EDIT//

    Just realised queryParam would work much better for UTM, however I think the description of Browser.URL could be clearer

  • I think you might want to take a look at the section "controlling framing" in the tutorial Publishing to the web.

    Ashley Is there any way of using the browser object to return the current page URL? I swear this used to be possible, however an iframed game will now return the frame source URL when you use Browser.URL

    With scripting, admittedly this is now much easier to get the top/parent URL, I was just wondering if I've misremembered how Browser.URL works

  • You won't be able to hide the URL path from an iframe/inspect element - that's simply not how the internet works.

    What you might (and definitely used to be able to) do is use the browser object (it's a a default object in Construct) to look at the current page URL, and based on this, you can execute events. For example you could have it so that if a user was to extract the path from the iframe, if they visited it directly, the game would load a blank screen instead.

    This is how you typically protect your game from being show on different websites.

  • No, but you can use the Browser plug to check a variable in the url:

    QueryParam

    Return a query string parameter by name. For example, if the URL ends with index.html?foo=bar&baz=ban, QueryParam("foo") returns bar and QueryParam("baz") returns ban.

    I tried this recently, and I think something's changed with the browser object; originally it would would return the address show in the browser (or the top page), so if your game was in a iframe on a homepage it would return "example.com" when you queried the URL, however now it will return "example.com/c3directory/index.html" - the actual path of the file, regardless of the browsers current location.

    Other than that, what Newt said is correct; you (at least used to be able to) query the page URL and act based on this, so if the current page the user is on is the one you want, play the game, if not, go to a blank layout or something.

  • For the record, SSL is easy to get on websites nowadays via LetsEncrypt - there's no real excuse for HTTP in 2019

  • In C3 you would simply use the tween behaviour with a linear ease:

    construct.net/en/make-games/manuals/construct-3/behavior-reference/tween

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The forums seem to be under some overly friendly caching, notifications and posts seem to stay/disappear depending on the page; repeated refreshing fixes it

  • You wouldn't be able to - the engine is integral to how the game works; even one entirely powered by JS would refer to elements populated by the IDE

  • How are they implementing your game into their site? This is really something that should be done on their page... What are the name of their events? Are they using analytics.js, GTM or UA? Do they have a preferred schema for the event? (i.e are they using timing, app/screen or just some weird version of send?)

    At a guess, something like this?

    ga('send', 'event', 'levelStart', 'Level1' { 'nonInteraction': 1 })
    

    It depends how strict they want to be with their reporting.. personally I'd use nonInteraction... They must have a preferred snippet for this otherwise their anayltics would be a mess

    This feels like a really weird work around to get rid of page bounces, but surely they know that any custom event will negate a bounce? They could have a universal time based event that negated all of this...

    <script type="text/javascript">
    function timer10(){ga('send', 'event', 'TimeOnPage', '1', '10+ seconds', { 'nonInteraction': 1 });}
    setTimeout(timer10,10000);
    </script>
    

    Every session over 10 seconds would then be a tracked session