I was wondering if you would like to enter this in the Scratch Awards for Best Tool. reply here: (link to gallery) and enter it here: (link to gallery)
Good idea, EdnaC. I hadn't thought about making it into a 2-person game. I think the real challenge would be making a 3D tank game where you could rotate your field of view, etc.
Another Challenge Idea: A turn-based two player game. Add shifting wind, put an opponent on the other end of the "field", shoot at him, then switch perspective when it's his turn to shoot back.
Challenge #1: Make a golf "closest-to-the-pin" project. Just make the projectile into a golf ball, move its initial position to (0, -170, -180) or so, and make the variable "angle" equal to the loft of the club (look on wikipedia for the angle of woods and irons). For the background, you could find a picture of a good golf hole (if you're in the UK, you're lucky), then line it up so the flag is about in the middle of the screen. Bonus: Account for hitting trees...
Paddle2See: I know what you mean. I think that the scale into the screen in the z direction is a bit off (the c1 and c2 constants). The viewpoint and projectile should both be (0,0,-180). If you set the lateral angle to about 90, and fire sideways, then it definitely looks like 45 degrees. I'll play with it a bit.
Well, this is fun! Real 3D comes to Scratch! I'm confused though, when I swing the lateral angle to 45 degrees and fire, the path does not look like 45 degrees, it looks like something much less, 5 or 10 degrees. The projectile coordinates look right (equal x and z distances, after accounting for the -180 z start position) but the angle of the projectile path looks wrong. Is the viewport at the same z coordinate as the projectile initial position? It seems to be but I'm not positive.
This is a basic 3D projectile project that might be useful for those who want to make a 3D cannon game. Change "v0" to control initial speed, change angle to change how high the projectile fires (0-90 degrees), and change angle_lateral to change how far right or left it fires. I've put two simple targets to shoot at. Place your mouse over the target to see how far it is away (in the z direction, into the screen). Note that if you want to make your own targets, just change the x3d, y3d, and z3d variables: the sprite itself constantly maps itself to the correct 2d coordinates using one-point perspective equations. That is, each sprite believes it is in real 3d space.
Comments
You need to be logged in to post comments
Add a Comment
i got it to go 6859.
(view all replies)Comment Reply
do u know how cos works?
(view all replies)Comment Reply
o lol i just changed angle by 1 nd got 6906 lyk evry1 else
(view all replies)Comment Reply
6859!
(view all replies)Comment Reply
Hope you dn't mind if I add it to some gallerys
(view all replies)Comment Reply
like this for example this is just plain cool!
(view all replies)Comment Reply
6906
(view all replies)Comment Reply
To get a distance of 6906 use these settings: v0: 200, angle: 44, angle_lateral: 0.
(view all replies)Comment Reply
6906
(view all replies)Comment Reply
6906
(view all replies)Comment Reply
6878 is my new record
(view all replies)Comment Reply
6479 is my farthest
(view all replies)Comment Reply
the best so far !!!!!
(view all replies)Comment Reply
very neat
(view all replies)Comment Reply
phun!
(view all replies)Comment Reply
Interesting
(view all replies)Comment Reply
Awesome!
(view all replies)Comment Reply
Whoa, awesome idea. Well done!
(view all replies)Comment Reply
0.0 I havent seen something this cool in a while!
(view all replies)Comment Reply
I was wondering if you would like to enter this in the Scratch Awards for Best Tool. reply here: (link to gallery) and enter it here: (link to gallery)
(view all replies)Comment Reply
Awesome! I'll definitly use it.
(view all replies)Comment Reply
rofl!! distance: 0
(view all replies)Comment Reply
Wow, very impressive.
(view all replies)Comment Reply
i made a more realistic version... chec it out! (link to project)
(view all replies)Comment Reply
5116
(view all replies)Comment Reply
Just a little push and we'll crack read 3d in Scratch!
(view all replies)Comment Reply
Also check (link to project) I like the interactivity of yours though.
(view all replies)Comment Reply
There's a "3D magic" gallery - ask donscratchio to add it there...
(view all replies)Comment Reply
amazing finally something resembling a good 1st person! very good!
(view all replies)Comment Reply
virtually impossible! To right Shockwave. It's impossible but clever! www.EGEmedia.co.uk
(view all replies)Comment Reply
virtually impossible!
(view all replies)Comment Reply
awesome!!
(view all replies)Comment Reply
I so very much agree with My Red Neptune!! Breathtaking!
(view all replies)Comment Reply
Breathtaking!
(view all replies)Comment Reply
Good idea, EdnaC. I hadn't thought about making it into a 2-person game. I think the real challenge would be making a 3D tank game where you could rotate your field of view, etc.
(view all replies)Comment Reply
Another Challenge Idea: A turn-based two player game. Add shifting wind, put an opponent on the other end of the "field", shoot at him, then switch perspective when it's his turn to shoot back.
(view all replies)Comment Reply
Sweet! And just a few scripts, very very clever. Another favorite for me to go have a closer look at when time allows...
(view all replies)Comment Reply
Challenge #1: Make a golf "closest-to-the-pin" project. Just make the projectile into a golf ball, move its initial position to (0, -170, -180) or so, and make the variable "angle" equal to the loft of the club (look on wikipedia for the angle of woods and irons). For the background, you could find a picture of a good golf hole (if you're in the UK, you're lucky), then line it up so the flag is about in the middle of the screen. Bonus: Account for hitting trees...
(view all replies)Comment Reply
This is beautiful!
(view all replies)Comment Reply
Paddle2See: Thanks. Now I can rest easily...
(view all replies)Comment Reply
sorry, paddle2see I accidentally pressed flag as inappropriate on your comment-please forgive!
(view all replies)Comment Reply
Much better! Now you get the coveted "love it" from me. Ya gotta earn those things, ya know!
(view all replies)Comment Reply
awesome. I'm speechless. this. is. brilliant.
(view all replies)Comment Reply
I modified the scaling factors that control how the 3d coordinates are mapped to 2d, so the path looks more realistic, depth-wise.
(view all replies)Comment Reply
Paddle2See: I know what you mean. I think that the scale into the screen in the z direction is a bit off (the c1 and c2 constants). The viewpoint and projectile should both be (0,0,-180). If you set the lateral angle to about 90, and fire sideways, then it definitely looks like 45 degrees. I'll play with it a bit.
(view all replies)Comment Reply
Look, you've already got a remix!
(view all replies)Comment Reply
Well, this is fun! Real 3D comes to Scratch! I'm confused though, when I swing the lateral angle to 45 degrees and fire, the path does not look like 45 degrees, it looks like something much less, 5 or 10 degrees. The projectile coordinates look right (equal x and z distances, after accounting for the -180 z start position) but the angle of the projectile path looks wrong. Is the viewport at the same z coordinate as the projectile initial position? It seems to be but I'm not positive.
(view all replies)Comment Reply
OK. Fixed the error in how the path is computed using the trig functions.
(view all replies)Comment Reply
awesome i hit the target three times
(view all replies)Comment Reply
There's a trig error in one of the formulas that I will fix shortly.
(view all replies)Comment Reply
Cool program !
(view all replies)Comment Reply