new to manipuating with directx,game programming

11-08-2001, 03:49 AM
is just a can we make the animation look smooth....sorry if i am sounding stupid.....very new to game programming..any help on directX as how this is done....

11-08-2001, 04:16 AM
Animation will look smooth if the graphics can be drawn in one vertical blanc. (the time the videocard needs to repaint the screen).
e.g. if your videocard is at 80Hz, you should draw you graphics within 1/80 of a second.

11-08-2001, 04:30 AM
If you use a double-buffer system then the time taken to draw the graphics only affects the frames per second. As long as you can blt from the back buffer to the primary buffer in less then 1/80 second (to use Arnout's example) then the graphics will be smooth.

11-08-2001, 04:31 AM
thatz the problem...don know how to draw graphics..please i need the help in starting with a simple graphics.......if you have a veryyyyyy veryyy simple code to work with graphics..that allows me to draw something......thanx for the reply

11-08-2001, 04:33 AM
For a start, try looking at the methods of the picturebox control. You have Line, Circle and PSet.

11-08-2001, 04:33 AM
I was working with one of the java project where we have to implement double has been in news for long.....could you make time to explain me what exactly is double buffering and how it works...the therotical part of it

11-08-2001, 04:46 AM
thnax banjo....i will definately look into picturebox control.............and thanks for getting me a definite help to me.....I will let you know if I have some problem.......:)

11-08-2001, 04:47 AM
Basically, you have two drawing surfaces. One is visible on the screen and the other isn't. When you call your drawing routines they write to the back buffer (the invisible surface). Then, when you're finished drawing you copy (BitBlt) the image in the back buffer in to the visible surface (the primary surface).
This is where the definition splits in two. The first is for hardware level operations. You will not generally get involved with these but its useful for information. The second is for VB level stuff.

1) If this copy is done quicker than the time it takes for the electron gun in the display to move from the bottom right to the top left (to start the next raster scan) then the animation will be smooth. If you don't get it in the vertical blank then the raster scan will draw halve of the old image and half of the new one giving a flickering effect.

2) In VB the low level stuff is handled for you. However, when you draw in a picturebox the refresh method is automatically called. This means thats for a complicated image it is being refreshed several times per frame. This is what causes the flickering. If you have two picboxs and draw to the back one, then when the image is complete in the back buffer you can copy it to the visble picbox. This one refresh per frame which is obviously going to be smoother.

11-08-2001, 05:42 AM
thanx Banjo...I will definately try this...Using two pic boxes....

11-29-2001, 10:27 PM
sorry amrit but u have got that sayin all wrong!
Rome was not built in a day......or by a single lets get together

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum