[rfk-dev] Re: robotfindskitten - Native Mac OS X version
Sun, 20 Apr 2003 18:20:50 +0100
> - You don't so much touch an NKI as run over/through it. This is
> because, really, there's not any way to tell if there's anything drawn
> there, because I'm not using ncurses. As soon as I find out how to do
> this when drawing strings to a view, I will.
I'm not really sure what the problem is; if you know the X and Y coordinates
of all the NKI & Kitten, and you know the X and Y coordinates of robot, you
can do a simple compare before you move the robot. If the problem is that you
are using a proportional font, so that robot doesn't necessarily line up with
the other objects, you just use pythagorus' theorum to determine how far away
robot is from each object. In fact, the latter method allows you to implement
smooth pixel-based robot movement. See the rfk3d source for an example.