Benderama's Forum Posts

  • Please report it to our issue tracker - issues only mentioned on the forum are easily lost and forgotten.

    Added here: github.com/Scirra/Construct-bugs/issues/8489

  • It should just work without you needing to do anything else. If it doesn't work, please file an issue following all the guidelines.

    Ok I've come to find out the issue is when trying to open the x64 export with bundled assets and only when you are exporting both 32 and 64 bit versions. This seems to be an error with any project I've tried (including Scirra provided demo projects).

    Reproduction is simple...

    1. Open any demo game provided by Scirra.

    2. Export the project for Windows (WebView2) select select "Bundle Assets", "32-bit (x86)" and "64-bit (x64)". Other options don't matter.

    3. Launch the exported 64 bit version.

    It opens a window with app.localhost/index.html in the title bar but then just says "file not found".

    So unless I'm missing something this clearly seems like a bug.

  • Trying to export my project using Windows (WebView2). If I select bundle assets to put them in a single file, when I try to launch the exported game all I get is a black screen that says "file not found". Nothing else loads.

    However, if I choose not to bundle the assets the exported game works just fine.

    Is there supposed to be some extra step needed when bundling the assets for the game for things to actually work?

    I have a wide range of assets in my game including graphics, sounds and fonts.

    Additionally, nothing in my project is looking for any external files except it's looking for stored data via the LocalStorage system. But the data not being available hasn't stopped the game from running elsewhere.

  • You can use the set CSS style action to modify the css using events. This allows you to use tweens or other Construct features with html. Here's an example:

    I think this may just work thanks!

  • I've just discovered that built-in options for adding strokes to text objects is sub-optimal so I've taken to using HTML elements instead. However, I was a little shocked to discover that things like masks, fade, tween, opacity and such don't actually work with HTML elements?

    You can add things like the fade behavior (or opacity tween) to an HTML element but it doesn't actually seem to work which is a little counter-intuitive. If it's not supposed to work with it, why can I even add it? As far as I can tell the only way for me to get an HTML element to fade in and out was to add a bunch of CSS to the top of each HTML element in a style tag. So the HTML element basically looks like this:

    <style>
    .fade-in {
    	opacity: 1;
    	animation-name: fadeInOpacity;
    	animation-iteration-count: 1;
    	animation-timing-function: ease-in;
    	animation-duration: 0.75s;
    }
    
    @keyframes fadeInOpacity {
    	0% {
    		opacity: 0;
    	}
    	100% {
    		opacity: 1;
    	}
    }
    .fade-out {
    	opacity: 0;
    	animation-name: fadeOutOpacity;
    	animation-iteration-count: 1;
    	animation-timing-function: ease-in;
    	animation-duration: 0.75s;
    }
    @keyframes fadeOutOpacity {
    	0% {
    		opacity: 1;
    	}
    	100% {
    		opacity: 0;
    	}
    }
    </style>
    
    <span style="font-family:'Arial Black';font-size:1.8em;font-weight:black;color: white; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;">My HTML Element</span>

    Then I would call the action Set Attribute for the HTML element and use it to set the attribute "class" to either "fade-in" or fade-out" accordingly. As soon as the class is set the animation would trigger.

    It works but I'm unsure if there is a cleaner way for this to be handed.

    If not, at least this will serve as a means to show someone else how to accomplish this without having to waste as much time as I did trying to find an official means to do this in the engine.

    Thanks!

  • The code you have there should work, but there must be something else that is affecting the camera.

    There's not really enough info here to be able to pin down the problem. It could be some code elsewhere that's interacting with your camera causing an issue such as your movement code. I would get some text elements on there displaying the various values to monitor what's going on as you move though to try to nail down any anomalies for example displaying your FPS would be a good start to at least eliminate lag as being the cause.

  • Well... I'm pretty much convinced at this point it's just a flaw with the default parameters they have coded for the effects.

    Looking into the process of making an effect it looks like there's a parameter that can be defined in the addon file that affects how far outside the view the effect will be rendered. I suspect this parameter is related to the issue described.

    And there doesn't seem to be any way to easily edit them from within Construct or the addon manager. Which is a little disappointing to be honest.

    In any case, I found and loaded up a 3rd party effect called Ripple from the asset store and it doesn't suffer from the same problem at all. So it's clear it has something to do with how the stock effects are configured rather than just an engine flaw.

    So currently, the only solutions I can see from my own research and bountiful replies to this thread are:

    1. Trying to find a means of adjusting the settings in the stock effects if I can find the files on the system.

    2. Making my own effects as addons that work properly.

    3. Using other 3rd party effects from the asset store.

    4. Using other means of mimicking effects via various layering, motion and sprite animations.

    5. Bugging the Construct team to fix the problem

  • Here's an idea I think may work if you're looking for instant real-time feedback you're going the wrong way...

    1. Add a fence on at least one side of your track (or just an invisible sprite)

    2. Add a unique sprite on the left and a unique sprite on the right side of your car.

    3. Assuming the wall you added will always be on the left if you're going straight - Every tick check if the left side sprite on the car is closer to the wall than the right side sprite.

    I would think the left side of your vehicle should always be closer to the left side of the track if you're going the right direction, right?

    Of course you can add extra layers of checks like if the right side is closer for more than X seconds, or elevation checks if your track overlaps...etc. this might prevent some glitches.

  • Looks very cool. Immediately reminds me of Shadowgate on the NES.

  • I'm trying to set up some water in my game. I've created a simple blue sprite which has the "Water" effect applied to it so it ripples a bit.

    I have the layout scroll to my player object position and as I move around the ripples work as you would expect where they are attached to the sprite and the flow is not interrupted or affected by the camera movement.

    That is until the sprite with the effect applied gets close to the edge of the view...

    As the sprite approaches the edge of the view the ripples no longer flow as you would expect, they seem to be affected by the edge of the view port which causes them to squish and distort, almost like it's calculating that the ripple effect has to stop at the edge of the view rather than the edge of the sprite which continues beyond the current view area

    Needless to say this is a very unnatural aesthetic that one wouldn't expect to see as a camera passes over a water background lol. Just wondering if there is some option or setting that I'm missing to correct this issue. It seems to happen with all effects, the crystal ball effect for example. it will distort a sprite on load and when you pan the camera around and it remain unchanged until it reaches the edge of the view where it then dynamically changes based on how much of the sprite is in the view. Hoping there is a way to adjust this...

    Thanks!

    UPDATE: I'm still looking into this and see this issue definitely exists with any effect that's applied to a sprite, even bumpmapping. Any effect that's been applied to something gets all skewed whenever the sprite with the effect applied gets close to the edge of the view. Frankly, I'm very surprised I haven't seen more people bringing up this issue. I've tried applying effects to an entire layer rather than just a sprite and it seems to reduce the issue (at the cost of more granular control over how the effect looks on a specific sprite) but there's definite artifacting that still happens to those sprites at the edge of the view. So not a real solution I guess.

    It's a little disheartening as the more I'm experimenting and researching the more I'm hoping this isn't just "the way it is". I can't be the only person to ever try to have a sprite with an effect leave or get close to the edge of the view and noticed this issue.

    Thanks again to anyone else looking into this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I figured it out...

    More polish required but in essence I did the following and it seems to work as I hoped.

    1. Added an event for W is down with 1 action:

    3DCamera - move-along-camera-axis

    distance:"10"

    axis:"forward"

    which:"both"

    2. Added an event for S is down with 1 action:

    3DCamera - move-along-camera-axis

    distance:"-10"

    axis:"forward"

    which:"both"

    3. Added an event for Mouse on Movement with 2 actions:

    3DCamera - rotate-camera

    rotate-x:"Mouse.MovementX / 10"

    rotate-y:"Mouse.MovementY / 10"

    min-polar-angle:"20"

    max-polar-angle:"160"

    3DCamera - look-at-position

    cam-x:"3DCamera.CameraX"

    cam-y:"3DCamera.CameraY"

    cam-z:"3DCamera.CameraZ"

    look-x:"3DCamera.LookX"

    look-y:"3DCamera.LookY"

    look-z:"3DCamera.LookZ"

    up-x:"0"

    up-y:"0"

    up-z:"1"

  • there are multiple example projects with a camera like this, I recommend checking them out in the example browser

    Can you name a specific one? Cause I didn't see anything specifically.

    First-Person platformer for example can look around and you'll move in the direction you're looking but if I look up at the sky and try to move I don't start going up in the sky - and that's what I'm looking to do - not being tied to a plane.

  • I really hope this is something simple I'm missing here...

    I'm trying to get a first person 3D camera that I can move in the direction I'm looking in 3D space not tied to a single plane of movement.

    Think like Descent... A first-person game where you use the mouse to look around anywhere in 3D space and when you push W you move towards the specific point you are looking at in 3D space.

    I've got the mouse on movement event trigging to rotate the camera with this:

    {"is-c3-clipboard-data":true,"type":"actions","items":[{"id":"rotate-camera","objectClass":"3DCamera","parameters":{"rotate-x":"Mouse.MovementX / 10","rotate-y":"Mouse.MovementY / 10","min-polar-angle":"20","max-polar-angle":"160"}}]}

    And I've got the for when pushing W:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"key-is-down","objectClass":"Keyboard","parameters":{"key":87}}],"actions":[{"id":"move-along-camera-axis","objectClass":"3DCamera","parameters":{"distance":"1","axis":"forward","which":"both"}}]}]}

    Instead of moving in the direction I'm facing though I'm just moving along a single axis regardless of where I'm looking.

    The description for the "Move along camera axis" action specifically says "Move the camera and/or look position along axes relative to the direction he camera is pointing in" but that's not what it seems to be doing.

    Any ideas?

    Thanks

  • Thanks, I probably should have mentioned that I've got different object types.

    I'm trying to create windows/panels which are 9-patches and under those could be sprite objects.

    I think just adding a condition of if Mouse cursor is not over the panel to click events of things will do the trick.

  • Is it possible to only trigger a click event on an object if there isn't another object over top of it?