Relief!

Mar 17, 2007 04:54

Well I finally got my damn minigame working. I spent hours trying to figure out the "example" I had and much to my dismay an frustration gave up. The problem wasnt my ability to understand the code, it was to decypher it. The main problem was that the whole thing was bearly commented, and worst of all, all the variables were not self explanitory. ball.v stands for what... ball velocity, ball vector, ball vertex, who knows! Every variable was like that.

So I decided to say fuck it and try again at making my own physics engine. I took the same approach I used for projectiles in Gladiator. I spent a good 2-3 hours writing 300 lines of code, and it sortof worked. It was a pain in my ass making it work correct. My system was using a pair of booleans deciding if the paddles angle was shallow or sharp and if the balls entry was shallow or sharp, and then using a system of load balancing to transfer force from one direction to another. After 3 hours I decided this was looking to be very klunky and unoptomises.

So I decided to scoure the net one more time and finally I found in some far off forum a discussion of ball physics for a flash pinball game. Luckly a fellow by the name of bit-101 posted all the code I needed to get it. His idea was rather novel, however its pain in the ass to do in flash scope considering, but he did it.

Instead of trying to do the complex math for a collison of a ball on an angled surface he instead rotated the wall, ball, and velocity's untill the wall was at a 90 degree angle and the math was simple, then rotated it back after the math was done. So yeah my minigame is now in full working order. It had a bug or 2 but I fixed em all. All thats left is to polish up my game and im ready to post it on newgrounds.

I need to...
Fix the Credits
Add minibuttons to the main menu.
Redo the company logo.
... and then im done.

Sara providing, I should have it done tomarrow. If not then Monday.

So heres a screenshot of the final product.


Previous post Next post
Up