[SDL] correct way of map scrolling

Will Langford unfies at gmail.com
Thu Aug 9 20:44:49 PDT 2007


On 8/9/07, Alan Wolfe <Atrix2 at cox.net> wrote:
>
> You could for sure do that and just compare squared distances to save on
> the
> square roots (slow!) but I think in the end you'd end up with a CIRCLE of
> tiles instead of a rectangle :P
>

The circle would be large enough to fit the viewport entirely within it (ie:
circle complete encompasses the viewport).  End user wouldn't even know it
was a circle cause they'd never see the boundaries :).  Sure you'd have
overdraw from the bits of the circle that aren't within the viewport, but
you're still (possibly quickly) reducing your draw choices.

-Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070809/74e7ce81/attachment.htm 


More information about the SDL mailing list