How to make ball follow line?

2»

Comments

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @allc1865‌ I figured out that problem bro :) its the other one that's giving me a problem

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad said:
    And RThurman I don't have a working one yet because of the ball. That's why I came on the forum because the ball won't stay in the line. Like when the line curves the ball falls out. So what I want to know is how to make the ball stay with the line drawn and follow the path drawn by the player

    Did you notice in the video that the actor stayed on the path that he drew? There was no problem with it moving off the line. So.... if you want an actor to follow the path without falling off... then the video shows you how you do it!

    Its only an 11 minute project! Make it! When you are finished, you will have a solid base to build the rest of your game on.

    There is no use trying to do a simple thing like raising a ball above the line if you cant do the necessary thing, like making the actor follow the path without falling off. After you make a project where the actor follows a path without falling off, then you can move on to the next phase.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman okay thanks :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    I watched this video and it's exactly what I wanted but I wanted to know if it's possible for the ball to go at a constant speed rather than just kinda speed up then slow down then speed up again. Get me? And also is it possible to constrain a ball on top of the path so it looks like a ball is rolling on top rather than the center?

    Here it is

    Thanks in advance :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Bump

  • ArmellineArmelline Member, PRO Posts: 5,354
    edited August 2014

    The actor will follow the path at the speed the path was drawn. To get it to go at a constant speed is possible, but will require you calculate the distance between each two "nodes" on the path and adjust the speed the ball is moved accordingly. It would be extremely difficult to accomplish.

    Similarly with getting the ball to move across the top of the path. You're looking at some extremely complicated maths.

    Without intending any offence, I think you should give up on this project idea. You're trying to accomplish something that is definitely at the more difficult end of the spectrum, and you seem unwilling to put the time and effort in to learn the basics before tying to do it.

    You seem to essentially be trying to get people to do the hard work for you, and this is stuff that's hard enough that it's very unlikely anyone is going to do that. If I come up with a way to make a ball follow a line while sitting on top of it, at a constant speed, I'd certainly not give that out for free.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited August 2014

    @Armelline Isn't the forums to ask for help when you can't figure stuff out on your own? You make it seem like every single thing I need I come on the forum, while I've made like 90% of my current game without asking for any help at all. I use to be a "noob" because I was super new to Gamesalad so I didn't feel like really putting in effort (and my game turned out pretty crappy so I had to change everything about it). Thanks to other people on this forum I wouldn't say I'm "T-Shirt" yet but I'm getting closer and closer as I work on my game.

    Honestly I don't think you have the right to tell me to 'Drop my game because it seems that you don't want to put in the effort'. Which is a complete lie because you haven't seen my game and that can discourage someone to actually taking that horrible idiotic advice you gave me. Honestly who are you to tell me to 'Drop my game' regardless if I put in effort or not. Isn't the motto of Gamesalad like 'Feed your inner gamer' or something like that? Even if you THINK I'm not putting in effort or not, you still don't have the right under any grounds to tell me this! If you couldn't help with this issue all you could have said is that "sorry bro out of luck" or just ignore this thread completely. To tell me to drop my game because you THINK or you're making a horrible assumption that I'm not putting in enough effort you're basically calling me lazy and that's an opinion not a fact. This has to be violating the rules of this forum some how.

    I could EASILY pay someone on here to make it for me, but again what good will that do? Every time I'll need to make an update or a simple tweek Ill need to pay someone to do it, which is a waste of money. If you have such a problem with me asking for help on this forums like everyone else who is on the forum you personally don't need to answer any of my questions anymore. You don't have any RIGHTS under any GROUNDS to tell ANYONE to quote on quote "give up on this project idea" and the reason is "you seem unwilling to put the time and effort in to learn the basics before tying to do it.".

  • ArmellineArmelline Member, PRO Posts: 5,354
    edited August 2014

    Without intending any offence, I think you should give up on this project idea. You're trying to accomplish something that is definitely at the more difficult end of the spectrum, and you seem unwilling to put the time and effort in to learn the basics before tying to do it.

    I didn't tell you to drop your game. At most I made a suggestion. I suggested you to give up on this idea until you've got more experience and understanding of GameSalad. Even the pros would struggling with what you're asking - it's not a simple matter in GameSalad. Not impossible, but not easy.

    I absolutely don't think you should pay someone to do it for you, but I think trying to tackle a complex problem while still learning the basics of GameSalad logic is a recipe for wasted time. Think up a more easily achievable game idea and work on that first. When you've figured that one out, you'll be better equipped to figure this one out.

    As for calling you lazy, I didn't. But asking someone how to interpolate an attribute - even if only because you forgot you know - is lazy.

  • game ongame on Sun Valley, California Member, PRO Posts: 79
    edited August 2014

    Armelline you're being a little harsh. His question is fair.

  • CaptFinnCaptFinn Member Posts: 1,828

    wow he asks a question that would easily fall under the "Poster Child" of questions that should be asked here. And he gets this?????????????? This is a place to learn, teach, and to offe

  • ArmellineArmelline Member, PRO Posts: 5,354
    edited August 2014

    Okay, I apologise if I was harsh or offensive. But I am unable to help you with your problem as it is a larger amount of work involved in solving it than I am able to provide. (We're talking hours, except perhaps for a maths wizz.)

    I do stand by the whole idea of tackle small problems to learn before tackling very large ones, though.

  • game ongame on Sun Valley, California Member, PRO Posts: 79

    It's all cool. For the record, Armelline has always helped me out in the past. And for that, "I thank you."

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @Armelline I have no harsh feelings against you! I believe you've helped me with some problems I've posted on this forum. I understand how difficult it is because I wasn't really able to do it on my own and I don't really like coming on the forums because so many people have questions that need to be answered (btw I started to answer some questions on the forums to help you guys out! If that's okay by you guys). I only come on here and ask for help for two reasons, Google couldn't help my problems or I've spent countless hours on trying to figure it out by my self and got frustrated. I just don't come on here because I don't "put in effort". And some of the terminology I don't understand as great as you Pro Users because I could still categorize my self as a "Beginner getting ready to become an armature." So maybe when when I ask "how to interpolate an attribute" and some tells me how it's helping my knowledge base and keeping me of the forums so you can get to other peoples problems. I don't hold grudges or anything but I just didn't like how you arranged the words to answer my question and I took it to be extremely offensive I mean wouldn't anyone?

  • pHghostpHghost London, UKMember Posts: 2,342

    OK, time to lighten up this thread a little bit!

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    As far as I can tell, this is the seventh (maybe eighth) duplicate thread you have started on the same topic. This is simply a continuation of:

    http://forums.gamesalad.com/discussion/71521/how-to-make-ball-follow-line/p1

    which consists of the other six or seven threads that were previously merged because they were duplicates.


    To answer your question. Yes, GameSalad can easily handle: 1) making a ball go above the line, and 2) making a ball go at a constant speed.


    Here is what I wrote in the other thread. (And which you 'awesomed'. It still holds:

    Did you notice in the video that the actor stayed on the path that he drew? There was no problem with it moving off the line. So.... if you want an actor to follow the path without falling off... then the video shows you how you do it!

    Its only an 11 minute project! Make it! When you are finished, you will have a solid base to build the rest of your game on.

    There is no use trying to do a simple thing like raising a ball above the line if you cant do the necessary thing, like making the actor follow the path without falling off. After you make a project where the actor follows a path without falling off, then you can move on to the next phase.

  • ArmellineArmelline Member, PRO Posts: 5,354

    Now I feel stupid. The constant speed would be easy enough but I have no idea of the maths required to keep a ball offset from a looping, curving line.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman lol bro ya I already did that and it worked! I gave you an "awesome" I just wanted to know if you could make the ball go at a consistent speed and the ball going on top of line wasn't as important. What I really wanted to know is how the ball can go at a consonant speed

  • RossmanBrothersGamesRossmanBrothersGames Member Posts: 659
    edited August 2014

    @http_gamesalad‌ Just looked at the file, don't have time to do all the work but this is possible but will be a bit tricky as @Armelline‌ pointed out. You are going to need to add some rules to the movement under the when mouse is up. Basically the speed is going to be determined by the duration in the Interpolate behavior.
    During each step you will need to determine the distance between the current location of the actor and the location it is moving to, I believe you use the magnitude function to do this in the expression editor.

    Lets say you want the actor to move at 100 pixels per second,
    in duration for interpolate you would say Distance/100. If the distance is 100, it will take 1 sec, 200 would be 2 sec, essentially it will move at the same speed since the time it takes will be determined by the distance. If you want it to go faster increase the number you divide by.

    Hope that helps!

  • RossmanBrothersGamesRossmanBrothersGames Member Posts: 659

    However there is going to be a little more work since the timer method won't work anymore, right now it has a timer for every .05 sec, which is how long it takes to move the actor. This is what I mean by a lot of work since you will need to change how that all works, but still doable. Rather than a timer you will need a set of rules and booleans, that tell the actor when one step is starting and when to start the next.
    Hopefully I gave you or someone else a starting point though.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited August 2014

    @http_gamesalad said:
    RThurman lol bro ya I already did that and it worked! I gave you an "awesome" I just wanted to know if you could make the ball go at a consistent speed and the ball going on top of line wasn't as important. What I really wanted to know is how the ball can go at a consonant speed

    Wait.... so you are saying that you did recreate TSB's project?!? You really do have a working version that you made? The reason I find this surprising is that you gave no indication that you actually did follow through. Also I find that surprising because there are certain questions that come up when trying to do TSB's project on a PC. If you did it on a PC then someone at your stage of GameSalad expertise should have asked the forums a (quite predictable) question.

    So, I ask again. Do you have a working version that you made? If the answer is yes, then I am more than happy to explain the next step.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RTthurman ya bro ! I already followed it! I can drop a zip file if you want to check it out?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad‌ -- yes! Show a zip file of the work you have done. That will make it much easier tell you the next step(s). (It is easy for GameSalad, but fairly complex for us humans.)

    Also, I am going to merge this this thread with the previous 7 you created on the same topic.

Sign In or Register to comment.