[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now



Posted on 1997-09-22
Medium Priority
Last Modified: 2012-05-04
What is the best way to write a scrolling routine for Turbo/C.  Using the putpixel command gives me a frame rate of about 1 per sec. with a 166mmx.  Or, where is a good library collection for C where I might find such a routine.  My main interest is in DOS game programming.
Question by:jason_brown
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1255027
Did you try to move contents of the vido memory ? Its more fast method.
LVL 15

Expert Comment

by:Tommy Hui
ID: 1255028
You don't want to use putpixel because you're doing things one at a time. To optimize things, you want to do as much stuff in bigger blocks as possible. For example, instead of moving pixels, try moving entire lines. Another possibility is to use the hardware to your advantage. The VGA card has scrolling built-in. If you want to use this method, then you will need to look at any of the graphics book by Michael Abrash e.g. _Zen Of Graphics Programming_.


Author Comment

ID: 1255029
I would need more information about moving a whole line at once.  Do you mean as in redefining ascii characters and printing them or using a compression algorithym?  I just thought there might be  a nice routine that does it all for you without me having to know how to use dos calls and interupts.  I'm lazy in that way I guess, I would still like a URL of a good graphics library for TURBO C, though.

Accepted Solution

navigator010897 earned 100 total points
ID: 1255030
There are a couple of good libraries you can use - one is FastGraph (there is a shareware fully functional version available) and there is another package by another group called Ground Up Software - their package Ground Up Graphics (GUG) is still available free (they also have a FANTASTIC audio package that I have messed around with - I Was very impressed) their site is:  http://www.groundup.com/gug.html

My strongest suggestion is to move to a 32bit compiler like Watcom.  It makes game programming 1000% simpler.  I did some scrolling code on my own, thought it out - and made it work almost on the first try (worked on the third) in 32 bit FLAT memory mode - never got it quite right in standard memory models.

I am not sure if GUG is 32 bit only - I've only looked at it a while back, and still have the notes on it.  

I do know - although FastGraph is a retail package (~250) - it is a fantastic package, will access Mode X, scrolling, super fast pixel blits to the screen, etc.  - I own this package, and I like it.

I have written stuff for Mode 13h (320x200) that has been pretty fast, and very smooth, but like I said before, scrolling only really worked well for me in 32bit flat mode when I was doing my own code.

That is the nice thing about FastGraph - it can do it without having Flat mode memory models - it actually re-shapes video memory so it is a bit bigger then the screen, and then uses page flipping to create ultra smooth - crisp scrolling effects.  You can get the persons book that includes the shareware version of FastGraph - it is called :  Action Arcade, it is written by Diana (I think is her first name, can't read the book this far away at the moment) Gruber (last name I am sure of) - it has tons of source and explanation on how to make the scrolling smooth.

If you want to do 13h scrolling in 32bit flat mode, and would like to see some code, I'd be happy to share as I am not a professional game programmer (just tinkered a little to see:)

Author Comment

ID: 1255031
Thanks for the encouragement.  I'll check out that library.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question