How do I AIM like Angry Birds style?

0 favourites
From the Asset Store
The "Flying bird" game assets. The characters have been created with inspiration from popular mobile games
  • Hello! I'm trying to create an AIM similar to that of Angry Birds!

    My game is a Basketball game and I wanted to be able to implement an Aim similar to the Image that I created.

    Here is the original project

    bit.ly/2lNSFDk

    Here is my attempt to create the aim

    bit.ly/2mTykNR

  • Physics.

    While stretching your rubber band, just do :

    every X seconds | Projectile spawn Balls

    Give the balls a Hang_Time instance variable

    Every tick :

    | Set Balls X to [Equation] x(t) = x0 + v0xt

    | Set Balls Y to [Equation] y(t) = y0 + v0yt – ½gt2 (Btw, You need to modify this to negative since Y axis is reversed in C2 )

    | Balls Hang_Time + dt

    Here's some additional reading:

    http://scipp.ucsc.edu/outreach/04Projec ... Motion.pdf

    https://www.maplesoft.com/content/Engin ... Motion.pdf

  • I'll try, I'll be back soon!

  • Okay, I came back and I did not succeed.

    I looked at the files, tried to adapt, but unfortunately, it's not what I'm looking for, I believe there are simpler ways to do it. I have a simple system to pull and release the ball, I just need a aim that project my ball.

    If any of you can take a look at how I've done, to see what you can do, I'll thank you immensely.

  • Okay, I came back and I did not succeed.

    I looked at the files, tried to adapt, but unfortunately, it's not what I'm looking for, I believe there are simpler ways to do it. I have a simple system to pull and release the ball, I just need a aim that project my ball.

    If any of you can take a look at how I've done, to see what you can do, I'll thank you immensely.

    As far as I can see, the link provided by korbaach has an example .capx that does exactly what you require regarding the aiming line.

  • OK here is the CAPX to download:

    https://www.dropbox.com/s/wwhnaw9v9bl5w7f/Basketball%20Shoot.capx?dl=0

    This uses just 5 events:

    The ball, net, floor and backboard all have physics behaviors. Click on their behaviors and look at the settings. I also created a net guide sprite that is hidden with physics behavior so the ball goes down through the net smoothly.

    The catapult or pivot arm is that green box with the star. I made it invisible but you will see it in the layout.

    The physics settings are just a formula to determine how far you pull back on the ball and that determines how fast and at what angle the ball is released.

    You can increase the IMPULSE if you want the ball to go faster or decrease the ball density in the ball physics settings.

    The game automatically resets after 5 seconds when the ball collides with the ground.

    That should get you started on your game and looks like a lot of fun. I made 3 baskets out of 10 shots!

    NOTE: I did not create this CAPX and it is included with C2 as a catapult example. I just modified it and tweaked the physics to be a basketball shoot game.

  • But I believe there is a simpler way to do it, all these equations are very complex I can not quite understand :/

  • But I believe there is a simpler way to do it, all these equations are very complex I can not quite understand :/

    Physics just looks complex but once you understand the basic physics terms it is actually quite easy and for games like yours that is what you will need if you want realistic gravity and arc on your ball.

    Give me a little while to get woke up and I will make an easy to follow capx example with just a few events.

  • > But I believe there is a simpler way to do it, all these equations are very complex I can not quite understand :/

    >

    Physics just looks complex but once you understand the basic physics terms it is actually quite easy and for games like yours that is what you will need if you want realistic gravity and arc on your ball.

    Give me a little while to get woke up and I will make an easy to follow capx example with just a few events.

    I would greatly appreciate it!

  • OK here is the CAPX to download:

    https://www.dropbox.com/s/wwhnaw9v9bl5w7f/Basketball%20Shoot.capx?dl=0

    This uses just 5 events:

    The ball, net, floor and backboard all have physics behaviors. Click on their behaviors and look at the settings. I also created a net guide sprite that is hidden with physics behavior so the ball goes down through the net smoothly.

    The catapult or pivot arm is that green box with the star. I made it invisible but you will see it in the layout.

    The physics settings are just a formula to determine how far you pull back on the ball and that determines how fast and at what angle the ball is released.

    You can increase the IMPULSE if you want the ball to go faster or decrease the ball density in the ball physics settings.

    The game automatically resets after 5 seconds when the ball collides with the ground.

    That should get you started on your game and looks like a lot of fun. I made 3 baskets out of 10 shots!

    NOTE: I did not create this CAPX and it is included with C2 as a catapult example. I just modified it and tweaked the physics to be a basketball shoot game.

  • OK here is the CAPX to download:

    https://www.dropbox.com/s/wwhnaw9v9bl5w7f/Basketball%20Shoot.capx?dl=0

    This uses just 5 events:

    The ball, net, floor and backboard all have physics behaviors. Click on their behaviors and look at the settings. I also created a net guide sprite that is hidden with physics behavior so the ball goes down through the net smoothly.

    The catapult or pivot arm is that green box with the star. I made it invisible but you will see it in the layout.

    The physics settings are just a formula to determine how far you pull back on the ball and that determines how fast and at what angle the ball is released.

    You can increase the IMPULSE if you want the ball to go faster or decrease the ball density in the ball physics settings.

    The game automatically resets after 5 seconds when the ball collides with the ground.

    That should get you started on your game and looks like a lot of fun. I made 3 baskets out of 10 shots!

    NOTE: I did not create this CAPX and it is included with C2 as a catapult example. I just modified it and tweaked the physics to be a basketball shoot game.

    Oh god... this system I already have and implemented, my problem is to create a aim that works! It's not the game system, it's just the aim! Its only it. I understand a bit of the system, but I can not imagine how to do the aim based on what I already have, do you understand?

  • Oh god... this system I already have and implemented, my problem is to create a aim that works! It's not the game system, it's just the aim! Its only it. I understand a bit of the system, but I can not imagine how to do the aim based on what I already have, do you understand?

    The aim system uses physics to to determine the angle and impulse applied to the ball.

    If you want an angry birds like game that is what they use.

    Download the capx and run it and that is the aim system you described.

    Sorry if that was not what you wanted because it sure is what you asked about!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's because I do not know to say "mira" that is a Portuguese word that represents what I have meant. For me it is aim/sight/crosshair/point that represent the trajectory of the ball. My problem is only with that. I can not implement. It's just that...

  • It's because I do not know to say "mira" that is a Portuguese word that represents what I have meant. For me it is aim/sight/crosshair/point that represent the trajectory of the ball. My problem is only with that. I can not implement. It's just that...

    OK what you are looking for is the ball trajectory.

    Sorry we had some miss-communication.

    I took Korbaach's capx and just adapted it so you can implement that in your game.

    You will need all those global variables and copy the events related to aiming the ball and setting up the trajectory line.

    https://www.dropbox.com/s/08q5wetln1eiorl/Ball%20Trajectory.capx?dl=0

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