99Instances2Go's Recent Forum Activity

  • First things first : Units.

    In c2, speed is usually expressed in pixels/tick or pixels/seconds. Two different units.

    The speed (expression) of bullet behavior (look in expressions panel) is expressed as pixels/second. There is a very important thing that comes with that knowledge. Wherever you see 'pixels/second' it means that this speed is already frame-independent.

    So what ever solution, it must be frame-independent too. Else, you could have it right on your computer, but on another device it will be totally wrong.

    If you gonna rotate it like ...

    Every tick > rotate 1 degree clockwise

    You will have to frame correct it like

    Every tick > rotate 60 * dt degrees clockwise

    Now, if we take a look at the Rotate behavior, its speed (expression) is also expressed as pixels/second. Meaning, the Rotate behavior is also already frame-independent. Well, why make it difficult, lets use it.

    Ok so .. Speed is distance/time.

    The distance a circle makes in 1 rotation = 2*R*pi.

    R in this is the radius. 2*R is the width of the wheel.

    So it is 'width of the wheel' * pi.

    The same speed would be when car.bullet.speed (pixels/second) = Wheel.width * pi (pixels/second)

    But, we need this in degrees/second

    1 degree = a distance = Wheel.width * pi / 360 (pixels)

    so

    1 / (Wheel.width * pi / 360) degrees = 1 pixel

    or

    360 / (Wheel.width * pi) degrees = 1 pixel

    For any pixel

    x * (360 / (Wheel.width * pi)) degrees = x * 1 pixel

    Say x be the car.bullet.speed

    car.bullet.speed * (360 / (Wheel.width * pi)) degrees = car.bullet.speed * 1 pixel

    So .. to have the same speed, you give the rotation behavior this speed :

    (car.bullet.speed * 360) / (Wheel.width * pi)

    I am not that big of a math brain, hope its right, so from the head.

  • Bah, that is only the little first step. I was thinking. Mayby you should lerp to (constrain to) only 8 angles. Else you got the user to able to 'customise' in every angle. Each frame you want parts to be clickable you need sprites (collision polygons) to click on. For each possible angle thats a load collision polygons animating in sync with the main frames. That is some work to do.

  • I would set the animation speed on zero.

    And code the forward/backward changing in frames. In basic it is just setting the frame to a variable.

    A variable that is steered by touch/mouse.

    I think that 36 frames is a little small. It will not be fluid.

    Is this helping ?

    https://drive.google.com/open?id=0B1SSu ... 09IZF91MnM

  • For (1), you should be able to do that now (based on example), for (2), it does that already.

  • Well, when using containers, picking is done for you. No need to keep track in arrays and those things.

    Pick one in the container and the picklist contains all from the container.

    Also, destory/create one, and you create/destroy all.

    https://drive.google.com/open?id=0B1SSu ... EpWdWI5Nlk

    Only 1 little downfall, you have to create them during runtime. But that is pretty easy.

  • In my opinion, it is easyer to use the LiteTween plugin.

    behavior-litetween_t70700

    But, that is not your qeustion. So, let me try to give a good answer.

    First of, i am aware that mostly lerp gets used with a dynamic start point, a static endpoint and a static lerpfactor. A lerpfactor that has to be dt corrected. And that is not really easy.

    This way the next step gets smaller and smaller (but never zero), giving some (in my eyes fake) feeling of smoothing out. But, you will have to when the target is moving. That is (if i understand right) not you case.

    So, under the condition that the target is not moving, lerp can be used in much (again in my eyes) better way.

    Basically using a static start, a static end and a dynamic lerp factor (that is already dt corrected in the right way)

    Besides that. there is not only lerp, but also qarp and (very usefull) there is cubic.

    In this example i use cubic to easy-in and easy-out a movement. I kept it as 'visual' and as 'simple' as possible.

    Look at the imagepoints on the ruler.

    https://drive.google.com/open?id=0B1SSu ... nZReFFzWEU

    Hope this opens your eyes to new ways. Greetings.

  • Using containers. It is designed for those things.

  • It is a bit weird that you obvious think that the layout does not matter.

    Your blocks are 60 pixels square. So allow me to gamble that the row grid is 60 pixels. Just glancing at the field i gamble that there are between 18 and 21 visible rows. Yet, your identifier jumps in a 120 pixels grid that has only 14 rows.

    And if there is some logic in all that, then it is also save to gamble that you made that identifier 120 pixels height.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Guess you can not remove the mirror because of the imagepoints.

    But, check in the debugger. The animation is playing. But since you mirror the GoLeft annimation it looks the same as te GoRight animation.

    Go to the sprite&animation editor. Mirror the complete GoLeft animation.

  • Start with the Graphics and Animations. Bring them in C2.

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies