I have finally figured out what happened.. after driving myself a lilttle crazy. I had the relationals wrong in the hit detection code and the target stack management.
here's the corrention;
rem here we detect hits....
rem do targets first....
if running = 1
if world(worm(head(0), 0), worm(head(0), 1)) = 2
v = 0
for w = 0 to ts(0)
if (worm(head(0),0) => targets(w, 2)) and (worm(head(0),0) <= (targets(w, 2) + 3))
if (worm(head(0),1) => targets(w, 3)) and (worm(head(0),1) <= (targets(w, 3) + 3)) then v = w + 1
endif
next w
prise:
if v
play sound 1
score(0) = score(0) + targets(v - 1, 1)
lag(0) = targets(v - 1, 1)
targets(v - 1, 0) = 2
world(worm(head(0), 0), worm(head(0), 1)) = 1
endif
else
rem and now we do the body test...
if world(worm(head(0), 0), worm(head(0), 1)) = 1
running = 2
else
rem if nothing there, set head as body...
world(worm(head(0), 0), worm(head(0), 1)) = 1
endif
endif
endif
(Decided not to post it all again, just the change.)
S.
Any truly great code should be indisguishable from magic.