dillon@CORY.BERKELEY.EDU (Matt Dillon) (04/21/88)
The algorithm usually employed which gives the illusion of 'fast scrolling' is to simply scroll by more than one line when you get behind. Since at this point the user wants to see lots of lines zip by anyway, the skipping by 2 or 3 (etc... ) lines is not apparent to the user. Thus, there is no need to resort to hardware hacks. -Matt
markov@ruuinf.UUCP (dr.m.h. overmars) (04/22/88)
To get fast scrolling, the first thing to do is to avoid VDI at all. Just write the Raster routines yourself in Assembly and take care that everything starts and ends at word boundaries. The overhead caused by VDI for all the special features is large. Also write the routines for putting text on the screen yourself (again starting at byte boundaries and not including all these things like bold etc. ). Mark Overmars
pes@ux63.bath.ac.uk (Smee) (04/25/88)
Matt's is a special case of the general principle, don't work in smaller chunks than you have to. For example, if you are moving a sprite around the screen at high speed, don't move it a pixel at a time. Rather, work out how far it will go in one complete screen frame (1/70 sec mono, 1/50 or 1/60 second in colour) and then move it that many pixels in one jump, synchronized with the VSYNC. You can get a lot of speedup that way in many cases. Of course, you have to work out whether you are talking to a mono or colour monitor, and if colour, at what frequency, but you can get the OS to tell you all that.