Brick Breaker Template

themagicboxthemagicbox Member, PRO Posts: 82
So I am looking at the Brick Breaker Template and I can't find the behaviours to have the ball bounce off of other actors. I have looked at every single actor in the template and I cant find anything that explains this. I would like the ball in my game to bounce around like in Brick Breaker

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The behavior is called "Collide."

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • themagicboxthemagicbox Member, PRO Posts: 82
    Thank you for the fast reply!, Yes I understand that but when I tried that it collides with the actors but continues going in the direction it was traveling in...in the brick breaker template it reverses it direction
  • themagicboxthemagicbox Member, PRO Posts: 82
    edited May 2013
    Ok I have honestly been looking at this template for the last hour and I cannot understand why the ball in the brick breaker template it able to bounce around in all the proper ways and directions with just the collide behaviour and in my game it continues to travel in the same direction and bounces against the actor...which is what I thought it would do anyways because I assumed the behaviour of the ball in brick breaker would have a bunch of math to reverse its directions and stuff when it collides...
  • LumpAppsLumpApps Member Posts: 2,881
    What you need to do is reverse the motion.velocity.X
    Make a rule
    When collide overlap "bumper"
    Change motion.velocity.X to motion.velocity.X * -1

    You can use an accelerate on the ball with a max speed but what I found more break out like is change the motion.velocity.X and motion.velocity.Y to a number of your liking. The motion is more at a constant speed that way.
    Change motion.velocity.X to random(-300,300)
    Change motion.velocity.Y to -500 (minus for down)
    For example.
  • themagicboxthemagicbox Member, PRO Posts: 82
    I appreciate your reply but I am even more confused now. I can't find any of those rules in the template I downloaded for the windows creator. I'm guessing this is another way of doing it?
  • themagicboxthemagicbox Member, PRO Posts: 82
    The only rule on the ball that relates to the collisions with the wall and bricks that I can see is the bounce when colliding or overlapping ______
  • BoomshackBarryBoomshackBarry Member Posts: 712
    edited May 2013
    I'm at work right now without access to GS so I can't see the template, but is it perhaps controlled by the actor's attributes? For example take a look at the attributes for the bat and ball, you might find that the ball has a high bounciness level, and that the bouncing is being controlled by the physics engine rather than hard coded. Just a thought...
  • themagicboxthemagicbox Member, PRO Posts: 82
    edited May 2013
    I tried playing with the bounciness and it just bounces more or less in the same direction...I have gravity off and pretty much every single thing the same as the template and its not working, its really frustrating because I did not expect to be dealing with this since it was something I thought I could pick up easily from the template..its funny because there are notes for everything in the template except for how the ball actually is able to move the way it does -_-
  • BoomshackBarryBoomshackBarry Member Posts: 712
    It was just a thought really. If you're sure that you have your collisions set up properly then I probably can't be much more help without seeing the template, but hopefully someone else will be able to assist :)
  • LumpAppsLumpApps Member Posts: 2,881
    I was giving a more generic reply indeed. Sorry to cause more confusion. I don't use windows so can't give you the exact answer.
  • themagicboxthemagicbox Member, PRO Posts: 82
    Thanks for your input guys :), hopefully ill figure it out soon
  • themagicboxthemagicbox Member, PRO Posts: 82
    is anyone able to help me out with this? I still cannot figure this out...
  • BoomshackBarryBoomshackBarry Member Posts: 712
    Hi @themagicbox I've just fired up Gamesalad to take a look, but I was assuming the template you're referring to is one provided by Gamesalad, but I can't find it. Are you talking about the $9.99 brick breaker template from @xforce that's in the marketplace? If so then your best bet would be to get in contact with them. Sorry I can't take a look myself as I haven't bought that template.
Sign In or Register to comment.