Autor Beitrag
noctua
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 170



BeitragVerfasst: Sa 08.04.06 22:03 
Hallo,

Ich bin gerade dabei ein Spiel zu programmieren in dem man eine person hat die bis jetzt nur einfach durch die Welt laufen kann. Ich habe mir gedacht, dass ich ein array benutze (bzw. 2 für die 2D fläche) in dem immer der Typ steht. Dann wollte ich auf meine Form 20x20 Images legen welche jedem array punkt zugeordnet sind und durch einen timer jede 1/10sek aktualisiert werden.

Nun habe ich das Problem, dass ich glaube, dass die Rechenleistung viel zu hoch für so ein kleines game sein wird wegen des immages, aber gibt es eine andere methode?

danke.

_________________
Am ende sterben eh alle ................
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 08.04.06 22:09 
Du kannst alles in ein Image packen und dann per Imagex.Canvas.Draw Grafiken ins Image legen.

Du hast von 2 arrays geredet, ich weis nicht, ob du das gemeint hast, aber du kannst ein zweidimensionales array machen, in dem du schreibst:
ausblenden Delphi-Quelltext
1:
2:
3:
var zweiD:array of array of Integer;
{..}
zweiD[0,9]:=2;

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
noctua Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 170



BeitragVerfasst: Sa 08.04.06 23:16 
So mach ich es auch ... aber is das denn Sinnvoll? ich vermute, dass es sehr leistungsfressend ist, wenn ich jedem ArrayFeld eines der 20x20 Bilder zuordne und jede 1/10 sek aktualisiere bzw. neu lade, odergehts auch anders?

_________________
Am ende sterben eh alle ................
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 09.04.06 08:38