Mail Archives: djgpp/1997/08/08/19:23:48
From: | Andreas Eisenkolb <amadeus AT imp DOT med DOT uni-muenchen DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | smooth motion, sometimes jerky
|
Date: | Fri, 08 Aug 1997 21:15:19 +0200
|
Organization: | Inst. f. Med. Psych., L.M.Uni.-Muenchen
|
Lines: | 40
|
Distribution: | world
|
Message-ID: | <33EB7047.41C67EA6@imp.med.uni-muenchen.de>
|
NNTP-Posting-Host: | groucho.imp.med.uni-muenchen.de
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello,
I have a question as to why the smoothly
moving filled circles produced by my program
sometimes make a small jump on the display.
The program does basically the following:
1. calculate the path of the moving circle
(or whatever object) with a given speed (pixel/ms),
direction and so on
in screen coordinates (floating point) depending
on the current frame rate.
2. malloc small bitmaps (with allegro's create_bitmap,
size: 30x30) for every point in time and copy the moving object
(an antialiased template) into that bitmaps at the
right position and do some filtering for accounting for the
non integer coordinates
3. Blit the bitmaps subsequently in a double buffered manner.
Problem:
all 400 frames (average) the screen freezes for, I would say,
one frame resulting in a perceivable jerk.
System:
I'm using djgpp 2.7.2, allegro and some sky-screaming
hacks to access the registers of the matrox mystique (to
get the exact framerate), and
univbe5.3 because otherwise allegro's scroll_screen isn't in sync
(don't know why) with the framerate (135 Hz).
Can anyone tell me the reason for that?
I'm sure I'm doing no writing to disk.
The rest runs perfectly (=thanks to all DJGPP ceators and maintainers
and ...)
Thanks in advance, Andreas
- Raw text -