Trigonometry Cannon

Install Java to view this project right on your browser!

user_icon Paddle2See* shared it 4 years, 4 months ago
2571 views, 7 taggers, 50 people love it, 27 remixes by 23 people, 699 downloads, in 16 galleries
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
Katiepieyum Katiepieyum 1 week ago

Lol i got the cart on fire :))

Gamecenter Gamecenter 1 week, 1 day ago

XD!!

iTweak0r iTweak0r 1 month, 1 week ago

cool i can make an angry birds with this

Paddle2See Paddle2See* 1 month, 1 week ago

Sure, if you want. However, you might find this project even better for your purposes (link to project)

WO997 WO997 1 month, 1 week ago

You use this program ??? {forever turn [sin of direction /20]} I found this program 3 days ago. If you use sin bomb will turn down, if cos will turn to the right.

Paddle2See Paddle2See* 1 month, 1 week ago

There are many ways to make a cannon ball simulation look pretty good...the method I'm using here is actually a pretty accurate method that will show the motion that actually happens in real life...a parabola :)

WO997 WO997 1 month, 1 week ago

You use this program ??? {forever turn [sin of direction /20]} I found this program 3 days ago. If you use sin bomb will turn down, if cos will turn to the right.

jabela jabela 3 months, 1 week ago

Fabulous programming! Great example!

plobnob plobnob 3 months, 2 weeks ago

zomg i set myself on fire! lol

Chrischb Chrischb 4 months, 1 week ago

If you fire, push the up key once, fire, and keep going until you fire backwards, you get a nice looking object :3

Paddle2See Paddle2See* 4 months, 1 week ago

Nice! So what are you doing messing around with this old antique :) ?

(view all replies)
edpanword edpanword 4 months, 2 weeks ago

if you hold x and space at the same time, only one ball is fired.

WARgameinc WARgameinc 4 months, 2 weeks ago

LOL ッ

WARgameinc WARgameinc 4 months, 2 weeks ago

Buttercup123 Buttercup123 4 months, 3 weeks ago

WOW that is EPIC!

mynameisnotbob mynameisnotbob 5 months, 3 weeks ago

have you ever set your self on fire?,its hilarious.

Paddle2See Paddle2See* 5 months, 3 weeks ago

Probably not a good idea...

switenky switenky 5 months, 3 weeks ago

I owned my cannon truck. :3

zxz1661 zxz1661 7 months, 3 weeks ago

paddle2see, im making a cannon game and i was wondering how to make the sprite point in the dirrection its moving? i tried [point in direction(atan of (xvel/yvel))] which works fine...until the direction gets to the negatives. Then it flips out and points all over the place! I asked you because i know your a math wiz Meow!

Paddle2See Paddle2See* 7 months, 3 weeks ago

Be sure to read the project notes though - it talks about how you might use it for velocity :)

(view all replies)
Paddle2See Paddle2See* 7 months, 3 weeks ago

Take a look at this project - I think it does what you want (link to project)

(view all replies)
Paddle2See Paddle2See* 7 months, 3 weeks ago

In most computer languages, there is a nice function that would do that for you, called ATAN2. You give it both the numerator and the denominator as separate arguments and it gives you the correct angle. Scratch doesn't have ATAN2 - but you can write it yourself.

YevgenB YevgenB 8 months, 3 weeks ago

In below cannon shutting game multiple balls can be in the air at a time and they bounce of from a very scary Queen Ant that is trying to sting you... (link to project)

ImagineIt ImagineIt 8 months ago

nvm.

ImagineIt ImagineIt 8 months ago

You shouldn't spam.

ferretuh ferretuh 10 months, 2 weeks ago

I hit myself!YAHOOO!Anyway I found out it always goes east...Or it trys to.

graphicfulsonic graphicfulsonic 11 months, 2 weeks ago

to make a game out of this point the turret upwards shoot and evade try not to let it hit u and set wind to 0

Paddle2See Paddle2See* 11 months, 2 weeks ago

Good idea!

Galacta Galacta 1 year ago

Not bad! Anyhow, can I request you a favor?

Paddle2See Paddle2See* 1 year ago

You can always ask - but I make no promises :)

(view all replies)
c_f c_f 1 year ago

Cool!

amurphy964 amurphy964 1 year ago

This is a great project for teaching my class about simulations. Thanks. :)

Paddle2See Paddle2See* 1 year ago

You are most welcome!

Rexpup Rexpup 1 year, 2 months ago

Can I use this for a game? Of course, I will give you credit.)

Paddle2See Paddle2See* 1 year, 2 months ago

Sure! Have fun with it :)

SuperDuperScratcher SuperDuperScr… 1 year, 2 months ago

in the barrel tip sprite i didn't know how to get the one block that said barrel length of barrel. i dont know how to make new things in that sensing block. could u tell me? nice project:)

SuperDuperScratcher SuperDuperScr… 1 year, 2 months ago

never mind figured it out

