When I use graphics in my Turbo C++, they look really nasty, and they flicker. I know that I am supposed to use a back surface or something, but I don''t know how to do it. I also need to know how to use bitmaps or some other graphics.
Look up ''double buffering''. Basically, the idea is that you have an area of memory, identical in size and type to your screen memory. You draw to that buffer, and then copy it all to the main screen memory in one go. Doing it in one go reduces the chance of flickering, with the only disadvantage being that you need extra memory to do it this way. However, nearly all games use some variation of this technique.
Hi, If you are using BGI, it will be slow, use mode13. If you are using mode13 then you have to wait for a vertical blanking, i.e the reposition of beam of crt to next y value with the initial x value and also copy everything to memory before copying onto the surface - look up memcpy.