Hi Gajo Try setting Form.DoubleBuffered := true; Look up double buffered in the help. You'll also find a wealth of info on this on the net.
Unless your game graphics are fairly simple and the double buffering does the trick for you, you'll probably find that basic Windows GDI graphics won't give you very good results. You might need to look into Direct-X or another graphics engine. A good place to get started into this whole world is delphi.about.com and follow the graphics and gaming links. There is a Delphi wrapper around Direct-X and more than one Delphi gaming site. Wes > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gajo Istvan > Sent: Tuesday, 6 January 2004 8:03 a.m. > To: [EMAIL PROTECTED] > Subject: [DUG] Form / Image repaint problem > > > Hi, > > I have a problem with making my program (game) "look better". > I have one image, which is the background. Then there are > three images on the bottom of the form. To create the feeling > that the map is "moving", the three images on the bottom are > moving to the left, and each time one of them falls out of > the form it is placed on the right end of the form, so it > reappears again. Sort of like the Flinstones, you always see > the same rocks reappearing when Fred drives :) > > I use a Timer of course, the speed can be relative but I'd > like it to be 10 ms, and the length at which one image is > moving is 2 points, although I'm probably going to change that. > > It all works ok, except that the images "flicker". This > occurs because when one of the images is moved to the left, > the form is repainted, then the background image, and > finally the moving image itself. And this is just plain ugly! > > So my question is: is there a way to make moving images > without all the flickering? I of course need to repaint > because otherwise the moving images would leave a trail after > them, but is it really neccessary for the Form to be > repainted too? Because it is hidden anyway by the background > image... I was thinking: how can I disable the form to repaint itself? > > But I'm not sure if that would solve anything. Any suggestions? > > Gajo > > > _______________________________________________ > Delphi mailing list > [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
