Delay!? 
Author Message
 Delay!?

Hi! I need a routine that will make my program run at the same speed at any
computer. Let's say i am writing a adventure game. And i need that my sprite
moves from one place to another in the same time on 286 and on pentium.


Wed, 18 Jun 1902 08:00:00 GMT  
 Delay!?

Quote:
> Hi! I need a routine that will make my program run at the same speed at
any
> computer. Let's say i am writing a adventure game. And i need that my
sprite
> moves from one place to another in the same time on 286 and on pentium.

You'll probably have to rewrite your system-timer (Int 08h) and this own
timer must decide when to draw something...this should give you the
wanted results.
If you don't know what the system-timer (PIT I think) or don't know how
to code it, go and get the tutorial at: http://www.image.dk/~tm
Hope I could help !

Bye, X-Ray !

--
----------------------------------------------------------------------------
----
Adam Parusel

url     : http://members.tripod.com/~aparusel
----------------------------------------------------------------------------
----



Wed, 18 Jun 1902 08:00:00 GMT  
 Delay!?
If it doesn't mind if you sync to 18.2ths, you can do the following:

var
        timer: longint absoulute $0040:$006C;
        save: longint;

save := timer - 1;
repeat
        while timer = save do {nothing} ;
        save := timer;
        do_something
until quit



Quote:
> > Hi! I need a routine that will make my program run at the same speed at
> any
> > computer. Let's say i am writing a adventure game. And i need that my
> sprite
> > moves from one place to another in the same time on 286 and on pentium.

> You'll probably have to rewrite your system-timer (Int 08h) and this own
> timer must decide when to draw something...this should give you the
> wanted results.
> If you don't know what the system-timer (PIT I think) or don't know how
> to code it, go and get the tutorial at: http://www.image.dk/~tm
> Hope I could help !

> Bye, X-Ray !

> --

----------------------------------------------------------------------------

Quote:
> ----
> Adam Parusel

> url     : http://members.tripod.com/~aparusel

----------------------------------------------------------------------------

- Show quoted text -

Quote:
> ----



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Delay problem

2. Delay after writing table

3. Implementing efficient time delays

4. DELAY function with clock tics

5. TP Delay Routine

6. delay procedure & time of cpu (BP7)

7. HELP Microsecond Delay

8. time delay switching from text to graphics mode

9. In Game Delays?

10. delay in wincrt?

11. That little :-) delay/div by 0 bug

12. Another Delay bug?

 

 
Powered by phpBB® Forum Software