Re: [stella] JoustPong: maybe ditch "poorlords" wall

Subject: Re: [stella] JoustPong: maybe ditch "poorlords" wall
From: "Andrew Davie" <atari2600@xxxxxxxxxxxxx>
Date: Tue, 13 Jan 2004 01:15:33 +1100
> right now the ball moves one pixel a frame.
> (I'm using exact horizontal positioning)
> So I could jump to two pixels a frame, or one pixel a frame and one
> extra pixel every other frame.  Do you think the shift from one
> speed to another would be too obvious?

IMHO this is exactly the wrong way to do ball movement.
Ball should be adjustable to move any number of pixels per frame, for

.23 pixels per frame...  or 1.56 pixels per frame.
Just because you program things on a frame by frame basis doesn't mean your
objects have to move on a frame by frame basis.  If you have a variable
holding the coordinate of the ball, and that variable has a fractional
component, then you just add ".23 pixels"  or  "1.56 pixels" to the ball
position... every frame... and use the integer part of the ball's coordinate
for the actual ball position display.

This is the way that you also get nice smooth movement on the paddle
controls, too, by the way.  Not sure if you realise this yet... are you also
doing the "every frame"  or "two out of every three frames" method for that?


Archives (includes files) at
Unsub & more at

Current Thread