CF78's Recent Forum Activity

  • Refeuh

    If setting an object like a weapon to an image point of another sprite, why lerp-ing at all ?

    And unless I'm missing something, lerp(x1, x2, s) with s = 26*dt doesn't make any sense ? "s" being the interpolation value, at s=0 we are at x1, at s=1 we are at x2. At a framerate of 30fps, 26*dt = ~0.87. That's a fixed position, fluctuating a bit back and forth around that position due to dt varying between frames

    With this :

    Set Positions to X | lerp(self.X,player.ImagePointX(1),1-0.00000000026^dt)

    you end with (very small magical number)^(1/fps) ; at 30fps, that's the 30th square root of a magical number, which is another magical number

    I haven't followed the full example, so I might be getting this wrong, but I fail to see the math logic between these formulas

    [attachment=0:uz2wapky][/attachment:uz2wapky]

    I'm sorry I should have explained for what I am using it for... I'm not using it for absolute fixed positioning, rather it's to create a bit of (smooth) fast delayed movement. Essentially creating a catch up effect. When the player moves the gun positioning is delayed and then catches up.

    I guess I'm asking if using lerp & *dt in the manor of the screen shot I posted, is correct?

    It's been brought up before (I'm an art guy) that us simple minds see forum posts for using lerp & *dt and then use it, get good results, and don't understand why. I have been following this thread closely and it has me questioning my usage of lerp altogether because, I don't fully understand it. It just seems to work. I'm sure this pisses off you math guys. :/ I'm just trying to understand better, so that I am not doing things incorrectly even if they visually appear okay..

  • I'm less confused, and curious...

    If using lerp like this is a no no. (in most cases) lerp(a, b, x*dt)

    I'm currently using lerp to set position of the gun to my character in this form :

    Set Positions to X | lerp(self.X,player.ImagePointX(1),26*dt)

    Set Positions to Y | lerp(self.Y,player.ImagePointY(1),28*dt)

    If I try the correct route a = lerp(a, b, 1 - f ^ dt)

    It seems I'm having to add a bunch of zeros to my number to replicate similar behaviors

    Set Positions to X | lerp(self.X,player.ImagePointX(1),1-0.00000000026^dt)

    Set Positions to Y | lerp(self.Y,player.ImagePointY(1),1-0.000000000028^dt)

    Is this correct?

  • You just responded to a post I made 6 years ago with Construct Classic. Really digging your pixel art though!

    Really!? Seems I was viewing the first page of this thread.. lol. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yup, its a 3d model.

    This is the same model, just rendered out more like pixel art.

    I'm still a huge fan of pixel art, I just wanted to test out the HD version. Maybe a hybrid of the two?

    I prefer the pixel version more Though I have a soft spot for pixel art.

    Working on a playable level for some feedback. Hoping to be done by the end of the week end.

    [attachment=0:3isailk7][/attachment:3isailk7]

  • MultipleChoice

    For your first capx file : [attachment=0:2f9g3fg4][/attachment:2f9g3fg4]

    If you disable or remove the action Platform | Set position to (round(self.x), round(self.y)) It works fine. No shaking no 1 pixel jog.

    For the second capx file : [attachment=1:2f9g3fg4][/attachment:2f9g3fg4]

    Change scroll to action to System| Set position to (round(Sprite.x), round(Srpite.y)) Works fine. No shaking no 1 pixel jog.

  • A little something I'm working on right now, a cinematic platformer in the style of Flashback and Abe's Oddysee.

    Really nice pixel art style! Awesome work! Looking forward to more

  • +1

  • Rad! Brought me back to my days as a child

  • codah

    Thank you for your help!

    https://vine.co/v/OjiLqtmuOea

  • codah

    It's not a direct answer, but rather informative, which really helps me understand. This seems like a far more elegant approach. I didn't even think to pass a variable as the value in the array due to my unconventional ordering Thank you!

    If i start my 'selected weapon' values from 0 instead of 1 to match the way arrays work, than I assume an event mechanism like this :

    [quote:1mqtm9c9]weapons: Value at(selectedWeapon - 1, 2) = 1

    would become this: ?

    [quote:1mqtm9c9]weapons: Value at(selectedWeapon, 2) = 1

    Thanks again

  • I am planning on using an array to handle my weapon inventory, selection, and ammo for my game. I have it set up to be 6 x 3 x 1

    I am new to arrays so bare with me. As I have it set up now, I have a row setup for checking if the weapon is collected. 1 being yes and 0 being no. I was planning on using this method to make it easy to cycle through weapons.

    [attachment=1:2908ih39][/attachment:2908ih39]

    Basically I was planning this:

    Global Variable :

    selectedWeapon = ""

    OnStart:

    Set up array

    On collection of weapon add to the array & update ammo on weapon selection

    [attachment=0:2908ih39][/attachment:2908ih39]

    Weapon selection (basic)

    Cycle down

    on 1 pressed | subtract 1 from selectedWeapon

    • selectedWeapon = 1 | set selectedWeapon to 6

    Cycle Up

    on 2 pressed | add 1 to selectedWeapon

    • selectedWeapon = 6 | set selectedWeapon to 1

    On cycle check for available weapons

    Array Check for value at (0,2) = 0 | got to next weapon

    Array Check for value at (0,2) = 1 | select weapon

    Which is rather redundant to create a bunch of event to check for a value.

    My question is how do I check all of the values in the row I have designated for setting if weapon is collected?

    Thanks

  • This just looks plain f***ing awesome!

CF78's avatar

CF78

Member since 21 Dec, 2012

Twitter
CF78 has 26 followers

Trophy Case

  • 12-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

17/44
How to earn trophies