8BIT wrote:
nu wrote:
Hi again.
I've gone through your idea in theory, but wouldn't this solution result in a non-smooth jagged path for the bullets? Like this first example:
...
Perhaps I'm missing something with your method, I'm a wee bit tired at the moment
![Wink ;)](./images/smilies/icon_wink.gif)
Thanks for helping out.
_nu
My method will produce a smooth path because its adding fractional increments to the bullet location. For example, a 10 degree path will move more quickly in the x direction (cartesian coordinate system).
.
.
.
Look closely at the upper byte of the locations and you'll see that it actually takes at least 2 calculations to advance the bullet, resulting in a very smooth path!!
Does this help?
Daryl
Curious.
I'd think the first example he gave would look smoother in as much as you
can only move at certain discrete angles and moving one pixel at an
iteration allows an angle of 45 degrees and moving two pixels at a time
only allows an angle of about 26 degrees.
ie the maximum position error is something like 1 pixel in a given direction
and (I think) it would look better spread over 2 pixels in the other direction
rather than one pixel.
so wouldn't it be better to move at least on pixel and (maybe) preferably
two at each iteration for (at least) one of the two axis?
eg
from your table:
0B 056A 00F2
0C 05E8 0108
0D 0666 011E
if I'm reading that correctly, that's a jog of 90 degrees
Maybe I misunderstand? Or maybe you guys mean some other kind of smooth?
Also if cycles are at a premium, wouldn't it be better to move at 1-2 pixels
at a step rather than <1 ?
I'd also note that if 7 bits of sine is enough you could probably get by with
a smaller table and do linear interpolation all be it at a cost in cycles
equivalent to a few iterations of bullet movement.