Subject: [stella] Re: P2C+Cartesian to Polar = Full Co-ordinate Conversion|
From: "Andrew Wallace" <apeboy@xxxxxxxxxxxxxxx>
Date: Sun, 04 Nov 2001 10:08:28 GMT
This demonstrates full co-ordinate conversion. You "drive"
a familiar looking tank around a baseball field made up of
the other player, ball, and missiles. The resolution is
execrable because it's only good to 1 in 64 and there are
three conversions involved in locating an object, so the
errors propagate. This can be solved, at the expense of
some clock cycles (next project!). Single-pixel resolution
(at least at the level of this demo) should be possible.
You could adapt this code readily to 3D, but the errors
would be even worse. With an extension to 10-bit angles
that should become acceptable (though at some cost on
My P2C demo had been anticipated by Gyruss, though
used a brute-force table in a paged 8K game to do what
I did in about 1.5K. That wouldn't work with this. I don't
think it's ever been done on Stella, even at this limited level.
If it has I'd be *very* interested in hearing about it,
because I'm actually starting to get the itch to make a
playable game out of this idea.
P.S. These conversion routines are useful in many contexts and I'm not jealous of them. One interesting project would be to add fine motion control to Combat. I may do that if no one else is interested just as a practice exercise. I've put them in the public domain, if you feel you could use them please do.