newt's Forum Posts

  • well, it works a bit strange here, the object speeds up a bit when I release the stick, but I think it's gonna work for now, thanks a bunch!

    Yeah that's the acceleration on the raycasting.

    You can lower the acceleration rate, or the length of the ray.

    You could just set the pad variable to:

    Sprite.X+(Gamepad.Axis(0, 0)*yourspeed)*dt

    Sprite.Y+(Gamepad.Axis(0, 1)*yourspeed)*dt

    Instead of the ray cast as the angle() between the joystick, and the object can get a bit iffy when they are close.

    Or possibly check their distances.

    Edit:

    Its probably a good idea to create a dummy object to act as the proxy for the joystick.

  • That's a little more complicated: dropbox.com/s/aedegy6p8zaxi07/slipperystick.c3p

    Play with the pad variables for the slipping. Same for acceleration.

    Speaking of... I'm a little iffy on using gamepad axis=0 for a Bool. It might be an issue if you have a stick with unwanted drift.

    Ashley any way we could get something added to to account for when the stick is not in use?

  • Lerp is interpolation for two points, qarp is for three, and cubic is four.

    The extra lerp in the qarp is to adjust the easing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The stick already provides acceleration, and deceleration based on input.

    You can simply set position:

    Sprite.X+(Gamepad.Axis(0, 0)*yourspeed)*dt

    Sprite.Y+(Gamepad.Axis(0, 1)*yourspeed)*dt

    You can tweak the speed part if you need to adjust acc/dec. Lerp works nice.

  • I came up with a simple way to make objects snap to other objects as if they were magnetified. I call it qarp snap, for less than obvious reasons.

    dropbox.com/s/1ag6ovf1dkx94rk/qarp%20snap.c3p

  • I think a lot of us will open another tab to do some quick testing. Its one great feature of using the browser, then opening a new project in an existing session is pretty convoluted.

  • Localstorage is asynchronous, you have to wait for the return.

    You can avoid this by putting the dictionary asjson into localstorage.

  • Just export the layers as frames. Trying to rasterize at runtime is not process cost effective, or performant, that's why it doesn't do that. If it was we sure as heck wouldn't be using svg for fame type animation anyway. We would use it to interpolate the splines for real animation.

  • Those events suppose that all mouse clicks should be independent of the situations.

    The mouse clicks should be dependent on the situations.

  • Circle line caps for poly's makes even more sense when you add this: construct3-21h2.ideas.aha.io/ideas/C321H2-I-76

  • If you build something worth putting on a console, you can put it on a console.

    That stuff works itself out. The only real issue is the current cost.

  • If you've made objects along the curve, iterate the instances add up the distances.

    repeat sprite count times distance(sprite(loopindex).x,sprite(loopindex).y,sprite(loopindex+1).x,sprite(loopindex+1).y)

    Divide.

  • Yep its a lerp with dots instead of segments.(note the ease in and out)

    I use distance() as an approximation since drawing pixels for every point along a curve is not performant, and connected segments are.

    Its not great for extreme curves, you could add the distance between the endpoints, and control points, but ehh.

  • You can run a loop and create your lines using tiled bg objects setting their positions, angles, a length using cubic.

    One line/ segment after the other.

    pigmalien.github.io/cubic

  • a simple idea is to first calculate total width of the curve then divide with number of steps or segments whatever we say, this is avg. for all those steps or if i predefined space i.e 20px on each then i have to increase steps as there will be shortage of steps on predefined space.

    You can have infinite points, but a quick way is to get the distance of the line, and divide that by a certain amount that will make up the segments of that curve.

    The divisor is what you would call the resolution. How smooth it is.

    You can use log or ^ if you think you will need to scale a lot.