rotating the entire rendered playing field on mobile, and collisions

Dr. Hawkins dochawk at gmail.com
Sun Jul 10 20:44:57 EDT 2016


As mentioned in the advertising section, I"m starting to work with my game
again.

I'm trying to figure out a sane way to rotate the entire playing field by a
few degrees.  I'll have probably a dozen or two objects (borders and
groups) as well the player (a group).

If it was all a png except for the player, i could just set the angle of
it, but I'm using livecode objects.  (I cheerfully set out figuring that I
could set the angle of the group . . . whoops!).

Is there a sane way to do this short of somehow rendering my groups as png
(err, *is* there a way to do that), and the "track" as png, and
individually rotating them and doing the vector math to reposition each?

This also brings collision detection into play.   It seems that the
cleanest way to do this is to put the long id of each object in the play
area into a line of a variable, and then looping through that with
intersect().

Actually, I suppose, a two step process: lock the screen, move the player,
check the intersects, and if any mean moving into something solid object,
undo the move while the screen is still locked.

I've been absorbing Swift the last fe days.  If it wasn't for the bit about
having to keep two versions (iOS & and Android; the main project doesn't
support Android yet), it looks like a better tool for what I'm doing
(although from what I see so far, Livecode's messaging to objects is *much*
 stronger).

But I'm just not going to maintain two versions . . .
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462



More information about the use-livecode mailing list