Ok, so I am making a scratch game based on a cartoon network game I used to play a llllloooooooooonnnnnnnngggggg time ago. (link to game)
Well, I have all of the sprites and such done, I just need help on what script to use,
When the laser hit's the mirror, how would I make it reflect in the direction shown.
Be precise, unlike Laser Lab, I am considering lots more things, like where on the mirror I hit, and precise angles (e.g. -39, 44, 180, litterally anything... between the range of 0 - 360).
Regards,
Ralphjos
Last edited by Ralphjos (2009-11-04 02:42:06)
Offline
Here is a link to my pong game.
http://scratch.mit.edu/projects/Locomule/737050
It uses true reflections as well as influenced reflections. By that I mean the paddles figure true reflections and then adjust them according to how far the ball bounces from the center of the paddle (which coincidentally could be used to figure bounce reflections off of a round mirror/object.) Of course, you would have to adapt it but if you need any help, just let me know and I'll be glad to help with suggestions, scripting, or whatever.
Last edited by Locomule (2009-11-04 21:35:39)
Offline
Dannnngggg That's confusing!!
Sorry if it's a pain Loco, but can you explain it to me? And lets say the paddle is at 45 degrees (also including -135), can you give me an example using that?
Regards,
Ralphjos
Last edited by Ralphjos (2009-11-04 23:24:07)
Offline
Well, technically the running script has no idea what angle the paddle is at visually. So lets say you used a 0 degree (or straight up and down) paddle as a 'normal' bounce. As the paddle rotates, in this case to 45 degrees, you just adjust the figured 'normal' angle by the additional 45 degrees. Same effect as my Pong paddle bounce only it adjusts the 'normal' angle by how far up or down the ball is from the center of the paddle. Now you will adjust the 'normal' bounce angle by how far the paddle itself is rotated. I will make a script for this. I agree, it is confusing enough to script and talking about it can be even worse, lol. Will post back here when it is finished and uploaded. I have to work all day tomorrow so it might take me a bit but I will shoot for tomorrow night if I can. I'd go for tonight but I was up at 4:30AM this morning and worked till 5:00 pm... SO TIRED!!! Peace.
Offline
Locomule wrote:
Well, technically the running script has no idea what angle the paddle is at visually. So lets say you used a 0 degree (or straight up and down) paddle as a 'normal' bounce. As the paddle rotates, in this case to 45 degrees, you just adjust the figured 'normal' angle by the additional 45 degrees. Same effect as my Pong paddle bounce only it adjusts the 'normal' angle by how far up or down the ball is from the center of the paddle. Now you will adjust the 'normal' bounce angle by how far the paddle itself is rotated. I will make a script for this. I agree, it is confusing enough to script and talking about it can be even worse, lol. Will post back here when it is finished and uploaded. I have to work all day tomorrow so it might take me a bit but I will shoot for tomorrow night if I can. I'd go for tonight but I was up at 4:30AM this morning and worked till 5:00 pm... SO TIRED!!! Peace.
Thanks so much for helpin me Loco~!
Regards,
Ralphjos
Offline
Don't thank me yet! I just stayed up all night typing possibly the longest single forum reply in the history of Forums and so got nothing done for you! Sorry. But I have not forgotten about this and will get to it soon, I promise.
Oh yeah, cheddargirl has inspired me to create quite a bizarre little game that will no doubt send countless children to the utter depths of socially depravity through its usage of simulated violence. Awful hard to keep THAT on the back shelf, eh?
Offline
Don't blame you for bumping but just so you know, I recently started bookmarking all the stuff I am helping or involved with so I will be back. Just taking longer than I anticipated as my band just cranked back up and I do a lot of volunteer work AND have almost random work hours.
Offline
Locomule wrote:
Don't blame you for bumping but just so you know, I recently started bookmarking all the stuff I am helping or involved with so I will be back. Just taking longer than I anticipated as my band just cranked back up and I do a lot of volunteer work AND have almost random work hours.
What would I do without you...
Regards,
Ralphjos
Offline
I checked out the original version of this game and now I have a completely different answer for you. You don't want to do this because it would make the game impossible.
In the original version of this game there are 8 different angles for each mirror. Every additional angle (actually 4 angles) that you add not only becomes more difficult to draw (and be seen/judged correctly) but in multiple ways makes the game too hard. If you made a mirror that rotated through 360 angles, imagine how impossible it would become to line up subsequent mirror bounces? More than 2 or 3 mirrors, especially over long distances, would be more like guess work than anything. Does this make sense? The player couldn't tell for sure even what angle even a single mirror was aiming, I don't think.
Offline
Here you go http://scratch.mit.edu/projects/Magnie/701486
Offline
Locomule wrote:
I checked out the original version of this game and now I have a completely different answer for you. You don't want to do this because it would make the game impossible.
In the original version of this game there are 8 different angles for each mirror. Every additional angle (actually 4 angles) that you add not only becomes more difficult to draw (and be seen/judged correctly) but in multiple ways makes the game too hard. If you made a mirror that rotated through 360 angles, imagine how impossible it would become to line up subsequent mirror bounces? More than 2 or 3 mirrors, especially over long distances, would be more like guess work than anything. Does this make sense? The player couldn't tell for sure even what angle even a single mirror was aiming, I don't think.
Then just 4 angles? I can do that...
*Edit: I made it 8 angles: 0, 45, 90, 135, 180, -135, -90, and -45
Magnie wrote:
Here you go http://scratch.mit.edu/projects/Magnie/701486
Thank you so much Magnie! I'll implement this into my project and see if it works.
Regards,
Ralphjos
Last edited by Ralphjos_LT_Acc (2009-11-13 19:36:07)
Offline
All is welcome! ( My saying, no usy.
)
Offline
Well lets see...
um...
maybe you could put:
When I receive start
Point towards sprite 1
pen down
move (distant to sprite 1) steps
Offline
Ralphjos wrote:
Sorry Magnie, but that script doesn't work.
Here is the demo...
Regards,
Ralphjos
When I tried out the demo there was no reflection when the beam hit something. Are you still working on it?
Offline
adriangl wrote:
Ralphjos wrote:
Sorry Magnie, but that script doesn't work.
Here is the demo...
Regards,
RalphjosWhen I tried out the demo there was no reflection when the beam hit something. Are you still working on it?
Yes, there is no reflection because I couldn't find an appropreate one that fit. Magnie suggested using costumes, but I've been busy lately that I haven't had enough time to set one up.
Regards,
Ralphjos
Offline