How do I make one line that is curved on the sides and flat on the bottom?

0 favourites
  • 11 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I keep coming back to a skateboarding idea that I want to do, and still not figuring out the curves.

    I want something similar in idea to this:

    youtube.com/watch

    Movement with real curve on the sides, and flat line on the bottom.

    I'm using qarp right now, and I can achieve a bowl shape movement (see file), but that doesn't give me the flat part on the bottom.

    drive.google.com/file/d/1lShfUcEsnvND-Acp_wa1SAi7oDKF6pfR/view

    I could connect movement on a flat line on the bottom to two qarp lines on the right and left, but if I switch between lines I don't know how to control the speed being consistent and smooth between different lines.

    Is there a way to do one curved line in the shape that I want? Alternatively, do you have a different suggestion for me on how to achieve this half-pipe thingy?

    EDIT: I tried it before with a polygon shape instead of a real curve but it came out too janky.

    Thanks a bunch.

  • Check this out

    editor.construct.net

  • Timelines, eh? I need to learn it. Those bezier curves do look sexy... :) Thanks

  • Yeah, although in this case it has little to do with a timeline. I'd prefer it if it was not tied to the whole animation editor stuff and would just be an object in the layout instead, but that's a different story.

  • Yeah, I agree, even though I don't know all it can do yet.

    I've made the movement work in the shape that I want, but having it as part of this timeline feature I imagine will make it more complicated to fit into the game. We will see. Like in cases of changing direction, or stopping somewhere on the curve that isn't a keyframe...

  • In this case the timeline editor is only used to set up the curved path, at runtime the path is used by the MoveTo behaviour so you can move an instance along it.

    The keyframe information is not used at all.

  • I see! That's good news, thank you

  • Is there a way for me to hook into the middle of an animation? Or do I always have to go from the start of it?

    For example: player lands somewhere in the middle of the half-pipe and then starts moving left or right.

  • I'm afraid not. I looked at what the API had to offer earlier today, because I thought that was going to be something you were going to want to do, but there is no such thing.

    Snapping to the path would be a neat feature.

    What I thought would be possible with the available functionality is to follow the path when the playable character is in the half pipe, and when you reach the edges, use a different motion to go up and then come back down. Dunno of that made sense.

  • I appreciate you checking what's possible, Diego.

    Yes, I've been thinking to do what you suggested with the different movement outside the half-pipe. That would work. But I'm not sure how I would make movement inside the half-pipe work, like in the beginning, when the player goes from side to side to gain speed.

    Maybe I'll just make them drop-in from the top and use the animation right from the beginning. All of this seems a bit complicated but I'll try and see what I can achieve.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Snapping to the path would be an awesome feature, yes. Or adding the possibility for sprite collision in the shape of a bezier curve. Have no idea how hard these are to implement, but just throwing it out there.

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