WackyToaster's Recent Forum Activity

  • The link to the new version seems to still be the old version. Anyway, a moving camera should not cause issues I think and from a brief test it does work with the new code I posted (I just put a sine on the camera to move it). Maybe you need to adjust the threshhold variable a bit?

  • Oh so you mean a camera/webcam photo? That's gonna be super tricky. Iphone uses depthscanning for that I think. There's maybe some js library out there that can get some ok-ish results.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What is "the background"? You can briefly hide a layer, take the screenshot, then show the layer again. Or you mean transparency?

  • Also another nice trick I just recently learned: Holding Tab and clicking will cycle through overlapping sprites. :)

  • This was actually a bit trickier than I thought at first. The issue with a raycast is that once the raycast hits an object, it stops. So if there's two or more walls, it will only set the opacity of one of those. So I thought instead of raycasting, using a sprite as a raycast could do (as it goes through all objects) and you can simply change the opacity of all walls that overlap. But then you lose the ability to factor in the height of objects/camera. So I had to recursively cast a ray every time it hits a wall.

    wackytoaster.at/parachute/raycast3DwallObscuring.c3p

    This should work.

  • Bummer. I wonder how it runs in webkit though... might try tomorrow.

    EDIT: For anyone curious, no it doesn't help.

  • You are looking for deltatime.

    construct.net/en/tutorials/delta-time-framerate-2

  • Probably you add a layer in 2D mode with parallax 0,0.

  • Did you change anything major? Any added plugins? Did you change the version of Construct you were working with (beta releases)? How are you testing this, just remote preview or apk? If apk, you might have to get android studio up and see if you can find any errors in logcat.

  • I have those too but my sound isn't even looping. Are you using directional audio too by any chance? Because I noticed the issue doesn't appear with normal audio. It seems that specifically if the listener object is moving, the audio cracks like crazy. And I'd assume the player is moving a bunch. I tried different audiofiles too (mono/stereo wav, mp3 at different bitrates)

    I've checked my files btw. and they seem clean at the beginning & end. I even added a fadein+fadeout to make sure but this doesn't fix the issue either.

    Here's a file demonstrating this. Is this happening for other people too? It could also be some kind of driver issue. But if it's happening for a bunch of people, it's one for the issue tracker.

    wackytoaster.at/parachute/cracklingaudio.c3p

  • It's hard to just guess from screenshots of code as to what is happening. I agree that LOS is probably your best bet for this.

    Since there are multiple players, maybe you'll also need a "for each players" there. Also there is no event that sets the walls to full opacity again.

    I'd do something like this, but I haven't fully tested this.

    This works only in a 2D space though. If you also need to check if the object is obscured by the wall depending on height... well you gotta unzip happy triangle math stuff there. Something along those lines off the top of my head.

    If "wall height" < ("distance to player"/"distance to wall")*"camera height" -> player is visible. Else set wall opacity.

  • Try using a hierarchy for the sprite. You can move the sprite seperate from the tile movement object below while keeping it in sync at relative position.

    construct.net/en/make-games/manuals/construct-3/interface/layout-view

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 26 followers

Connect with WackyToaster

Blogs