Autor Beitrag
JJ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: So 14.03.04 17:44 
Also... ich möchte gerne sprites einfügen ... kann mir jemand erklären wie das geht ... sodass ich es auch verstehe?
Möchte sone art egoshooter schreiben... mit einfachen 4ecken als sprites ... das is bestimmt kompliziert.... aber ich bin sicher einer von euch kann mir helfen...

Moderiert von user profile iconPeter Lustig: Topic verschoben

_________________
Hallo!
NetZwerg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: So 14.03.04 17:49 
Du meinst ein sprite, das animiert ist? also mehrere einzelbilder? Du musst ne Variable definieren, die mit einem Timer immer um 1 erhöhen und demnach das bild ändern.

Ich weiß jetz nich genau wie man ne variable macht :mrgreen: ich gucke mal nach oder ein anderer hilft dir. also dann, wenn die variable definiert is, so:

ausblenden Quelltext
1:
2:
3:
DieVariable := DieVariable + 1;
inttostr(DieVariable);
if DieVariable = 1 then DasSprite.Picture.LoadFromFile(''+var+'.bmp');


is wahrscheinlich voller fehler aber so im prinzip. Kann mal bitte jemand den code richtigstellen? :mrgreen:

cYa, Dave :twisted:

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur


Zuletzt bearbeitet von NetZwerg am So 14.03.04 17:50, insgesamt 1-mal bearbeitet
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: So 14.03.04 17:50 
in 3D??
dann solltest ud dir mal OpenGL anschauen
z.b. auf www.delphigl.com ;)
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Mo 15.03.04 11:12 
NetZwerg hat folgendes geschrieben:

ausblenden Quelltext
1:
2:
3:
DieVariable := DieVariable + 1;
inttostr(DieVariable);
if DieVariable = 1 then DasSprite.Picture.LoadFromFile(''+var+'.bmp');


is wahrscheinlich voller fehler aber so im prinzip. Kann mal bitte jemand den code richtigstellen? :mrgreen:


:D :twisted: Auch richtig gestellt sollte man diesen code nicht verwenden. In jedem frame sich die resourcen von platte zu laden ist performance-seuche!

Wenn du einen egoShooter machen willst, aber nicht weisst wie man sprites darstellt, dann kann man dir nur raten, erstmal ein kleines sprite-spiel zu machen :wink: ...denn du würdest scheitern!

mfg.

_________________
mfg.
mâximôv