(view all replies)
BuzayyBeethanie BuzayyBeethanie 1 year, 3 months ago

watt is the point in this game ?xxxx

Paddle2See Paddle2See* 1 year, 3 months ago

No point. It's just showing one way to make a shooting cannon, if you need one for your project :)

Astrotechnic Astrotechnic 1 year, 4 months ago

Have you made any other trig games like this?

Paddle2See Paddle2See* 1 year, 4 months ago

That use trig? Lots! This one uses trig to position the cannonball and set the initial velocity. There are easier ways to do the positioning but getting the initial velocity components is still a useful thing to know how to do. Let me know what you are looking for and I probably have a demo somewhere.

(view all replies)
7734f 7734f 1 year, 4 months ago

How old are you now in 2011?

Paddle2See Paddle2See* 1 year, 4 months ago

Middle aged :)

(view all replies)
masterpie124 masterpie124 1 year, 4 months ago

paddle i was making a cannon game but i needed a cannon. this project helped me alot.(dont wory ill give you credit for it.

Paddle2See Paddle2See* 1 year, 4 months ago

Glad you found it useful!

Randomstuff Randomstuff 1 year, 4 months ago

may i make a game with this?

Paddle2See Paddle2See* 1 year, 4 months ago

Yes you may...just as you can with any project shared on the Scratch site :)

blaine013 blaine013 1 year, 5 months ago

ya i know about the glitch were it dies if you miss can you fix it for me

blaine013 blaine013 1 year, 5 months ago

check it out now i improved the remix

blaine013 blaine013 1 year, 5 months ago

check out my games iv only got 3 + a remix of this

Grubb-test Grubb-test 1 year, 5 months ago

Hey... I am too working on a similar design with the acclaimed 'official' formulae from Wikipedia (http://upload.wikimedia.org/math/9/3/9/939be4f0fab1698937920cf1208e0044.png)! :p However I am having trouble with this formula which is very hard tot understand... :/ Could you possible take a look and see where you think I've gone wrong? :/ The project's here (link to project) Thanks!

Grubb-test Grubb-test 1 year, 5 months ago

BTW I'm Bulbo... :P I just didn't want to upload this to my official account! ;)(Though I'm sure you had already guessed that! :P)

Xander2000 Xander2000 1 year, 5 months ago

kinda odd but still really well scripted good job!

yoshidude56 yoshidude56 1 year, 7 months ago

heh heh. now you burn up!

acester acester 1 year, 10 months ago

awesome, i caught the cannon on fire :)

MasterofPower MasterofPower 1 year, 8 months ago

me 2

(view all replies)
piisawesome123 piisawesome123 1 year, 11 months ago

check mine out (link to project)

Reamm Reamm 1 year, 11 months ago

Hey paddle2see , i'm making a game with these scripts , can i use the scripts?

mman2112 mman2112 1 year, 7 months ago

i can help you make a cannon with scrolling, in fact i am making a cannon game as i type. the reason its more complicated though, (but not difficult, i am a scratch professional) is because its a birds-eye view cannon

Paddle2See Paddle2See* 1 year, 11 months ago

Scrolling. Hmmm. I'm not really good at scrollers. Is the background scrolling behind a stationary gun...or a stationary cannonball? Or both at different times? It can get kind of complicated...

Paddle2See Paddle2See* 1 year, 11 months ago

Sure! You use anyone's scripts on Scratch :)

(view all replies)
bgtnachoman bgtnachoman 2 years ago

this is great but you should make a game out of this.

Paddle2See Paddle2See* 2 years ago

Maybe...or *you* could :)

Jonathanpb Jonathanpb 2 years ago

This is awesome! :D I like the way that the ball stamps its path - you can compare different paths. Good work! Another thing - I downloaded the project, and saw how people had to deal without the comment block... *laughs*.

Paddle2See Paddle2See* 2 years ago

I should redo this...it really is overly complicated. Oh well - glad you enjoyed it anyway.

Nad11 Nad11 2 years ago

Oops I shot myself...

Paddle2See Paddle2See* 2 years ago

What goes up....must come down :)

(view all replies)
abscratch1 abscratch1 2 years, 1 month ago

Oops I shot myself...

frogger3140 frogger3140 2 years, 1 month ago

Shoot at approx. 45 degrees right at wind -10, KABOOM!

Paddle2See Paddle2See* 2 years, 1 month ago

Ah, the dreaded "boomerang effect" - lol!

ehatch ehatch 2 years, 2 months ago

With a screen shot at the end one could work backwards and figure out what the angle was to begin with and create a quadratic equation.

Paddle2See Paddle2See* 2 years, 2 months ago

Yes, I suppose you could :)

Chrischb Chrischb 2 years, 2 months ago

Wow, and you can destroy yourself! XD

Paddle2See Paddle2See* 2 years, 2 months ago

Always be careful when firing guns :)

(view all replies)
Optimax-DJ Optimax-DJ 2 years, 3 months ago

