Re: Re: A85: Pinball


[Prev][Next][Index][Thread]

Re: Re: A85: Pinball




On Sun, 20 Sep 1998 DorkReMi@aol.com wrote:

> 
> how are you gonna do the calculations in ASM for bouncing and stuff? (Stupid
> question, really, seeing how well versed you are in Math functions. :))
> 
> -Josh Morris
>  DorkReMi@aol.com
> 
I'm going to break the balls motion into two components, x and y.
Depending on what kind of surface the ball hits, the velocityies are reversed
and either increased or decreased (hits a wall or a flipper ect.)
The y velocity would contantly be reduced for gravity.
Once the velocities are recalculated I can then calculate the next ball
position given a contant time.

It will need some tweaking though, so it looks real.  I'm not sure how
many bitswill be past the imaginary decimal place. I think I'll use 3
bits, so to find the next x or y I would just shift right 3 times and add
to the coordinate.  Then maybe store the sign of the velocities in another
byte.

later,

-Humberto Yeverino Jr.

"I kick ass for the Lord."

***********************************************************
Home Page:                                               
  http://www.engr.csufresno.edu/~humberto/Home.html      

Ti Page:                                                 
  http://www.engr.csufresno.edu/~humberto/tex.html       

z80 Source Page:                                         
  http://www.engr.csufresno.edu/~humberto/z80source.html 

Official Tyrant Home Page:                              
  http://www.engr.csufresno.edu/~humberto/tyrant.html    

E-mail:                                                  
  humberto@engr.csufresno.edu                            
***********************************************************


References: