what is lerp? (2 minute tutorial for the non-math

This forum is currently in read-only mode.
1 favourites
From the Asset Store
12 looping retro style music tracks for your indie games and projects
  • Oh, that's cool. I missed that one, indeed.

  • It's nice plugin, but I prefer to don't use plugins if goal can be reached with events. I think there must be way to do it with pure Construct

  • If you can't see lerp being useful for anything, then you did not understand it.

    Agreed, lerp is probably the number one most useful math function I've ever come across in game programming, with clamp as a close second. I use them both constantly, they're really indispensable. When I learned to use them properly it was like a whole new world opened up in my brains.

  • Let's not forget the wonder that is qerp

    Did someone say SCORCHED EARTH?!?!

  • Thanks Lucid, I understand it, just don't think it will be useful for anything. Things like health bars are already easy to do with variables, just subtract/add.

    this is what I meant by health bar:

    http://dl.dropbox.com/u/1013446/lerpbar.cap

    you could make a much cooler more complex one, but I wanted to keep it simple. your health goes up the higher your mouse is on the screen. Also, you can resize the health bar, change the screensize, etc, and this same code will still work, with no changes whatsoever

    here's tulamide's example again, but using a few extra lerps in some other ways. You can change the global variable 'numberofballs' in start of layout, and you'll notice they always perfectly space apart and behave correctly, and the color blend works perfectly regardless of position. Something like this would be impossible without lerp, or some mathematical equivalent:

    http://dl.dropbox.com/u/1013446/tulerpmide.cap

    It's nice plugin, but I prefer to don't use plugins if goal can be reached with events. I think there must be way to do it with pure Construct

    everything in construct is a plugin. every object and behavior is created with the same sdk. the only difference is some are official plugins made by ash, davo, and rich, and some aren't. I can definitely respect wanting to understand the math well enough to do it without the new plug, and tulamide already showed how, but avoiding using the faster way once you do understand it is kinda pointless, imho. Especially since in circumstances where it takes more than one construct expression to achieve it, the plugin will always be faster, both in the time you take to write and read your own code, but also in the execution speed, as the c++ within a plugin runs faster than construct's interpreted expressions. that speed difference won't matter in most caps, but good to know anyway

  • everything in construct is a plugin. every object and behavior is created with the same sdk. the only difference is some are official plugins made by ash, davo, and rich, and some aren't. I can definitely respect wanting to understand the math well enough to do it without the new plug, and tulamide already showed how, but avoiding using the faster way once you do understand it is kinda pointless, imho. Especially since in circumstances where it takes more than one construct expression to achieve it, the plugin will always be faster, both in the time you take to write and read your own code, but also in the execution speed, as the c++ within a plugin runs faster than construct's interpreted expressions. that speed difference won't matter in most caps, but good to know anyway

    I know it all, main reason why I don't want to use 3rd party plugins without extreme need is most of them are unstable and buggy. And even if this one is pretty stable I still want to know how to do things without plugs.

    Bad news for me is that I'm not very good at math

  • [quote:2m0f0d3x]I know it all, main reason why I don't want to use 3rd party plugins without extreme need is most of them are unstable and buggy. And even if this one is pretty stable I still want to know how to do things without plugs.

    Bad news for me is that I'm not very good at math

    Yeah, but the event solution is not exactly practical... math wise, as it's a workaround for a.... ehh, lets call it a feature rather than a bug.

  • the first link is broken =(

  • TELLES0808

    The original thread is HERE with working download.

  • Thanks xD

  • Um... no idea if anyone asked for this before I did, but can you put up a qarp tutorial for us math newbies as well? I never really understood what that was all about, myself.

    Other good tutorials for game math would be modulus and... lessee... well, I dunno. The Sine behavior would be great, I think.

  • here ya go:

    lerp/qarp/cubic tutorial

  • Is there any change that you would share a simple capx where you apply a simple LERP?

    Where you would say A is bla bla bla, B bla bla bla, in other words, where you explain in ?noob language?.

    Thanks =)

  • I was reading this thread and I noticed that the sample files were pre C2. This is possibly the solution I'm looking for and would like to get a more understanding of this plugin.

    Is it possible to have updated sample files so we can see this in C2?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • can you upload a CAPX version?

    i'm using r170

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)