Autor Beitrag
CyTe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Fr 25.04.03 19:46 
kann ich 2 timer parallel laufen lassen?
(delphiX)
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Fr 25.04.03 20:02 
sicher ... wieso nicht?


MfG BungeeBug
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 25.04.03 23:03 
die 2 Timer wirde sich gegenzeitg stören, ich habe es mal gemacht... du muss wenn du 2 DXTimer verwemdes dafür sorgen das nur ein DXTimer akvif ist.
aber wozu brauchst du das ?
man kann doch fast alles in einem Timer unterbringen ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
CyTe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Sa 26.04.03 19:07 
vielleicht kann (oder sollte) man das ja anders machen:

einen timer verwende ich zum rendern der grafik
den anderen zum abfregen der tasten die gedrückt wurden.

wenn ich jetzt den grafiktimer öfter laufen lassen will, bewegt sich mein raumschiff auch schneller, was ich aber net will.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Sa 26.04.03 20:39 
kannst du das nicht mit threads machen?
Du kannst du mehrere Timer - ohne das diese sich blockieren - verwenden, allerdings gibts da unterschiede im Betriebssystem. Imho konnte man bei w9x nur max. 5 Timer setzen.

grez
msch
[)arkSlayer
Hält's aus hier
Beiträge: 9



BeitragVerfasst: So 27.04.03 12:29 
mach einfach einen dxtimer mit intervall 0...da wird schonmal die tastatur immer abgeprüft! dann lässt du in der timerprocedure immer eine variable erhöhen inc(t: integer). dann schreibste ne if-bedingung rein:
if t=50 then begin t:=0; .....rendern..... end;

so hab ich's auch gemacht und's klappt perfekt :)

mfg slayer, bye
CyTe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 28.04.03 06:21 
thx

die letzte aw is ne super idee!
[)arkSlayer
Hält's aus hier
Beiträge: 9



BeitragVerfasst: Mo 28.04.03 12:07 
hehehe, np ;)

mfg slayer, bye
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 28.04.03 13:44 
[)arkSlayer hat folgendes geschrieben:
mach einfach einen dxtimer mit intervall 0...da wird schonmal die tastatur immer abgeprüft!

das ist keien tolle idee...
warum benutzt du nicht die keydownereignisse und zum rendern entweder nen renderloop oder application.onidle???
wenn das rendern z.B. länger als 50ms dauert, dann ist alles zu spät ;) :lol: