lennaert's Recent Forum Activity

  • Your welcome, rovacado. There are many variations of the zordering approach, as in your case, you just need to find one that suits your mechanic and setup well

    the 0.1 seconds interval is a very good one when it comes to performance btw, you can use it in many occasions.

  • Add everything that needs z-ordering to 1 family.

    Every 0.1 second

    Z-order is on screen

    For each z-order order by z-order.Y ascending

    Z-order move to top of layer

  • Actually ... after 30 seconds just making halfway the screen I closed it ....

    I've been a web developer for a long time (ciw master designer), and one of the basics is that when visiting a page, no matter how pretty or stunning it looks, if a visitor does not find what he is looking for within a couple of seconds, or is not entertained/interested within moments of visiting, they will leave quickly. (generally hitting page back)

    Not to mention there was no guidance or intro as to possibilities ..... it took me ten seconds to even see that it was my player that actually moved

    Seeing the player move that slow; quickly made me loose interest, as the prospect of waiting a couple minutes more with slow moving before getting anywhere ... bored the hell out of me. ^_^ Nothing personal, just conveying my experience.

  • I use them quite often really, often for use custom made movements using lerp and anglelerp and sometimes the calculations are a bit off due to input or coordinates, giving negative numbers or suddenly huge numbers .. or for instance with healthbars, and a player picks up something which increases the healthbar, and to prevent a healthbar becoming to wide, I can constrain the size, i.e.

    healthbar.width=clamp(HealthVar*WidthMultiplier, 0, 100)

    Making the formula to determine the width of the healthbar never go into a negative size or over the maximum allowed width. (player gets more damage then has health)

    The "dt" bits can really make a difference across devices with varying performance, so they all look the same and or move the exact same amounts.

    60 * dt = 1 second

  • Example

    A value which is suposed to be between 50 and 100. And occasionally you get a minus value or in the multiple 100s.

    Clamp (value, 50,100)

    So in effect yes, your framing the allowed value between 50 and 100.

    Value = -50 makes it 50

    Value = 1000 makes it 100

    I didn't look at your events but from what I read from 99instances to go there was another issue.

    An application of clamp could have been something along:

    × = clamp( lerp(Self.X,CanvasX,6*dt), 0, CanvasWidth)

    Which would return a value which actually exists within your canvas x coordinates.

    Note I used 6*dt which is the same as your 0.1; but the 6*dt makes the lerping framerate independent.

  • Whenever my lerps causes issues with odd values I use clamp () to prevent excessive values.

    clamp (the_value, min_preset, max_preset)

  • Great concept ... Just runs incredibly slow on mobile.

    Took like 30 seconds to make it half way the screen.

    Perhaps try and apply delta time for movement and such.

  • Ran into this issue earlier too, parralax effect not showing in pasted objects.

    R0J0hound, any ideas ?

  • Did you try it without the extra conditions ?

    Your response appears to be zero, but the second condition requires it to be higher or equal to 3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • click somewhere in the layoutview on a blanc space and in the left window will show an option to increase layout size

  • Rex Pushout solid

    Unziip and place the folder in construct2/exporters/html5/behaviors/

    restart c2 and add the behavior to the zombies.

  • If you have multiple windows open, and you restart preview, it generally should reload all windows, if not, press restart preview again and it should.

    It actually goes pretty quick ....

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies