Printing to a memory page for use in animation

To optain smoother animations, is it possible to write to a page then show the page with the boxShow command. This would allow much smoother graphics. I would like to show moving graphics that overlap each other. I understand the concept of a BoxKeep and BoxShow but it always seems to flash when I use them. I'm not working on a specific project at the moment so I don't have any examples although I would welcome your comments.



This will allow you to download/open an aritcle I wrote for TrueBasic a number of years ago that shows step by step how to do sophisticated animations. In these you can move objects over fixed backgrounds--even have transparent parts of your moving object. I do extensive animation work (Physics instructional software and lab simulations). The airtrack lab simulation shows what can be done with this technique as I use photo-realistic graphics of real equipment that is animated to match the conditions set by the user.




You can produce excellent graphics animation using BOX SHOW. The ordinary movies display photographic frames at 24 frames per second - approximately 0.04 seconds per frame. Whole screen BOX SHOW can show images every 0.006 seconds (depending on the clock speed of your computer processor) so very fast animation is possible. The faster the display time and the smaller the increments of movement within an image, the smoother the animation.

There are two parts to the story
(a) assembling the image
(b) displaying the image

The simplest method of assembling the images is to pre-draw them and save them as files. Don't save them as BMP images because the conversion process to BOX strings is too slow. Save your images as BOX strings in byte files. You can read all these images into memory then BOX SHOW each one using a FOR...NEXT loop. Beware, the images are likely to be shown too fast so you will have to introduce a pause statement to slow things down. I have a demo program that shows this principle. You can even read the image files one by one directly from a hard drive and BOX SHOW each one in real time. This will be fast enough for most animations.

The alternative is to draw your images on the run. The point to remember is to draw your images in a "hidden" window, i.e. a window that is the target or focus but has not been shown. BOX KEEP the hidden window then BOX SHOW this image in the visible window. This will stop all the flashing you complained about.

Big John