OZONE Asylum
Forums
DHTML/Javascript
Pinball game: Collision of a ball with a pinball paddle
This page's ID:
30777
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I'm lost. I understand how collision is checked with two circles but I need someone to help me with psuedo code to develop the code to check collisions with paddles in a pinball game I want to make. First off, I found this script here http://wd-testnet.world-direct.at/mozilla/dhtml/funo/pinballtest/pinball2textAlignCenter.htm and modified it while learning how it worked. I'm trying to learn javascript by picking apart free resources I find on the web. I needed to learn how to use soundmanager and this script was begging for sounds. Teethgrinder has an image rotate script that I modified while picking apart and got some flippers. I have almost everything ready but I need to figure out the paddle math. Is there anyone here who has done this calculation before.? I assure you, I've scoured the internet. I have saved two working examples of balls hitting irregular slopes but I don't want to spend forever trying to sort out the script just to back out the calculations. It's seems easier to ask you pros and **gasp** actually code for myself instead of splicing in some code I cut and pasted from somewhere. Here's my testing version with sound. http://h1.ripway.com/tinyscript/pinballRedux.html# Here's my flipper script http://h1.ripway.com/tinyscript/canvasPinballFlippers.html and the next link is flippers drawn with the canvas element but they look strange. Could be the way I'm drawing them. http://h1.ripway.com/tinyscript/CanvasPinballFlipperDrawingTest.html finally, for testing purposes, here's an ozone pinball script with some flippers. I screwed up the script a little, but shingebas wrote this. it's the perpetual pinball script. I made it work for canvas and then added the flippers. I think I was trying to resize the playing field and then I was going to resize the ball, but it might be easier to resize the paddles smaller if anyone is actually interested in this and wnts to help. I've seriously hit a dead end. I don't know where to find out how to do this.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »