alargha's Recent Forum Activity

  • Hmm. The for loop serves no purpose, you're just creating 10 objects at a time that are the same. You probably should set the width to the distance from the mouse. Also changing the image x offset could be useful, probably it would relate to the total distance so far.

    Anyways here's a different way to do it. I'm sure there are many other ideas.

    https://www.dropbox.com/s/wh1hf0ji0sueive/draw_dashed.capx?dl=1

    As always, U R the best

    Many thanks

  • R0J0hound

    Hi.

    I am trying to ( Draw a dashed line by touch from A to B where A= At any touch start, and B=At any touch end ) without using the canvas plugin, where each dash is an equal distance and angle from the previous one, aiming to have a beautifully shaped dash line at the end. ( as shown in pic ).

    WHAT SHOULD I Do PLEASE?

    Did I miss something??

    Thanks in advance

    R0J0hound

  • There are always multiple ways to do something. Here's one way in addition to previous examples and such. My examples are meant to be something to fiddle with and maybe get some ideas how something could be done.

    It just converts a qarp curve to a polyline and lets you move some distance up and down the polyline.

    https://www.dropbox.com/s/m0pk8zvqoj08kr7/move_on_dashed_curve.capx?dl=1

    Thank You so much.

  • THANK YOU SO MUCH! I have been stuck trying to figure this out for most of the day! I never knew family's existed! I got this program a couple days ago! Family's seem very useful thanks so much!

    RedRetroMan

    U R Welcome

  • just put "sprite 4" and "sprite 5" in one family, and set the family invisible.

    when the main sprite overlaps the family, set the family visible.

  • There are lots of ways to do curves, but for that particular one you could use a Bézier curve or an arc.

    Generally for most curves you can get a formula to get any position along it by t. But the speed will vary as you move along it, so the solution to that is to convert the curve to a polyline so you can move along it at a constant speed.

    Anyways here’s the simplest formula to move on a curve. A and C are the end points and B is a control point, and t changes from 0 to 1.

    X=qarp(ax,bx,cx,t)

    Y=qarp(ay,by,cy,t)

    Again if you want to move at a constant speed along the curve you’ll need to use the formula above to get a list of points along the curve then move between them in straight lines. Another way is called arc reparameterization which avoids the polyline but requires more math to get an integral we can evaluate numerically.

    A second idea in that specific curve is to just use the arc on a circle. You can derive the center and radius from three points on the circle and using this formula for the tree points. Then solve using algebra.

    (X-centerX)^2+(y-centerY)^2=radius^2

    Then you can get a point on the circle with

    X=radius*cos(a)+centerX

    Y=radius*sin(a)+centerY

    So to move along an arc you lerp between the angles from the center to the endpoints. That will be constant speed.

    I don’t have time to make an example but I’ve done something similar a lot so a forum search of my posts will give a fair amount of results.

    If that plug-in works for you I’d go for it as well. I have not tried it.

    R0J0hound

    thank you for your reply,

    I've tried to implement your beautiful method titled "catmullrom" cause arrow movement is so smooth and flexible, but unfortunately, I couldn't succeed.

    Also, there is an old example made by you a long time ago titled "rocketfollowpath" where you use bullet behavior as a main movement trigger.

    the problem with that is the movement behavior is not smooth compared to "catmullrom" movements, especially between two dashes and when it doing a curve.

    is there any way you can do a C3 example for me where you use your beautiful math skills to give the red ball that smooth movement?

    I am one of your main supporters through ( buy me a coffee ), and I can pay you for this example as well.

    my email is:

    crockware1970lyp@gmail.com

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is :

    Draw a dashed line, and when finished drawing, a red circle is created on the first drawn dash and moves along that dashed line up to the end.

    The problem is to find a way to make the red circle move so SMOOTHLY and look like it's skating or floating.

    if I use the "bullet behavior" or "move to behavior" on the red circle then a micro nudge occurs between two dashes.

    I believe it should be coded using MATH, (which I can't do it )

    I've tried to solve this problem on my own without any success, any help will be highly appreciated.

    IAM looking to see and learn from R0J0hound about this issue cause I believe he has advanced knowledge of game coding math which I highly recommend.

  • The problem is :

    Draw a dashed line, and when finished drawing, a red circle is created on the first drawn dash and moves along that dashed line up to the end.

    The problem is to find a way to make the red circle move so SMOOTHLY and look like it's skating or floating.

    if I use the "bullet behavior" or "move to behavior" on the red circle then a micro nudge occurs between two dashes.

    I believe it should be coded using MATH, (which I can't do it )

    I've tried to solve this problem on my own without any success, any help will be highly appreciated.

    IAM looking to see and learn from R0J0hound about this issue cause I believe he has advanced knowledge of game coding math which I highly recommend.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Hi, Please take a look to this 2 images which represent two different layouts:

    1- Registration layout

    2- Leaderboard layout

    looking to hire expert C3 programmer for building that in in C3, and this method should work in android and IOS platforms after exporting

alargha's avatar

alargha

Member since 14 Sep, 2020

None one is following alargha yet!

Trophy Case

  • 4-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies