From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: ASCII GUI Date: Sun, 14 Jan 2001 20:59:55 -0500 Lines: 47 Message-ID: <93tlh4$bd027$1@ID-57378.news.dfncis.de> References: <57n86.4082$wt2 DOT 26425 AT news1 DOT oke DOT nextra DOT no> NNTP-Posting-Host: ip120.rochester6.ny.pub-ip.psi.net (38.26.84.120) X-Trace: fu-berlin.de 979523941 11960391 38.26.84.120 (16 [57378]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hey! You may notice how fast TurboVision (text GUI from Turbo Pascal) is. It's even fast on 286! So the things to think of are: 1. turn off cursor while redrawing, if it bores you 2. perform redraws in an off-screen buffer which should be a) usually noticable faster and b) is hidden from user 3. think of window clipping. if you redraw a window entirely regardless of whether it's visible to user or not (e.g. under other windows). this should make some performance improvements 4. turn on optimizations in GCC (perhaps this should go before 1 and 2 :)) 5. if the thing is still slow, then there's something wrong with your code because GCC does very good optimization so that you often don't need to think of ASM at all Good Luck -- Alexei A. Frounze alexfru [AT] chat [DOT] ru frounze [AT] ece [DOT] rochester [DOT] edu http://alexfru.chat.ru http://members.xoom.com/alexfru/ http://welcome.to/pmode/ "Jon" wrote in message news:57n86.4082$wt2 DOT 26425 AT news1 DOT oke DOT nextra DOT no... > I'm fairly new to programming, and have just started writing a program in > DJGPP which uses > an ASCII GUI. The problem is that, it redraws the GUI very slow. Even on my > 850 MHZ Athlon, I can see the cursor drawing up the GUI. Currently I use the > gotoxy(); function and cprintf(); to draw the GUI. > But when doing big redraws, it just become too slow, like on another program > I made, I used the ASCII character 219 to form a word, which I moved across > the screen. This was also terrible slow. > So, do anyone know of a better way to draw up ASCII graphics without using > the gotoxy and cprintf? > > Jon > >