I'm currently teaching myself Delphi and am implementing a card game (BrainJam) as my learning project. I have got the thing working well except for the smooth sliding of cards between piles and at the end of the game where I bounce cards around the form. The individual cards are implemented as components extended from TGraphicControl. Having experimented and read these and other forums (or is it fora?) I chose to transfer the card image to a window based on a TCustomControl while sliding from one position to the next as it seemed that sliding a window object around is likely to require less redrawing and therefore less flicker. Despite all my efforts the sliding process is still not very smooth. At the moment I run a continuous loop for updating the window position during the slide. I have considered using a timer to provide updates at regular intervals (say 20-40 ms), but simple experiments I did with a timer to generate a Beep, had a lot of interruptions even at 100 ms intervals. Do I need to use some special synchronisation with screen updates, or some other Windows API trickery to block interruptions from other processes? Please help me I want to get the same smooth card movement I see on other card games. (Biggest problem is I'm a bit of a perfectionist!).
Sorry this post is so long.
Sorry this post is so long.