awesome!

Paddle2See Paddle2See* 2 years, 3 months ago

Thanks...I keep meaning to redo this and make it simpler. But it hasn't happened yet :)

TheExplodingCheez TheExplodingC… 2 years, 3 months ago

i can use this if i give credit, right? thx

Paddle2See Paddle2See* 2 years, 3 months ago

Absolutely. It's a bit overly complex, looking back on it. Archmage did a nice version of this called Trig-less Cannon which you might want to check out :)

(view all replies)
RAckeifi RAckeifi 2 years, 4 months ago

Hello again. I ran into a problem while working on my tanks game. Since you seem to be an expert with scratch+math, I thought you could help. Here's a link to my latest version of the tanks game ((link to project) Read the description on that page also. As you will see, when the missile hits the edge, it stops and then just falls to the ground. I've added scrolling capabilities to the scenery, but I'm really not sure how to make the sceneryscrollasthemissilemoves.

RAckeifi RAckeifi 2 years, 4 months ago

Hello again. I ran into a problem while working on my tanks game. Since you seem to be an expert with scratch+math, I thought you could help. Here's a link to my latest version of the tanks game ((link to project) Read the description on that page also. As you will see, when the missile hits the edge, it stops and then just falls to the ground. I've added scrolling capabilities to the scenery, but I'm really not sure how to make the sceneryscrollasthemissilemoves.

Paddle2See Paddle2See* 2 years, 4 months ago

I made a scroller with projectiles that move with respect to the background that you might want to download (link to project)

(view all replies)
RAckeifi RAckeifi 2 years, 4 months ago

Hey, I recently uploaded my scratch project and I used some of your trigonometry scripts because I would have never been able to figure it out. I'm making this scratch project for my computer class, and I need your permission to use your scripts. Please reply soon, and nice trigonometry skills!

Paddle2See Paddle2See* 2 years, 4 months ago

You can use any of my projects for anything you like, as long as you give credit. Actually, that's true of all the projects on Scratch - it's in the Terms of Use :)

(view all replies)
RAckeifi RAckeifi 2 years, 4 months ago

Also, here's the link to the game I made (link to project)

aitan aitan 2 years, 5 months ago

Hi. I like the idea of this game. How do I make the angle smaller and how do I control the trajectory if I want to draw some holes in the ground for the player to drop the ball into a specific hole. What I really mean is for a person who is not so adept can I give them a choice of three trajectories as each hole appears for them to shoot. Not sure if I am asking right. Thanks.

Paddle2See Paddle2See* 2 years, 5 months ago

Make a target sprite and set up a loop that moves it to one of the three spots. You have to decide if it should just wait a certain amount of time before switching or if it should switch after every shot fired. Finally, set up scoring on the target to keep track of whether it was hit by the ball.

Paddle2See Paddle2See* 2 years, 5 months ago

Once you have the barrel angle being set properly, it's time to think about setting up a target that appears at one of three spots randomly. The spots need to be where the ball hits the ground when set to the angles...I would shoot the ball to find those spots.

Paddle2See Paddle2See* 2 years, 5 months ago

Start by taking out the pieces that you don't need...find where the arrow keys control the cannon and break those scripts. Then, pick the three angles you want to use and set up keys or buttons to allow the user to select them. The value you want to set is the Barrel direction...so set up your controls to set the barrel angle to the desired values.

(view all replies)
ahaanomegas ahaanomegas 2 years, 5 months ago

Sir, do you know any projects which contain more than one language? I am looking for projects for my new gallery: Multiple-Language Projects.

Paddle2See Paddle2See* 2 years, 5 months ago

There should be one on the front page by Klasbrick which is dual language. And, of course, many of ffred's projects are dual language. Great idea for a gallery, by the way!

(view all replies)
ahaanomegas ahaanomegas 2 years, 5 months ago

Sir, have you made any calculus projects? I am looking for projects for my gallery "Museum of Calculus"

Paddle2See Paddle2See* 2 years, 5 months ago

Sorry, I have not made any calculus projects as such...there are a number of projects I have made that use integration to calculate some variables though...such as Good Vibrations.

(view all replies)
BWOG BWOG 2 years, 7 months ago

I made a remix of this: (link to project)

shaker1 shaker1 2 years, 7 months ago

i'm looking for pinball ,can you help me

Paddle2See Paddle2See* 2 years, 7 months ago

Sure...try this (link to project)

shaker1 shaker1 2 years, 7 months ago

thanks alot

shadowlord757 shadowlord757 2 years, 8 months ago

cool

Leylosh Leylosh 2 years, 8 months ago

I love so much this game.

Lukecherry01829 Lukecherry01829 2 years, 8 months ago

lol blow up the truck

trekkie2000 trekkie2000 2 years, 9 months ago

You can make some really cool designs with this.

bob84 bob84 2 years, 10 months ago

good ! if you plan anything else in geometry and physics area, just tell us

Please Wait...