I'm making a 2D trading card game. each player has a deck of 60 cards so that makes 120 sprites, another sprite for the mouse and one for a bigger card to shown. When you draw a card, I made a loop so the card goes from the deck to his place. When I do this, the card is moving really slow and it 'jumps' I like it to be real smooth. but it won't work. Here is the code:
function update_hand(player)
dim hand()
array insert at bottom hand()
for t=1 to 60 step 1
if player=1
if deck1(t).area="hand"
array insert at bottom hand()
hand()=t
endif
else
if deck2(t).area="hand"
array insert at bottom hand()
hand()=t
endif
endif
next t
for c=1 to 4 step 1
for t=1 to array count(hand()) step 1
if player=1
number=deck1(hand(t)).number
sprite number,sprite x(number)-((sprite x(number)-(((146+(788/(array count(hand())+1))*deck1(hand(t)).priority))))/(5-c)),sprite y(number)+((625-sprite y(number))/(5-c)),deck1(hand(t)).image
size sprite number,sprite scale x(number)+((160-sprite scale x(number))/(5-c)),sprite scale y(number)+((220-sprite scale y(number))/(5-c))
else
number=deck2(hand(t)).number
sprite number,sprite x(number)+(((934-(788/(array count(hand())+1))*deck2(hand(t)).priority)-sprite x(number))/(5-c)),sprite y(number)+((-180-sprite y(number))/(5-c)),deck2(hand(t)).image
size sprite number,sprite scale x(number)+((160-sprite scale x(number))/(5-c)),sprite scale y(number)+((220-sprite scale y(number))/(5-c))
endif
next t
sync
next c
undim hand()
endfunction
When I repeat the loop for more times like 20, the card will be updated more, so it should be smooth, but then it goes really slow althought the sync rate is 60! so normally when the rate is 60 and I'm using 20 cycles to move the card, the card should be in its place in 1/3 from a sec! well, it doesn't???? I experimented with all the stuf and it goes the best with repeating the loop 4 times!
DIV/DBP-coder