Re: [stella] z-Axis Movement Programming Theory Sources?

Subject: Re: [stella] z-Axis Movement Programming Theory Sources?
From: KirkIsrael@xxxxxxxxxxxxx
Date: 14 Oct 2003 22:47:45 -0000
> Hi there!
> > Nice looking game. BTW, am I the only one that had 
> > trouble playing this binary in it's posted state?
> Worked fine with the DOS version of Z26.

Same w/ the latest Z26 on XP, and PCAE (though they didn't 
*quite* agree w/ each other -- just blank white under stella.

It was further along than I would have guessed! Neat looking.

Getting back to your 3D issues...I'm now thinking it's not
so much the 3D display that's bugging you, as the way the ball
should bounce inside the court?

Let me take a stab at this, don't know if you'll find it helpful
or not...

Short of it is: 3D motion can be broken up into 3 one dimensional
speed components.

You should do ok just by breaking the ball's velocity up into
the 3 axis...say x for left-right, y for up and down (against
gravity) and z in and out of the screen.  Now, X and Z should
remain relatively constant during a hit, except if you hit a 
"side wall", you change X velocity to it's negative value.  
When it hits the "back wall", the Z velocity gets turned to 
its negative value.  (Obviously (?), "hitting a wall" happens
when the X or Z position gets "out of the box", i.e. that value
is larger than the extent of the cube.)

I'm not sure about the Y velocity, "up and down" .  
Does racquetball involve the ceiling much?  And does gravity
play a visible role in making the ball arc down, or is it
too fast for that?  Anyway, assuming gravity is significant,
then every "tick" of the clock, you can add a small constant
in the downward direction of the Y component.  This accurately
and simply models the pull of gravity, and is how games like 
JoustPong and Thomas' Cave 1K get nice motion effects in 2D.

Of course, figuring out exactly what to set X,Y,and Z speeds
to when the player hits the ball...that's where this humble
explanation leaves off :-)

"Give me a plant with a demonstrable sense of irony, then I'll 
  be all over botany." --2000-8-19 

Archives (includes files) at
Unsub & more at

Current Thread